Getting Started
Copair is a terminal-based AI coding agent that works with any model. This guide walks you through installation, provider configuration, and your first session.
Installation
npm (recommended)
npm install -g copairHomebrew
brew install dugleelabs/tap/copairnpx (no install)
npx copairConfigure a Provider
Copair needs at least one AI provider configured. Create a config file at ~/.copair/config.yaml (global) or .copair/config.yaml (project-level). Choose one provider to start:
Anthropic (Claude)
# ~/.copair/config.yaml
version: 1
default_model: claude-sonnet
providers:
anthropic:
api_key: ${ANTHROPIC_API_KEY}
models:
claude-sonnet:
id: claude-sonnet-4-20250514OpenAI (GPT-5)
# ~/.copair/config.yaml
version: 1
default_model: gpt-5
providers:
openai:
api_key: ${OPENAI_API_KEY}
models:
gpt-5:
id: gpt-5Ollama (Local Models)
No API key needed — just have Ollama running:
# ~/.copair/config.yaml
version: 1
default_model: llama4
providers:
ollama:
type: openai-compatible
base_url: http://localhost:11434/v1
models:
llama4:
id: llama4
supports_tool_calling: falseYour First Session
Start Copair in any project directory:
cd your-project
copairYou'll see a terminal prompt where you can ask the agent to:
- Read and understand your codebase
- Write new features
- Fix bugs
- Run tests
- Create git commits
Example
> Add a function that validates email addresses and write tests for it
Copair will analyze your project structure, create the implementation, write tests, and offer to commit the changes.
While the model is thinking, the spinner shows a rolling preview of the streaming response so you can see progress in real time — useful with slower local models where the wait between tool calls would otherwise look indistinguishable from a hang.
Basic Commands
| Command | Description |
|---|---|
/model | Switch AI model mid-session |
/help | Show available commands |
/clear | Clear conversation history |
/exit | End the session |
Next Steps
- Model Switching — Learn how to switch models mid-session
- Git Integration — Automatic branches, commits, and diffs
- Custom Tools — Extend Copair with your own tools