A beautiful, professional, and feature-rich command-line interface for chatting with Cohere AI models.
- 🌈 Stunning UI: Gradient text, ASCII art, boxed responses, and colorful tables
- ⚡ Direct API integration: Uses fetch with Cohere endpoints
- 🤖 Supports both chat and generate APIs, with dynamic model selection
- 🔄 Interactive model menu and direct model switching (
modelandmodel:<id>) - 📊 Token usage and session statistics
- 📋 Markdown rendering, code highlighting, and citation tables
- ⚙️ Adjustable parameters: temperature, max tokens, session settings
- 💬 Chat history management (
history:on/off,clear) - 📝 Create files from detected code blocks in responses
- 🛠️ CommonJS compatible (Node.js v14+), global install support
Install globally via npm:
npm i -g cohere-cliYou can now run the CLI anywhere using:
cohereSet your Cohere API key as an environment variable (example for Windows PowerShell):
$env:COHERE_API_KEY = "your_api_key_here"-k, --api-key <key>Cohere API key (overrides env variable)-m, --model <model>Specify model to use-t, --temperature <temp>Set temperature (0-1)-s, --single-messageSend a single message and exit--no-historyDon't include chat history in requests--max-tokens <number>Maximum tokens for response
helpShow available commandsclearClear chat historymodelInteractive model selectionmodel:<id>Switch to a specific modeltemp:<value>Set temperature (0-1)tokens:<value>Set max token limithistory:on/offEnable/disable chat historysettingsShow current settingsexitExit the CLI
If the Cohere response contains code blocks, the CLI will prompt you to create files from them. You can confirm, edit filenames, and the files will be saved in your working directory.
Visit https://dashboard.cohere.ai/api-keys to get your API key.
- Node.js v14 or higher
- CommonJS modules (not ESM)
- Tested on Windows
MIT
