Skip to content

jo-hoe/ai-cli-assistant

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

AI CLI Assistant

Go Reference Test Status Coverage Status Lint Status CodeQL Status Go Report Card

Provides CLI commands based on natural language using GenAI. The tool is platform and cli independent (works on Mac, Windows, and Linux).

Demo

Prerequisites

  • have an OpenAI API key
  • install golang
  • build the binary by navigating into this folder and executing
go build .

or by defining your customer binary name via

go build -o <your desired program name>

Execution

Set your OpenAI API key as environment variable OPENAI_API_KEY. You may set it in powershell via this command:

$Env:OPENAI_API_KEY = "sk-w0Ak...."

You can either define the available cli tools or environment in the prompt or set optionally it via the CLI_KIND.

$Env:CLI_KIND = "powershell"

Execute the program by running

.\<your program name> list all folder in this folder`

Cost

I currently pay ~0.01 cent for 20 commands. Although your results may vary, there is a max token limit (256) set in the tool to ensure you do not overspend. In addition you can set monthly max spending limits in the OpenAI website.

Releases

No releases published

Packages

No packages published

Languages