cli-ai-assistant
v1.1.12
Published
A simple CLI AI assistant using OpenAI's API.
Maintainers
Readme
CLI AI Assistant
A simple command-line AI assistant using OpenAI's API.
Features
- Ask questions and get answers from OpenAI models directly in your terminal
- Keeps a log of interactions
- Supports error reporting via GitHub issues
- Multi model support
- Command running without leaving interface
- Last command and the output passed to AI
Installation
Install with NPM
- Check you are use the latest version of Node
- If not download the latest version
- Download the
cli-ai-assistantpackage
npm install -g cli-ai-assistant- Add .env file
export OPENAI_API_KEY=yourapikeyhereIf you don't have OpenAI API key, check this Benedek553/openai-api-free
Install manually
- Clone the repo
git clone https://github.com/Benedek553/cli-ai-assistant.git
cd cli-ai-assistant- Create a run.sh script, like this:
#!/bin/bash
node /usr/local/lib/node_modules/cli-ai-assistant/index.js- Add to /usr/local/bin
- Export API key
export OPENAI_API_KEY=yourapikeyhereIf you don't have OpenAI API key, check this Benedek553/openai-api-free
Usage
After a global install the cli-ai-assistant command will be available.
Then start the assistant with:
cli-ai-assistantYou will see:
Hello, how can I help you?
Please enter your question or command:
>Type your question and press Enter.
Commands
/exit— Exit the assistant/error-report— Open the GitHub issues page for bug reporting
Logging
All interactions are logged to app.log in the project directory.
License
This project is licensed under the Apache License 2.0.
Contributing
Feel free to open issues or submit pull requests on GitHub.
