Interactive AI command-line interface powered by OpenRouter
YOLO CLI is a terminal-based application that enables seamless interaction with multiple AI models through OpenRouter's unified API. Built with TypeScript and Ink framework, it provides a keyboard-driven interface where you can cycle through different AI models and maintain conversation context across sessions.
- 🤖 Multiple AI Models: Access to Kimi K2, MiniMax M2, GLM-4.6, and more through OpenRouter
- ⌨️ Model Switching: Cycle through models with Shift+Tab
- 💬 Interactive Chat: Real-time streaming responses
- 📝 Multi-line Input: Support for complex queries
- 💾 Multi-Session Support: Multiple independent conversations per directory with UUID-based session files
- ⚡ Slash Commands: Quick actions with
/clear,/new,/compact,/version,/help,/exit - 🔍 Smart Autocomplete: Intelligent completion for commands (
/) and file paths (@) - 🗜️ Conversation Compaction: AI-powered summarization to reduce token usage (20+ message threshold)
- 🔧 MCP Support: Automatic Model Context Protocol server loading for extended tool capabilities
- 🚀 Fast Setup: 2-minute first-run configuration
- 🎨 Terminal UI: Clean, keyboard-driven interface
- Node.js 18.0.0 or higher
- OpenRouter API key (Get one here)
npm install -g @0vv/yolo-cliOr use npx without installation:
npx @0vv/yolo-cli-
Launch YOLO CLI:
yolo
Or if using npx:
npx @0vv/yolo-cli
-
Enter your OpenRouter API key when prompted
-
Select models to enable
-
Start chatting!
yoloType your query and press Enter. The AI response streams in real-time.
Press Shift+Tab to cycle through your enabled models. The current model appears in the status bar.
yolo -q "What is TypeScript?"yolo -m anthropic/claude-3-opus -q "Explain quantum computing"yolo --continue| Key | Action |
|---|---|
| Enter | Send message |
| Shift+Enter | Insert newline |
| ←/→ | Move cursor left/right |
| Cmd/Ctrl+← | Move to start of line |
| Cmd/Ctrl+→ | Move to end of line |
| Ctrl+A | Move to start of line (Unix-style) |
| Ctrl+E | Move to end of line (Unix-style) |
| Backspace | Delete character before cursor |
| Key | Action |
|---|---|
| Ctrl+C | Interrupt streaming request |
| Ctrl+D | Exit YOLO CLI |
| Shift+Tab | Cycle through AI models |
| Key | Action |
|---|---|
| Tab | Complete command or file path (when typing / or @) |
| ↑/↓ | Navigate autocomplete suggestions |
| Esc | Cancel autocomplete |
| Enter | Accept suggestion and execute |
YOLO CLI supports slash commands with intelligent autocomplete. Type / to see available commands:
| Command | Alias | Description |
|---|---|---|
/model |
/models |
Select or change AI model |
/clear |
/reset |
Clear conversation history (with confirmation) |
/new |
- | Start a new session in current directory |
/compact |
- | Summarize long conversations to reduce context |
/version |
- | Show YOLO CLI version |
/help |
/h, /? |
Show available commands |
/exit |
/quit |
Exit YOLO CLI |
Command Autocomplete: Type / to trigger intelligent autocomplete. Use arrow keys to navigate, Tab or Enter to complete, and Esc to cancel. Autocomplete filters commands as you type (e.g., /cl shows /clear).
File Path Mentions: Type @ to trigger file path autocomplete. Start typing a file name or path to see matching files from your current directory. Use arrow keys to navigate, Tab to complete, and Esc to cancel. For short queries (< 3 characters), only top-level files are shown. For longer queries or paths containing /, all matching files are displayed.
Multi-Session Support: The /new command creates additional session files in .yolo/history-{uuid}.jsonl format, allowing you to maintain multiple independent conversations in the same directory.
Conversation Compaction: When conversations exceed 20 messages, use /compact to summarize older messages while preserving recent context. This reduces token usage and keeps conversations within context limits.
Configuration is stored at:
- Linux/macOS:
~/.config/yolo-cli/config.json - Windows:
~/.yolo-cli/config.json
Conversation history is saved in .yolo/history.jsonl in each working directory.
YOLO CLI supports automatic loading of Model Context Protocol (MCP) servers for extended tool capabilities. Configure MCP servers once and they'll load automatically on startup.
Global MCP Configuration (applies to all projects):
- Linux/macOS:
~/.config/yolo-cli/mcp.json - Windows:
~/.yolo-cli/mcp.json
Project-specific MCP Configuration:
.yolo/mcp.jsonin your project directory
Example mcp.json:
{
"mcpServers": {
"github": {
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-github"],
"env": {
"GITHUB_TOKEN": "your_token_here"
}
},
"filesystem": {
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-filesystem", "/path/to/allowed/directory"]
}
}
}For detailed MCP configuration guide, see MCP Quickstart.
# Clone repository
git clone https://github.com/your-org/yolo-cli.git
cd yolo-cli
# Install dependencies
npm install
# Build
npm run build
# Run tests
npm test
# Development mode
npm run dev- Quickstart Guide: YOLO CLI Quickstart
- Slash Commands: Slash Commands Guide
- MCP Configuration: MCP Quickstart
- Changelog: CHANGELOG.md
MIT
- Documentation: Full Docs
- Issues: GitHub Issues
- OpenRouter: OpenRouter Docs