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 install -g copair

Homebrew

brew install dugleelabs/tap/copair

npx (no install)

npx copair

Configure 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-20250514

OpenAI (GPT-5)

# ~/.copair/config.yaml
version: 1
default_model: gpt-5

providers:
  openai:
    api_key: ${OPENAI_API_KEY}
    models:
      gpt-5:
        id: gpt-5

Ollama (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: false

Your First Session

Start Copair in any project directory:

cd your-project
copair

You'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

CommandDescription
/modelSwitch AI model mid-session
/helpShow available commands
/clearClear conversation history
/exitEnd the session

Next Steps

Last updated May 12, 2026