AI for CLI
Project description
CLI-Agent
Talk to cli-agent and it will help you to write bash code to solve your problem.
Installation
pip install cli-agent
Configuration
- Set the default model to use.
Based on Litellm , so most of the models are supported (https://github.com/BerriAI/litellm)
cli config default_model <model_name>
- Set the default ask user behavior, when code is about to run it asks user if he wants to run it or not
- always # ask user always
- never # ask user never
- sometimes # ask user when llms suggests to ask
cli config ask_user <always|never|sometimes>
- Set the retry if generation fails
cli config retry_generation <number>
Usage
Commands:
cli : main cli command ci : direct chat with cli
- Make call through the cli command
cli run 'kill the chrome' --model cerebras/llama3.1-70b
or
ci 'convert this.mp4 to 720p and remove the audio'
- If error happens, you can fix it with the following command.
Error-report takes account of the last command it executed, so it will fix the error with the last command
ci ' also flip the video' --model openai/gpt-3.5-turbo --error-report
command line interface
$ cli --help
Usage: cli [OPTIONS] COMMAND [ARGS]...
CLI AI: Natural Language Command Line Interface
Options:
--help Show this message and exit.
Commands:
config View or set configuration values
run Run the main CLI AI application
$ cli run --help
Usage: cli run [OPTIONS] [USER_INPUT]...
Run the main CLI AI application
Options:
--n-hist INTEGER Number of history items to consider
--model TEXT Model name to use
-er, --error-report BOOLEAN Fix the last error with current modifications
--help Show this message and exit.
Recommended models
- cerebras (https://github.com/cerebras) #fastest model inference in the world on llama3.1-70b
- groq (https://github.com/simonw/groq) # 2nd Fastest model inference
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
cli_agent-0.1.3.tar.gz
(18.3 kB
view hashes)
Built Distribution
cli_agent-0.1.3-py3-none-any.whl
(25.7 kB
view hashes)
Close
Hashes for cli_agent-0.1.3-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d8c2e3ad8857c4a5a9db1c4825b2ee4e4f3cd4707144834d00a5d8a581a786f1 |
|
MD5 | 05c85eac3fb2d337e702bf34ccd33408 |
|
BLAKE2b-256 | 56345ada6e9f31ee02467143f5c96f503a2f3a5ef2d50f46bc707c22c8407fe3 |