Skip to content

jack482653/command-ai

Repository files navigation

command-ai

Build Binary Publish to NPM npm version

image

command-ai is a command-line interface application that uses OpenAI's language models to generate text based on user input.

This document is generated by ChatGPT :P .

Installation

Install from npm

To install command-ai from npm, run the following command:

npm install -g @5x/command-ai

Download Binary

Alternatively, you can download pre-built binaries for Linux, macOS, and Windows from the GitHub releases page.

Usage

command-ai can be used in the following ways:

To add an access token to the configuration file, run:

command-ai --add-token <token>

To send a prompt and return the generated text, run:

command-ai --prompt "Hello, how are you?"

To get today fate of the developer (?), run:

command-ai --fate

Result:

CleanShot 2023-02-25 at 20 35 35@2x

To remove an access token from the configuration file, run:

openai --remove-token

Configuration

Access tokens are stored in a configuration file located at ~/.command-ai-config.json.

Dependencies

command-ai has the following dependencies:

  • commander
  • openai

License

This project is licensed under the MIT License. See the LICENSE file for details.