ask-ai-cli

command module
v0.1.5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 21, 2022 License: MIT Imports: 1 Imported by: 0

README

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

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
pkg
config
Package config is a wrapper around viper that provides a consistent way to access configuration values.
Package config is a wrapper around viper that provides a consistent way to access configuration values.
config/flags
Package flags provides a wrapper around pflag that provides a consistent way to access configuration values.
Package flags provides a wrapper around pflag that provides a consistent way to access configuration values.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL