Metadata-Version: 2.4
Name: cairn-code
Version: 0.3.9
Summary: Terminal coding agent
License-Expression: LicenseRef-Proprietary
License-File: LICENSE
Project-URL: Homepage, https://github.com/cairn/cairn
Project-URL: Issues, https://github.com/cairn/cairn/issues
Requires-Python: >=3.8
Description-Content-Type: text/markdown

<p align="center">
  <img src="https://raw.githubusercontent.com/cairn/cairn/main/banner.png" alt="Cairn" width="560">
</p>

# Cairn

<p align="center">
  <strong>English</strong> | <a href="https://github.com/cairn/cairn/blob/main/README_ZH.md">中文</a>
</p>

> **Official distribution:** Cairn is distributed only from this GitHub repository, through the Releases page and the install scripts below, through Cairn's official Homebrew tap (`brew tap cairn/tap`, then `brew install cairn`), and on npm as [`cairn-code`](https://www.npmjs.com/package/cairn-code) (0.3.6 and later). It is not published on any other package manager. Any other package using the Cairn name is unofficial, unrelated to this project, and not endorsed by Cairn.

A terminal-based coding agent, built by Cairn.

Cairn runs on macOS, Linux, and Windows. It lives in your terminal and works across multiple LLM providers, reading files, writing and editing code, running shell commands, and searching your codebase to carry out a task from a natural-language instruction.

## Features

- **Multi-provider LLM support**: Anthropic, OpenAI, OpenRouter, SpaceXSI, and local models via Ollama, switchable per session
- **Agentic tool loop**: reads files, writes and edits code, runs shell commands, and searches the codebase autonomously until the task is done
- **Skills + MCP**: on-demand skill packs and Model Context Protocol server support
- **Real-time streaming**: token-by-token output with live tool activity and thinking display
- **Terminal UI**: a fast, keyboard-driven interface with provider/model pickers and syntax-highlighted code
- **Cost tracking**: per-session and per-call token usage
- **Permission system**: configurable auto-approve, ask, and deny rules per tool
- **Self-updating**: built-in `cairn update` command to stay on the latest version
- **Non-interactive mode**: scriptable, pipeline-friendly execution

## Get started

Install the latest release binary:

```sh
curl -fsSL https://raw.githubusercontent.com/cairn/cairn/v0.3.6/install.sh | sh
```

> **Note:** The version tag in the URL above is pinned for security.

On Windows, in PowerShell:

```powershell
irm https://raw.githubusercontent.com/cairn/cairn/v0.3.6/install.ps1 | iex
```

> **Note:** The version tag in that URL is pinned the same way.

With Bun or npm:

```sh
bun add -g cairn-code   # or: npm install -g cairn-code
```

Or download binaries directly from the [Releases](https://github.com/cairn/cairn/releases) page:
- **macOS (Apple Silicon)**: `cairn-code-macos-aarch64`
- **macOS (Intel)**: `cairn-code-macos-x86_64`
- **Linux (x86_64)**: `cairn-code-linux-x86_64`
- **Linux (ARM64)**: `cairn-code-linux-aarch64`
- **Windows (x86_64)**: `cairn-code-windows-x86_64.exe`

The install script and the Homebrew formula also link the binary as `agent`, so `agent` runs Cairn too. The link is only made when that name is free in the install directory; an existing `agent` belonging to another tool is left untouched.

## Updating

Run the built-in update command:

```sh
cairn update
```

If you installed with Bun or npm, update through the package manager instead (`bun update -g cairn-code`).

## Documentation

See the [wiki](https://github.com/cairn/cairn/wiki) to get started, and for commands and configuration.

## Feedback & bug reports

This repository does not host Cairn's source. Use [GitHub Issues](https://github.com/cairn/cairn/issues) to report a bug, request a feature, or share feedback.

## License

Proprietary. All rights reserved. See [LICENSE](https://github.com/cairn/cairn/blob/main/LICENSE).

This is not open source. Cairn's source is not published in this repository, and nothing here licenses that source for use, modification, or distribution.

You may download the published release binaries and run them on your own machine. That is written permission to copy those binaries onto your computer and to use them. It does not grant any other right.

© euxarist 2026. All rights reserved.
