Get answers for CLI commands from GPT3 right from your terminal
Go to file
Anurag Bhagsain 185507403f v1.1.3
2022-12-04 17:41:02 +05:30
.github refactor: 🛠️ update README.md and remove ci workflows 2022-11-16 12:16:14 +05:30
.vscode feat: add gpt3 2022-11-07 09:50:04 +05:30
bin feat: add gpt3 2022-11-07 09:50:04 +05:30
src refactor: ⚒️ using prompt conditionally 2022-12-04 17:35:11 +05:30
.editorconfig feat: add gpt3 2022-11-07 09:50:04 +05:30
.eslintignore feat: add gpt3 2022-11-07 09:50:04 +05:30
.eslintrc feat: add gpt3 2022-11-07 09:50:04 +05:30
.gitignore refactor: 🛠️ generate package-lock.json for CI 2022-11-16 11:27:11 +05:30
.mocharc.json feat: add gpt3 2022-11-07 09:50:04 +05:30
LICENSE refactor: 🛠️ add publishConfig & license 2022-11-16 01:22:21 +05:30
package-lock.json refactor: ⚒️ using prompt conditionally 2022-12-04 17:35:11 +05:30
package.json v1.1.3 2022-12-04 17:41:02 +05:30
README.md v1.1.3 2022-12-04 17:41:02 +05:30
tsconfig.json feat: add gpt3 2022-11-07 09:50:04 +05:30

GPT3 Powered CLI

Get answers for CLI commands from GPT3 right from your terminal

image

oclif Version Downloads/week

👋 Hey, If you're someone who spends most of their time on CLI, please spare 1 minute to fill out this form. We'd really appreciate it. https://tally.so/r/wLDXYl

Installation

You'd need to install it globally

npm i @abhagsain/ai-cli -g

Usage

$ ai 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.

Auto generated documentation

Usage

$ npm install -g @abhagsain/ai-cli
$ ai COMMAND
running command...
$ ai (--version)
@abhagsain/ai-cli/1.1.3 darwin-x64 node-v14.18.3
$ ai --help [COMMAND]
USAGE
  $ ai COMMAND
...

Commands

ai ask [question]

Ask question to GPT3 from your terminal

USAGE
  $ ai ask [question]

ARGUMENTS
  QUESTION  Your question

DESCRIPTION
  Ask question to GPT3 from your terminal

EXAMPLES
  $ ai ask "Check running process on port 3000"

See code: dist/commands/ask.ts

ai auth

Update existing or add new OpenAI API Key

USAGE
  $ ai auth

DESCRIPTION
  Update existing or add new OpenAI API Key

EXAMPLES
  $ ai auth (Follow the prompt)

See code: dist/commands/auth.ts

ai help [COMMAND]

Display help for ai.

USAGE
  $ ai help [COMMAND] [-n]

ARGUMENTS
  COMMAND  Command to show help for.

FLAGS
  -n, --nested-commands  Include all nested commands in the output.

DESCRIPTION
  Display help for ai.

See code: @oclif/plugin-help