Skip to content

TomaszDomagala/ask-ai-cli

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

aai - ask ai cli

A command line tool that helps you find a command you need. It uses AI to suggest a command based on your query.

It is advised not to use the suggestions blindly, but rather to read the documentation and understand what the command does before running it.

OpenAI is the only provider currently supported.

Usage examples

$ aai "kill process at port 8080"
kill $(lsof -t -i:8080)
$ aai "find all yaml files in subdirs"
find . -name "*.yaml"

Getting started

Install:

Brew tap

aai can be installed with homebrew using

brew tap TomaszDomagala/ask-ai-cli
brew install aai

Release

Download the latest release here.

From source

git clone git@github.com:TomaszDomagala/ask-ai-cli.git
cd ask-ai-cli
make build

Setup

aai will search for config.yaml file in the following locations: /etc/aai/, $HOME/.aai/, .. Before using it, we need to create the config file.

Set the OpenAI API key (you can get one here) and create the file in the $HOME/.aai/ directory.

aai config set --file $HOME/.aai/config.yaml --openai-apikey sk-XXX

You can permanently set OpenAI request options with flags, for example, you can change the model that is used to generate suggestions.

aai config set --openai-model code-davinci-002

About

Copilot but for the command line

Resources

License

Stars

Watchers

Forks

Packages

No packages published