Warning
This project is still in development and is not ready for use.
AICO is an AI-powered console application that supports multiple AI providers including OpenAI's GPT models and Anthropic's Claude models. It provides both interactive REPL and batch processing modes, along with advanced features like chat session management and Vim plugin integration.
Pre-built binaries are available for macOS and Linux from the GitHub Releases page.
Note: Windows binaries are not provided as we don't have a Windows testing environment. Windows users should build from source.
- Go to the releases page
- Download the appropriate binary for your platform
- Extract and place the binary in your PATH
To build from source, you'll need to install Go.
Make sure you have Go version 1.20 or higher installed on your system.
You can check the installed version by running go version
.
If you do not have Go installed or your version is outdated, download and install it from the Go website.
Once you have Go installed, follow these steps to install AICO:
- Clone the repository:
git clone https://github.com/micheam/ai-assistant-console.git
- Navigate to the project directory:
cd ai-assistant-console
- Build the executable binary by running
make
:This will create a binary executable in themake
bin/
directory.
Now, you can use commands as described in the Usage section.
AICO supports multiple AI providers. You'll need to set up API keys for the providers you want to use:
To use OpenAI models (GPT-4, GPT-4o, etc.), you need an OpenAI API key. You can get an API key from the OpenAI API Keys page.
export OPENAI_API_KEY=<your OpenAI API key>
To use Anthropic Claude models, you need an Anthropic API key. You can get an API key from Anthropic Console.
export ANTHROPIC_API_KEY=<your Anthropic API key>
After installation, you can use the chat
command to interact with AI assistants.
NAME:
chat - AI Assistant Console
USAGE:
chat [global options] [command [command options]]
COMMANDS:
models Show the available models
repl Start a chat session in a REPL
send Send a message to the AI assistant
session Manage chat sessions
config Manage the configuration for the AI assistant
help, h Shows a list of commands or help for one command
GLOBAL OPTIONS:
--help, -h show help
--version, -v print the version
To start an interactive chat session, use the repl
subcommand:
$ chat repl
In REPL mode, you can have interactive conversations with AI assistants.
To see all available models, use the models
command:
$ chat models
To send a single message to AI, use the send
subcommand:
$ chat send "Translate into English: こんにちは、世界。"
Hello, world.
AICO now supports chat session management. You can:
- List sessions:
chat session list
- Show a session:
chat session show <session-id>
- Delete a session:
chat session delete <session-id>
- Prepare an empty session:
chat session prepare
Sessions can be exported in multiple formats including markdown, JSON, and plain text.
AICO can be used as a Vim plugin to generate text in Vim buffers. Please see the Vim plugin documentation for more information.
OPENAI_API_KEY
: Your OpenAI API key for accessing GPT modelsANTHROPIC_API_KEY
: Your Anthropic API key for accessing Claude models
To contribute to AICO development, clone this repository and make the desired code changes. Before submitting your changes, ensure the following:
- All tests pass by running
make test
- The code formatting is consistent and adheres to Go standards
The AICO project is released under the MIT License.