llm-cli

Need to Google that command you can't quite remember? Use a Large Language Model instead!

example

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

  1. Fork it (https://github.com/stakach/llm-cli/fork)
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create a new Pull Request

Contributors