AI for CLI
Project description
Natural Language CLI
cli-ai
Installation
pip install cli-ai
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' --model openai/gpt-3.5-turbo
- 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.2.tar.gz
(18.0 kB
view hashes)
Built Distribution
cli_agent-0.1.2-py3-none-any.whl
(25.2 kB
view hashes)
Close
Hashes for cli_agent-0.1.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5e81910da5e23276f8a97b96ffd591fd4053ab039e63ef99df7d2788eb87e23b |
|
MD5 | a30663f9230d1173894dfefd84532a7b |
|
BLAKE2b-256 | 69b18bfe90d0941a155e08d5f82ff5d20e30c4f936ff0653e028a36272c998f4 |