Skip to content

Latest commit

 

History

History
52 lines (42 loc) · 1.43 KB

File metadata and controls

52 lines (42 loc) · 1.43 KB

General

A custom CLI AI assistant made in Node.js with the OpenAI API.

Installation & Usage

  1. Create an OpenAI account or sign in.

  2. Navigate to the API key page and "Create new secret key".

  3. Create an .env file in the root directory:

    cp .env.example .env
  4. Add your OpenAI API key to the .env file. Review/change other settings as needed.

  5. Install dependencies and run the CLI:

    npm install

    To use the CLI:

    node index.js
  6. To install and use the CLI globally:

    npm install
    
    npm install -g .
    # or
    sudo npm install -g .

    Then run the tool in your terminal from anywhere with the ask command.

Removing Globally

If you installed the CLI globally, run the following command to remove it from your system:

npm uninstall -g @rossmc/ai-assistant

Chat History

Chat history is saved to the ./history directory. Each conversation is saved in a separate file. The file name is the date and time the conversation ended.

The last text chat is automatically loaded when the CLI is started. To start a new chat, use the --new or -n flag:

ask -n

To clear the chat history, delete all files in the history directory.

ask -d