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.
What you can do
Section titled “What you can do”- Interactive AI sessions — Start a terminal user interface (TUI) session where you can chat with Cosine about your codebase
- One-shot tasks — Run single prompts without entering interactive mode
- Repository analysis — Automatically analyse your repo structure and get AI-generated context files
- Git-based change review — When Cosine edits files in a Git repository, it can create per-turn Agent Commits so changes stay visible, reviewable, and reversible
Start here
Section titled “Start here”- Quickstart — Install the CLI, sign in, and run your first task
- Common Terms — Learn the key CLI terms used across the docs
- Commands — Learn the main commands and look up global flags
- Install & Authenticate — Full install methods, dependencies, and sign-in options
Most common commands
Section titled “Most common commands”| Command | Use it when |
|---|---|
cos start | You want to open the TUI or run a one-shot task |
cos login | You need to sign in to your Cosine account |
cos init | You want to set up repo-local CLI config files |
cos mcp | You want to add or manage MCP servers |
cos skills | You want to install or manage reusable skills |
For command syntax and examples, see Commands.
Typical flows
Section titled “Typical flows”Start an interactive session
Section titled “Start an interactive session”cos startRun a one-shot task
Section titled “Run a one-shot task”cos start --prompt "Explain the main function in main.go"Configuration
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
Customising Cosine
Section titled “Customising Cosine”The CLI shares the same customisation primitives as all other Cosine surfaces:
- Skills — Reusable instruction packages
- Plugins — Lua scripts that hook into agent events
- Hooks — Automatic commands after file edits
- Memory — Persistent project context
- Modes — Manual, Auto, Plan, Swarm
- Reasoning — Control depth and speed
- Browser automation — Chrome DevTools Protocol
- LSP manager — Install language servers
- MCP — Connect external tools and APIs
Next steps
Section titled “Next steps”- Quickstart — Get from install to first task quickly
- Common Terms — Look up the core CLI vocabulary
- Commands — Browse the main commands
- Configuration — Learn about all config options