Skip to content

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

Notifications You must be signed in to change notification settings

rossmc/ai-assistant

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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 -g .
    # or
    sudo npm install -g .

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

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

About

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

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published