/ai-cli-core

Get answers for CLI commands from GPT3 right from your terminal

Primary LanguageC#GNU General Public License v3.0GPL-3.0

Dotnet GPT3 Powered CLI

GitHub stars Commit Date GitHub license

NuGet NuGet Downloads

This project is the .NET version of ai-cli project.

Get started

Install .NET 7 or newer and run this command:

$ dotnet tool install --global dotnet-ai-core

Usage

$ dotnet-ai-core ask "Check process running on port"

You'd need to enter your own OpenAI API key Here's how you can get one

  1. Go to https://openai.com/api/login
  2. Create an account or log into your existing account
  3. Go to https://beta.openai.com/account/api-keys or image
  4. Run ai auth, enter your API KEY and you're good to go!

Pricing

The current prompt length is ~840 tokens and the pricing for text-davinci-002 is $0.02 for 1K tokens which is ~$0.017/command. We'll see if we can improve the response as well as reduce the per-command-cost with fine-tuning.

Usage

$ dotnet tool install --global dotnet-ai-core
$ dotnet-ai-core
...

Commands

dotnet-ai-core ask [question]

Ask question to GPT3 from your terminal

USAGE
  $ dotnet-ai-core ask [question]

ARGUMENTS
  QUESTION  Your question

DESCRIPTION
  Ask question to GPT3 from your terminal

EXAMPLES
  $ dotnet-ai-core ask "Check running process on port 3000"

dotnet-ai-core auth

Update existing or add new OpenAI API Key

USAGE
  $ dotnet-ai-core auth

DESCRIPTION
  Update existing or add new OpenAI API Key

EXAMPLES
  $ dotnet-ai-core auth (Follow the prompt)

dotnet-ai-core model

Change model preference (default: text-davinci-003)

USAGE
  $ dotnet-ai-core model

DESCRIPTION
  Change model preference (default: text-davinci-003)

EXAMPLES
  $ dotnet-ai-core model (Follow the prompt)