Git Product home page Git Product logo

ai-cli's Introduction

GPT3 Powered CLI

Oclif npm npm Hacker News

image

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.


Add autocomplete by running ai autocomplete and follow the instructions. It's super easy.

__

Liked this project? Checkout my other side project. SlidesAI.io - AI Presentation Maker

__

Auto generated documentation

Usage

$ npm install -g @abhagsain/ai-cli
$ ai COMMAND
running command...
$ ai (--version)
@abhagsain/ai-cli/1.2.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 autocomplete [SHELL]

display autocomplete installation instructions

USAGE
  $ ai autocomplete [SHELL] [-r]

ARGUMENTS
  SHELL  shell type

FLAGS
  -r, --refresh-cache  Refresh cache (ignores displaying instructions)

DESCRIPTION
  display autocomplete installation instructions

EXAMPLES
  $ ai autocomplete

  $ ai autocomplete bash

  $ ai autocomplete zsh

  $ ai autocomplete --refresh-cache

See code: @oclif/plugin-autocomplete

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

ai model

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

USAGE
  $ ai model

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

EXAMPLES
  $ ai model (Follow the prompt)

See code: dist/commands/model.ts

ai update [CHANNEL]

update the ai CLI

USAGE
  $ ai update [CHANNEL] [-a] [-v <value> | -i] [--force]

FLAGS
  -a, --available        Install a specific version.
  -i, --interactive      Interactively select version to install. This is ignored if a channel is provided.
  -v, --version=<value>  Install a specific version.
  --force                Force a re-download of the requested version.

DESCRIPTION
  update the ai CLI

EXAMPLES
  Update to the stable channel:

    $ ai update stable

  Update to a specific version:

    $ ai update --version 1.0.0

  Interactively select version:

    $ ai update --interactive

  See available versions:

    $ ai update --available

See code: @oclif/plugin-update

ai-cli's People

Contributors

abhagsain avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.