Saravanan666/pypi-org huggingface dataset:
Package: command-center
Save and run terminal commands for frequent use.
Also supports a button grid GUI window for using a mouse.InstallationInstall from pypi using pip:pip install command-centerUsageCreate apcc.jsonfile to hold your commands.:{
  "test": "pytest",
  "lint": "flake8"
}Then simply run pcc in the terminal with your command key.:$ pcc testNote: You can run as many commands in sequential order as you want.
For examplepcc test lintwould run test and then lint.If you forget key of your command you can runpcc--commandsto get a list
of commands printed to the console.GUIIf you want to display a button window for easy mouse use, use pcc-gui.:$ pcc-guiAdding--helpto pcc or pcc-gui will display helpful information.
Package: commandchat
English|中文openai-commandchatQuick startUse this command line to install the python packages:pip3installcommandchatOr use the following command line to guide you to a specific python version, if you have multiple versions of python locallypython3.x-mpip3installcommandchatFeaturesYou can set the api_key for openai with a simple command, and you can distinguish the key for your multiple accounts with a profile (defaultdefaultif you don't specify it):occ configure -profileYou can use the commandocc chatto chat with the chat-GPT modelgpt-3.5-turbo.To be implementedYou can use theocc image -desccommand with chat-GPT's model to describe the image you want to generate, giving you back a link to the image.You can use theocc xxx -yyycommand to chat with a specified model of chat-GPT to complete a task you specify or give you advice.Others not yet thought ofRequirementsA terminal with Python and pip installed:Installed python environment and python version >= 3.9Install the openai packageInstallingpip3installcommandchatUninstallpip3uninstallcommandchatFeedback or questionsYou can send an email to:xxx.tao.c@gmail.comorxoto@outlook.beLicenseMIT
Package: commandeer
Commandeer is a command-line generator library that you can use to add a nice command line interface to your python programs.It will take care of parsing all command line options as well as calling the right command functions in your script. And it will generate a nice-looking help for the program and for each of the commands.We've written Commandeer in such a way that it should work just like you expect it to. There are only two things you need to do:name the functions you want to expose on the command line to end in_command.Add the following code snippet to the end of your command line module::import commandeer
if __name__ == '__main__':
    commandeer.cli()You should try it out!For more information, consult the documentation onhttps://gitlab.com/jspielmann/commandeer/License informationCopyright (C) 2012, 2021 Johannes SpielmannCommandeer is licensed under the terms of the GNU General Public Licenses as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.For a full description of the license, please see the fileLICENSE
Package: commandeft
CommanDeftCommanDeft is a simple Python CLI tool designed to generate useful shell commands based on user prompts. It utilizes OpenAI's chat models to provide intelligent suggestions and help users compose shell commands quickly and efficiently.RequirementsIn order to use CommanDeft you will need an OpenAI API Key which will be asked of you during the initial configuration.
You can easily get one fromHERE-If you are using Linux you might have to installxclipusing your package manager.For example, in Debian:sudo apt-get install xclipInstallationTo install CommanDeft, you can use the following command:pipinstallcommandeftExample UsageGenerate a shell command based on a prompt:commandeft--prompt"list all files in the current directory"OR
commandeft-p"list all files in the current directory"This will provide a shell command suggestion based on the given prompt:>ls-aRun CommanDeft in interactive mode:commandeft --interactiveThis will start CommanDeft in interactive mode, allowing you to input prompts and receive command suggestions directly within the CLI.Re-configure:commandeft --configureThis will run the configuration flow for CommanDeft, allowing you to set up your preferences and customize the behavior of the tool.ConfigurationDuring the initial configuration or when running:commandeft--configure(or-c)You can choose the generated answer'stemperature. Because this tool is geared towards code generation, lower temperatures perform better.
More information about temeraturesHEREYou can choose themax_tokenvalue.⚠️ Keep in Mind that the guided prompt(assistant role prompt + user role prompt without user's prompt) consumes ~70 tokens. The value you specify won't include these tokens.You will also be asked about the action that will be performed every time when you accept a generated command when running in interactive mode.The available actions are:Running the generated commandCopying it to the clipboardDon't worry though, after this you will be asked to apply your selected action on every generation.OptionsOnce installed, you can run CommanDeft using thecommandeftcommand. Here are the available options:-h, --help: Show the help message and exit.-v, --version: Show the version information and exit.-c, --configure: Configure CommanDeft (Like the one on the first run).-i, --interactive: Run CommanDeft in interactive mode.-p, --prompt "TEXT": Specify your prompt inline.ContributingContributions to CommanDeft are welcome! If you encounter any issues, have suggestions for improvements, or would like to contribute code, please check out the project repository on GitHub:RepoLicenseThis project is licensed under the MIT License. See theLICENSEfile for more details.FeedbackIf you find CommanDeft useful or have any feedback, I would love to hear from you! Please feel free to reach out and let me know how I can make this tool even better.
Package: commanderbot
commanderbot-pyA collection of utilities and extensions for discord.py bots.RequirementsPython 3.10+discord.py 2.0+Running your botYou can run your own bot without writing any code.You will need the following:Your ownDiscord Applicationwith a bot token.Aconfiguration filefor the bot.A Python 3.10+ environment.It is recommended to use avirtual environmentfor this.You can usepyenvto build and run Python 3.10.If you havepoetry, you canpoetry installinstead of usingpip. (Just make sure that dev dependencies are also installed.) Otherwise, you may usepip:Runpip install commanderbotto install the bot core package.The first thing you should do is check the CLI help menu:python-mcommanderbot--helpThere are several ways to provide a bot token:(Recommended) As theBOT_TOKENenvironment variable:BOT_TOKEN=put_your_bot_token_hereSupports.envfiles: use.envin the working directory or provide the--envfileoptionAs a CLI option:--token put_your_bot_token_hereAs a standalone file:--tokenfile path_to_file_with_bot_tokenManually, when prompted during start-upHere's an example that provides the bot token as an argument:python-mcommanderbotbot.json--tokenput_your_bot_token_hereConfiguring your botThe current set of configuration options is limited. Following is an example configuration that sets the command prefix and loads thestatusandfaqextensions.Note that with this configuration, thefaqextension will require read-write access tofaq.jsonin the working directory.{"command_prefix":">","extensions":["commanderbot.ext.status",{"name":"commanderbot.ext.faq","enabled":true,"options":{"database":"faq.json","prefix":"?"}}]}
Package: command-executor
UsagePlease refer to theDocumentationto
learn how to usecommand-executor. Basicly,command_executorprovides some
Python classes to make it easier to start processes / commands and handling errors and output.
In addition, input validation for command parameters is possible.Requirementspython-command-executor supports Python 3 only. No other dependencies are required.Prepare for developmentA Python 3.6 interpreter is required in addition to pipenv.$pipenvinstall--python3.6$pipenvshell$pipinstall-e.Now you’re ready to run the tests:$pipenvrunpy.test
Package: commandflow
commandflow使用Python生成命令行🍕 安装pipinstallcommandflow🎉 快速开始fromcommandflowimportCommandclassMyCommand(Command):exe='fastp'definput(self,filename):self.set_action('f','file',value=filename)if__name__=='__main__':command=MyCommand()command.input('test.file')print(command.command)# fastp --file test.file✨文档设计动机在进行生信分析时，往往会使用很多分析软件，当串联一个完整的分析流程时，需要编写大量的shell脚本，这很不优雅。我不喜欢写shell。层次结构对于每一条命令Command而言，是由若干个Action组成，每一个Action为一个参数。创建一个命令fromcommandflowimportCommandclassMyCommand(Command):exe='bwa'# 指定可执行程序或者也可以通过set_exe()来指定可执行程序fromcommandflowimportCommandclassMyCommand(Command):exe='bwa'# 指定可执行程序c=MyCommand()c.set_exe('bwa')添加参数使用set_action()来添加参数到最终的命令行中fromcommandflowimportCommandclassMyCommand(Command):exe='bwa'definput(self,filename):self.set_action('f','file',value=filename)c=MyCommand()c.input('test.docx')set_action()可以接收多个参数- short_arg_name： 短参数名  -f
- long_arg_name： 长参数名  --file
- value：参数值
- help：对该条参数的解释说明
- positional：使用是一个位置参数，默认放到最后
- sep：当传递的value是一个list的时候，所指定的连接符，默认为空格
- stdout：命令是否需要指定标准输出value可以为int、float、str、list类型的值，当value是一个list类型的值时，会通过sep连接起来，如当sep为空格时，[1, 2, 3]会被拼接为1 2 3，这对某些接收多个参数值的参数非常有用。获取最终的命令行fromcommandflowimportCommandclassMyCommand(Command):exe='bwa'definput(self,filename):self.set_action('f','file',value=filename)c=MyCommand()c.input('test.docx')print(c.command)# bwa --file test.docx当相同的参数值被多次设置参数时，后面设置的会将前面设置的覆盖c=MyCommand()c.input('test.docx')c.input('apple.docx')print(c.command)# bwa --file apple.docx生成多个命令行上面的方式只能生成一条命令，但实际应用中可能会涉及到需要生成多条命令，彼此之间只是参数值不同使用record()记录需要生成的命令，并通过records来获取所有记录的命令c=MyCommand()forfilein['1.docx','2.docx','3.docx']:c.input(file)c.record()print(c.records)# ['bwa --file 1.docx', 'bwa --file 2.docx', 'bwa --file 3.docx']将所有命令重置（删除所有参数）c=MyCommand()c.clear()更改参数前面的前缀有些软件中，可能参数名前面不是-、--，比如某些参数名并不是双短线跟着长参数名，而是短短线跟着长参数名，如-file test.docx。可以在继承的类中通过添加long_dash来声明长参数名的前缀，short_dash来声明短参数名的前缀。fromcommandflowimportCommandclassMyCommand(Command):long_dash='-'short_dash='-'exe='bwa'后台任务c.nohup(nohup=True,nohup_log=False)c.input('apple.docx')print(c.command)# nohup bwa --file apple.docx >/dev/null 2>&1
Package: command-injection-tester
Command Injection TesterThecommand-injection-testerscript allows for straightforward testing of email servers for the STARTTLS command injection vulnerability in SMTP, POP3, and IMAP.UsageThe commandpython3 command-injection-tester --imap --pop3 --smtp <hostname>tests<hostname>for the command injection in IMAP, POP3, and SMTP.Parameters--help(-h): Print help message.--imap: Use the IMAP protocol--pop3: Use the POP3 protocol--smtp: Use the SMTP protocol--imap-port(-i): IMAP port to check (default: 143)--pop3-port(-p): POP3 port to check (default: 110)--smtp-port(-s): SMTP port to check (default: 587)--quiet(-q): Be less verbose--timeout(-t): Timeout in seconds to use for network sockets. Increase in case of problems (default: 2)--logdir(-l): Path to log directory (default:./logs)Example:The Command Injection Tester can best be tested using theFake Mail Server:Start theFake Mail Server:$sudo./fake_mail_serversetupRun this script against the server:$python3command-injection-tester--imap--pop3--smtplocalhostSince the Fake Mail Server is intentionally vulnerable against the command injection, you should seeCommand injection here!after every protocol test.Testing live servers should be just as easy. If connections keep timing out/the sanity test keeps failing, try increasing the timeout using the--timeoutparameter.BackgroundThis tool was published as part of our research on security vulnerabilities in STARTTLS:https://nostarttls.secvuln.info/
Package: commandintegrator
commandintegratorWhat it doesCommandIntegrator is a lightweight framework and API for creating apps controlled with human language interfaces.
It concists of base classes and ready-to-use objects along with a set and clear structure for how to develop and scale a chat bot / Virtual assistant.Objects such as theFeature, which can be thought of a micro service within your app, makes it easier to keep the OOP structure clean and well maintained. Automatic command parsing with theCommandParserandCommandProcessormakes it very  straight forward to build and scale your command-controlled application without having to worry about name and word collisions, edge-case actions etcetera.Objects and wrappers for more effective and easier developmentcommandintegrator exists for one reason: To make development of language-driven apps easier.  Decorator wrappers for automated logging, scheduling of function execution, caching objects and API DAO's are a few that are included in the package.You can build the backend of your virtual assistant / chatbot with the tools and structures of commandintegrator and use it in your chatbot for whichever platform you want to use. commandintegrator is platform independent and can be used even with a simple command-line app as demonstrated below.ExampleHere's a short example of how to create a virtual assistant that tells you what time it is.
For a more comprehensive example, please read thedemo_feature.pyfilehereimportcommandintegratorasciimporttimefrompprintimportpprintclassClockFeature(ci.FeatureBase):def__init__(self,*args,**kwargs):super().__init__(self,*args,**kwargs)self.command_parser=ci.CommandParser()# Defines which keywords that this Feature identifies with initiallyself.command_parser.keywords=('what')# The Callback object is a more intricate and well defined way of# binding a sentence / sequence of words to a function.self.command_parser.callbacks=ci.Callback(lead='time',trail=('is','it'),func=self.get_time)@ci.logger.loggedmethoddefget_time(self):ci.logger.log(message="Manual log entry here",level="info")returnf'The time is{time.strftime("%H:%M")}.'if__name__=='__main__':processor=ci.CommandProcessor()processor.features=(ClockFeature(),)msg=ci.Message()whileTrue:msg.content=input("-> ")response=processor.process(msg)print("\n-> Response received:\n")pprint(f"\t{response.__dict__}")print("\n-> Bot said: ",response.response(),"\n")
Package: command-known-as-dan
AboutCommand is a simple framework for handling command execution within your Python application.Note:This is aJavascript => Pythonport ofhttps://github.com/known-as-dan/command-npmUsageRecreating the common "echo" command using Command & Python:fromcommandimportcommanddefecho(args):separator=" "message=separator.join(args)print(message)command.Command("echo","<message>","Prints out a message.",echo)command.init()
Package: commandlet
# commandletWerkzeug-style commands.## Usage```from commandlet.parser import Parserp = Parser()@p.command('test', 'test <int:times> <str:string>')def do_test(times, string):"""Test a certain number of times."""for n in range(times):print('[%d]: %s' % (n, string))p.handle_command('test 4 Hello world.')```As you can see, you can decorate functions with the Parser.command decorator to make them callable. They should all be given a name (used for pretty-printing mainly), and an argument string, which looks very similar to those seen in command line programs... And [Werkzeug](https://palletsprojects.com/p/werkzeug/).You can also add extra filters:```@p.filter('reverse')def do_reverse(text):return (text, ''.join(reversed(text)))@p.command('reverse', 'reverse <reverse:string>')def reverse_command(string):original, new = stringprint('Reversing %r gives %r.' % (original, new))```You can see the full list of filters by examining the Parser.filters dictionary. By default, str, int, and float are supported.
Package: commandlib
CommandLib is a pythonic wrapper around subprocess that lets you pass around command objects
and daisy-chain:ArgumentsPathsOther environment variablesRuntime directoryOther runtime properties (run in shell, conceal stdout/stderr, ignore error codes, etc.)It is somewhat inspired by amoffat’s sh, Kenneth Reitz’s requests, jaraco’s path.py
and SQLAlchemy.To install:$pipinstallcommandlibExample:>>>fromcommandlibimportCommand>>>ls=Command("ls")>>>ls("-t").in_dir("/").with_shell().run()systmprundevprocetcbootsbinrootvmlinuzinitrd.imgbinliboptvmlinuz.oldinitrd.img.oldmediahomecdromlost+foundvarsrvusrmntCommandPath example:>>>fromcommandlibimportCommandPath>>>bin=CommandPath("/bin")>>>bin.ls("-t").in_dir("/").run()systmprundevprocetcbootsbinrootvmlinuzinitrd.imgbinliboptvmlinuz.oldinitrd.img.oldmediahomecdromlost+foundvarsrvusrmntAPI>>>fromcommandlibimportCommand,run# Create command object>>>py=Command("/usr/bin/python")# Run with *additional* environment variable PYTHONPATH (*added* to global environment when command is run)>>>py=py.with_env(PYTHONPATH="/home/user/pythondirectory")# Run with additional path (appended to existing PATH environment variable when command is run)>>>py=py.with_path("/home/user/bin")# Run in specified directory (default is current directory)>>>py=py.in_dir("/home/user/mydir")# Run in shell>>>py=py.with_shell()# Suppress stderr>>>py=py.silently()# Suppress stdout and stderr# Finally run command explicitly with all of the above>>>run(py)>>>py.run()# alternative syntaxWhy?Commandlib is a library to make it easier to pass around immutable (sort of) command objects between different
modules and classes and incrementally modify the command’s behavior in a readable way - adding environment
variables, paths, etc.call, check_call and Popen do not have the friendliest of APIs and code that uses them a lot can get ugly fast.sh does a similar thing but has a lot of magic (e.g. overriding import).envoy and sarge are more focused on chaining commands rather than arguments, environment variables, etc.Advanced APIAdd trailing arguments:>>>fromcommandlibimportCommand,run>>>manage=Command("/usr/bin/python","manage.py").with_trailing_arguments("--settings","local_settings.py").in_dir("projectdir")>>>run(manage("runserver"))[Runs"/usr/bin/python manage.py runserver --settings local_settings.py"insideprojectdir]Dynamically generate command bundles from directories with executables in them:>>>fromcommandlibimportCommandPath,Command,run>>>postgres94=CommandPath("/usr/lib/postgresql/9.4/bin/")>>>run(postgres94.postgres)[Runspostgres]>>>run(postgres94.createdb)[Runscreatedb]Use with path.py (or any other library where str(object) resolves to a string:>>>frompathimportPath>>>postgres94=CommandPath(Path("/usr/lib/postgresql/9.4/bin/"))>>>run(postgres94.postgres)
Package: commandline
Command Line Interface HelperThis is a helper module for making intuitive command line programs with
zero effort. It takes a function signature like:example_function(string1, string2='something', string3='something else')and turns it into a simple command-line app with usage:example_program string1 [string2 [string3]]All you have to do is:if __name__ == "__main__":
   import commandline
   commandline.run_as_main(example_function)LimitationsNote that it currently can’t print help information for arguments other than
their default values, but it will print your docstring for you if that’s of
any use.Help for arguments will probably come with python3000’s function annotations.http://www.python.org/dev/peps/pep-3107/Argument types are inferred from the default arguments.
Currently supported are: int, float, bool, str, commandline.ChoiceIf things don’t have a default argument, I can’t infer the type so assume str.>>> import commandline
>>> commandline.TESTMODE=1
>>> def test1(arg1=1, arg2=2, arg3=3):
...     print [arg1, arg2, arg3]
...
>>> commandline.run_as_main(test1, [])
[1, 2, 3]
>>> commandline.run_as_main(test1, ['6'])
[6, 2, 3]
>>> commandline.run_as_main(test1, ['--arg1=6', '--arg2=7', '--arg3=8'])
[6, 7, 8]
>>> commandline.run_as_main(test1, ['6', '7', '8'])
[6, 7, 8]>>> commandline.run_as_main(test1, ['6', '7', '8', '9'], 'test.py')
Usage: test.py [arg1 [arg2 [arg3]]] [Options]
<BLANKLINE>
(Please put options last, and no more args than shown.)
Unexpected argument(s): 9>>> commandline.run_as_main(test1, ['--arg1=6', '7', '8'], 'test.py')
Usage: test.py [arg1 [arg2 [arg3]]] [Options]
<BLANKLINE>
(Please put options last, and no more args than shown.)
Unexpected argument(s): 7, 8>>> def test2(arg1=1, arg2=2, arg3=3):
...     return [arg1, arg2, arg3]
...
>>> commandline.run_as_main(test2, ['6', '7', '8'])
[6, 7, 8]>>> def nodefault(arg1, arg2, arg3):
...     return [arg1, arg2, arg3]
>>> # If we have no default arguments, we assume you want strings:
>>> commandline.run_as_main(nodefault, ['6', '7', '8'])
['6', '7', '8']
>>> commandline.run_as_main(nodefault, [], 'test.py')
Usage: test.py arg1 arg2 arg3 [Options]
<BLANKLINE>
The following compulsory arguments are missing: arg1, arg2, arg3
Package: command-line-file-manager
command-line-file-managerPython CLI tool for scanning and organizing local directories and files.Requires Python 3.11+InstallationVia pip:$pipinstallcommand-line-file-managerFrom main branch:$gitclonehttps://github.com/Mithras11/command-line-file-manager.git$cdcommand-line-file-manager$pipinstall.ExampleTo run the application typefmfollowed by a sub-command, target directory and options$fmscan-files../test--sort=type--save--output=./Add --help after thefmcommand or any of the subcommands to get more information$fmscan-files--helpUsage: fm scan-files [OPTIONS] DIR_PATHDIR_PATH: Path to directory to be scannedOptions:--sort [name|size|date|modified|type]   Sorting criteria.  [default: name]--desc                                  Display result in descending order.-s, --save                              Save log message to file.-o, --output TEXT                       Path to output directory for the saved log file.--help                                  Show this message and exit.
Package: command_line_input
This module defines several general-purpose functions:- The functions `get_bool`, `get_int`, `get_float`, and `get_str` facilitate thereading interactive input from the command line, with type checks and optionalvalue checks on the user input.  (The Python Standard Library provides a ratherminimal capability for reading command-line input).- The function `make_check` generates a function as its output; the generatedfunction tests a value against an arbitrary condition, and can be passed to anyof the above command-line input functions.- The function `str2int` converts a string to an integer, with somewhat moreflexible rules for input formatting than those imposed by Python's `int`function.
Package: command-line-loom
Command Line LoomCommand Line Loom is a Python command-line tool for generating text using OpenAI's GPT-3 and other models. It includes a modular model system that allows for easy integration of new models and customization of existing ones.Includes templates, look in theTurbo Text Transformer Promptsrepository for more documentation and to find a list of the templates!InstallationTo install Command Line Loom, you can use pip:pipinstallcommand-line-loomor clone the repository and install it manually:gitclonehttps://github.com/fergusfettes/command-line-loom.gitcdcommand-line-loom
poetryinstallUsageShould be self-documenting in the interface. Just type 'help'.Some node manipulation:vidWatch this for more advanced usage:vid.ConfigurationBefore using Command Line Loom, you need to set up a configuration file. This should happen automatically when you run thecllcommand for the first time.This will create a configuration file in your home directory. See the documentation for each model to learn how to obtain an API key.api_key: sk-<your api key here>
engine_params:
  frequency_penalty: 0
  logprobs: null
  max_tokens: 1000
  model: davinci
  n: 4
  presence_penalty: 0
  stop: null
  temperature: 0.9
  top_p: 1
models:
- babbage
- davinci
- gpt-3.5-turbo-0301
- text-davinci-003
etc.ContributingIf you find a bug or would like to contribute to Command Line Loom, please create a new GitHub issue or pull request.Inspiration/SimilarInspired byLoom.LicenseCommand Line Loom is released under the MIT License. SeeLICENSEfor more information.