https://github.com/itsdarik/chai
Chat with AI in the terminal
https://github.com/itsdarik/chai
ai anthropic chai chat chatgpt claude cli codestral gemini genai google gpt grok llm mistral ollama openai terminal xai
Last synced: 2 months ago
JSON representation
Chat with AI in the terminal
- Host: GitHub
- URL: https://github.com/itsdarik/chai
- Owner: itsdarik
- License: apache-2.0
- Created: 2025-03-20T02:38:45.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2025-05-31T17:37:17.000Z (about 1 year ago)
- Last Synced: 2025-10-28T08:47:57.423Z (8 months ago)
- Topics: ai, anthropic, chai, chat, chatgpt, claude, cli, codestral, gemini, genai, google, gpt, grok, llm, mistral, ollama, openai, terminal, xai
- Language: Python
- Homepage:
- Size: 41 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# chai
Chat with AI in the terminal.
## Supported Providers
- Anthropic
- Google
- Mistral
- OpenAI
- xAI
## Why `chai`?
### Compared to Official Apps and Websites
- **Unlimited Usage**: No message limits for premium models (pay-as-you-go).
- **Cost-Effective**: Less expensive than premium subscriptions for light use.
- **Seamless Access**: No login required after setting up your API key(s).
- **Unified Interface**: Access multiple providers and models from a single interface.
- **Enhanced Privacy**:
- Paid API tiers typically don't train on your data (check provider privacy policies).
- All chat history is stored locally on your device.
### Compared to Local LLMs like `ollama`
- **State of the Art Models**: Access full, non-distilled, flagship models.
- **No Model Downloads**: No need to download models and keep them up-to-date.
- **No Hardware Investment**: No need to buy expensive hardware.
## Usage
1. Set your API key(s):
```sh
# Anthropic
export ANTHROPIC_API_KEY='your-anthropic-api-key'
# Google
export GOOGLE_API_KEY='your-google-api-key'
# Mistral
export MISTRAL_API_KEY='your-mistral-api-key'
# OpenAI
export OPENAI_API_KEY='your-openai-api-key'
# xAI
export XAI_API_KEY='your-xai-api-key'
```
2. [Install or update `uv`](https://github.com/astral-sh/uv?tab=readme-ov-file#installation).
3. Run `chai.py`:
```sh
uv run chai.py -h
```
Use `/?` or `/help` to print available commands.