Cairn ▶ Try it live
Web · Python CLIv1.0

A second brain that lives inside your repo.

Capture ideas, brainstorm, record decisions and move tasks, all as plain Markdown next to your code. Works with Obsidian, VS Code and any AI assistant.

Web · Python CLI · open source (MIT) · free · no account
cairn · live demolive demo
Cairn screenshot
2platforms: Web, Python CLI
40tests: core, API, CLI, Python↔JS parity, browser e2e
0dependencies: Python 3.10+ standard library
MITopen source licence, free to use
Why it exists

Your project's thinking, kept with the code.

Cairn puts one calm place inside the project, built around how project work actually moves: capture, brainstorm, decide, do, remember.

Ideas sit in Notion, tasks in GitHub Issues, decisions in Slack threads, TODOs in code comments, and the "why" lives in someone's head; Obsidian and Notion are great at notes, but neither knows anything about your repo.

In short

A small stack of good habits.

01

Plain files, no lock-in

Everything is Markdown in a brain/ folder. Delete Cairn and it still reads fine on GitHub, in Obsidian or in VS Code.

02

Knows your code

Turns TODO/FIXME comments into tasks that remember the file and line, and commits the brain in one click.

03

Made for AI assistants too

One click writes brain/CONTEXT.md, a project brief Copilot, Claude, Cursor or ChatGPT can read. No API keys.

How it works

Three ways to run it

  1. 1

    Try the demo

    A sample project (an offline hiking app) right in your browser.

  2. 2

    Open your real repo

    At juw12.github.io/cairn choose Open a repo folder.

  3. 3

    Run the local app

    python -m cairn --root . opens 127.0.0.1:4777 with code scanning and one-click Commit brain.

What's inside

Every screen, one calm loop.

Quick capture

One bar on every screen. todo: ship v1 #release, decision: use SQLite, log: fixed the bug or just text (an idea). It shows where the note will go before you press Enter.

Ideas wall

Raw → Exploring → Ready → Parked. Drag ideas right as they firm up. Spark drops a thinking prompt into an idea; Promote to task creates a linked task.

Board

To do → Doing → Done with drag and drop, checklists and progress bars.

Decisions

Lightweight decision records (context, options, decision, consequences), numbered and reviewed in PRs like code.

Notes, Journal, Map

Markdown editor with preview, [[wikilinks]], backlinks, tags, a page per day and a graph of how everything connects.

Code inbox

Every TODO, FIXME and HACK comment in the repo. One click makes a task that remembers file:line.

Context pack

A one-page brief (doing now, up next, decisions in force, open questions) saved as brain/CONTEXT.md for teammates and AI assistants.

Search

Ctrl/⌘+K across every note and command. C jumps to capture.

People

Look up anyone on GitHub and see their proof of work, read from their brain's files: working on, shipped, decisions, open to collaborate. Open their brain read-only and Ask to join (opens a prefilled GitHub issue).

Working today

Already in v1.0.

Run it yourself

Up and running in a minute.

From the README’s “Use it” section. Full options, requirements and troubleshooting are there too.

Open the README
bash
$ git clone https://github.com/juw12/cairn
$ cd your-project
$ python -m cairn --root .          # opens http://127.0.0.1:4777
$ cairn add "todo: ship v1 #release"  # capture from the terminal
$ cairn context                      # write brain/CONTEXT.md
Your data

Private by design.

  • No account and no telemetry.
  • The only external requests go to api.github.com and raw.githubusercontent.com, and only when you look someone up or open a published brain.
  • The local server binds to 127.0.0.1 only, checks the Host header and requires a custom header on every API call.
  • It reads and writes only .md files inside the brain folder; paths that escape it are refused (tested).
Good to know

Honest limits.

Straight from the README, so you know what you're getting before you try it.

  • Opening a real repo folder in the browser needs Chrome or Edge on desktop (File System Access API).
  • Looking people up uses unsigned GitHub API calls, limited to 60 per hour per IP; results are cached for 10 minutes.
  • Commit brain commits only brain/; you push with your usual git tool.
Under the hood

How it's built.

Built with

Language
JavaScriptPythonHTML/CSS
Platform
PWAOffline service worker
Hosting
Cloudflare Workers
Testing
Automated tests

90 files in the repo · 12 commits since Nov 2026 · last updated 6 Nov 2026.

Browse the code

Recently shipped

  1. Design pass: map labels never overlap, 320px phones fit, views stop branching on store mode

  2. Split app.js into modules: ui, state, views, map, people, drawer, actions, palette, welcome

  3. Refine log: device flow live and confirmed by owner (round 4, 9.8)

  4. Turn on Continue with GitHub (device flow via cairn-auth Worker)

  5. Sign-in round 3: land in your brain, pre-filled token link, real-GitHub check

Full history on GitHub
Questions

Good questions.

What does it run on?

Web, Python CLI. You can try it in the browser with nothing to install.

How do I get it running?

The commands in the “Use it” box above come straight from the README. Paste them into a terminal; the README covers options and troubleshooting.

Where does my data go?

No account and no telemetry. The only external requests go to api.github.com and raw.githubusercontent.com, and only when you look someone up or open a published brain.

How is it different from Obsidian or Notion?

Notion lives in its own cloud, so your repo can't see it.

Does it work with my AI assistant?

Yes. The context pack writes brain/CONTEXT.md, a short brief of what's in progress, what's next and which decisions are in force.

What doesn't it do yet?

Opening a real repo folder in the browser needs Chrome or Edge on desktop (File System Access API). Looking people up uses unsigned GitHub API calls, limited to 60 per hour per IP; results are cached for 10 minutes.

Is it finished?

Not yet: it's marked “v1.0” and still changing. The README always has the current state.

Is it free?

Yes. The source is public on GitHub under the MIT licence.

Keep exploring

More from the same workbench.

Give your repo a second brain.

A second brain that lives inside your repo.