CLI Overview
The Cosine CLI (command cos) is a powerful terminal interface that brings Cosine’s AI capabilities directly to your local development environment. With the CLI, you can have intelligent conversations about your code, automate tasks, and leverage external tools through the Model Context Protocol (MCP).
What You Can Do
Section titled “What You Can Do”- Interactive AI Sessions: Start a TUI session where you can chat with Cosine about your codebase
- One-shot Tasks: Run single prompts without entering interactive mode
- Repository Analysis: Automatically analyze your repo structure and get AI-generated context files
- Browser Automation: Control Chrome for web-based tasks via CDP
- MCP Integration: Connect external tools and APIs through Model Context Protocol servers
- Skills Management: Install and manage reusable skill packages
Command Overview
Section titled “Command Overview”| Command | Description |
|---|---|
cos start | Start the TUI (default command) |
cos init | Initialize repo with cosine.toml and AGENTS.md |
cos login | Authenticate with your Cosine account |
cos skills | Manage skills (see skills add) |
cos ipc | Inter-process communication commands |
Global Flags
Section titled “Global Flags”All commands support these global flags:
| Flag | Description |
|---|---|
-i, --inference | OpenAI-compatible inference host/base URL |
-s, --system-prompt | System prompt ID (default: lumen) |
-p, --prompt | Run once with this prompt (non-interactive) |
--cwd | Working directory (default: current directory) |
--auto-accept-plans | Automatically accept plans without confirmation |
--auto-accept | Automatically accept all tool executions |
--debug | Enable debug mode (dumps context window to /tmp/cosine/window.json) |
--profile | Use specific config profile |
--workspace | Workspace mode: os, vfs, or worktree |
--model | Override model for inference |
--reasoning | Reasoning effort: low, medium, high, or xhigh |
Quick Start
Section titled “Quick Start”Start an Interactive Session
Section titled “Start an Interactive Session”# Start in current directorycos start
# Start in specific directorycos start --cwd /path/to/project
# Start with specific modelcos start --model lumenRun a One-shot Task
Section titled “Run a One-shot Task”# Run a single prompt without interactive modecos start --prompt "Explain the main function in main.go"
# Combine with auto-accept for automationcos start --prompt "Refactor the utils module" --auto-acceptConfiguration
Section titled “Configuration”The CLI reads configuration from multiple sources (in order of precedence):
- Command-line flags (highest priority)
- Repository config (
.cosine.tomlorcosine.toml) - User config (
~/.cosine.toml) - Environment variables
- Defaults (lowest priority)
Profile-specific Configs
Section titled “Profile-specific Configs”You can create profile-specific configs:
cosine.<profile>.tomlin repo (project-specific)~/.cosine.<profile>.tomlin home (user-specific)
Use with: cos --profile <profile> start
Next Steps
Section titled “Next Steps”- Install & Authenticate - Get the CLI set up
- Configuration - Learn about all config options
- MCP Configuration - Connect external tools via MCP
- Browser Automation - Set up Chrome CDP integration