llm-cli
Need to Google that command you can't quite remember? Use a Large Language Model instead!
- Leverages a LLM to generate the command line instruction you want to execute
- Just describe what you want to do and the LLM will generate the commands for you.
- You can be vague, you will be prompted for parameter details (file and folder names, branches, commit messages etc)
Installation
Make sure you have crystal lang installed to build the project
git clone https://github.com/stakach/llm-cli.git
cd llm-cli
shards build
cp ./bin/llm /bin/llm
You'll then need to configure a LLM, currently only OpenAPI is implemented. You can add it to your dotfiles.
vi ~/.bashrc
# then add your OpenAPI Key
export OPENAI_API_KEY=sk-123456
# optionally you can specify your preferred model
export LLM_MODEL=gpt-3.5-turbo
Usage
Pass the description to the llm
executable
llm the description of the command you want to run
# ..
llm I want to do this then do this. Then do this
Execute a query and have the response returned on the command line
llm -q are there any warm blooded reptiles?
you can specify your model preference using -m gpt-3.5-turbo
(as will default to gpt-4
if you have API access to it)
If you would like to verbose details use the -v
flag
Contributing
- Fork it (https://github.com/stakach/llm-cli/fork)
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create a new Pull Request
Contributors
- Stephen von Takach - creator and maintainer