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.4.tar.gz
(18.3 kB
view details)
Built Distribution
cli_agent-0.1.4-py3-none-any.whl
(25.7 kB
view details)
File details
Details for the file cli_agent-0.1.4.tar.gz
.
File metadata
- Download URL: cli_agent-0.1.4.tar.gz
- Upload date:
- Size: 18.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.2 CPython/3.12.2 Linux/6.8.0-44-generic
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | a26ceeb0191acfb19e4852887f3ef9d0602c401edbc99ad5f5f386cd6c86225e |
|
MD5 | df39491003b05976550723e0ce2373a2 |
|
BLAKE2b-256 | a121aeb9d0e1a5aeb783802039c6979efd77a5fadfd10674d44e213420c0fbf3 |
File details
Details for the file cli_agent-0.1.4-py3-none-any.whl
.
File metadata
- Download URL: cli_agent-0.1.4-py3-none-any.whl
- Upload date:
- Size: 25.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.2 CPython/3.12.2 Linux/6.8.0-44-generic
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6275f29aa6722dc3141565de6175c5bec75b9fbac41f5d3576a37bf5e2eca9bf |
|
MD5 | 4e3cf881793cb4510e0c4eda7024e0a4 |
|
BLAKE2b-256 | 740e511af35ccac05884700eb0fc9aed4cb74f654726d2533f7178656e828000 |