Listed from the MCP registry; nobody on Odel publishes it.
Second brain as plain Markdown in your repo: search, notes, capture, journal, task queue.
Runs on your machine from its package; the steps are below.

At most: moves money, runs code or commands, deletes data, or sends messages for you.
Odel charges nothing per call. The publisher may charge for its own service.
Runs locally over stdio
This server isn't hosted — your MCP client launches it from a package registry. Use one of the commands below, or drop the config into your client (e.g. Claude Desktop).
Distributed as an MCP bundle (`https://github.com/juw12/cairn/releases/download/mcp-v1.0.0/cairn.mcpb`) — download it and import the bundle in your MCP client.
A second brain that lives inside your repo.
Capture ideas, brainstorm, record decisions and move tasks, all as plain Markdown next to your code.
Try it live · See it in action · Highlights · Landing page · More by juw12
|
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.
|
Knows your code Turns TODO/FIXME comments into tasks that remember the file and line, and commits the brain in one click.
|
Made for AI assistants toocairn mcp lets Claude, Cursor, Copilot or OpenCode search and update the brain; brain/CONTEXT.md is a one-page brief for the rest. No API keys.
|

Open the interactive demo at juw12.github.io/cairn
Your project's thinking is scattered. 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.
Cairn puts one calm place inside the project, built around how project work actually moves:
capture → brainstorm → decide → do → remember
bar ideas wall decision board notes, journal,
+ CLI + sparks log map, context pack
| Screen | What it does |
|---|---|
| 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. |
| Voice log | One Log button on every screen: in the top bar on a computer, bottom-right in thumb reach on a phone (or L). Talk and it writes a timestamped line into today's journal/YYYY-MM-DD.md; say todo …, idea …, decision … or mood good and it creates the linked note or mood too. Undo, read today, what did I do last Friday, search for …, stop. Uses the browser's speech engine, or an offline voice model that runs on your device; no API key, and typing works everywhere. More below. |
| 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. |
| Journal & memories | Its own page in the sidebar. One period (7 days to all time, or any number of days) drives the numbers, a recap with one line per day (entries, agent sessions, tokens, topics), a mood worked out for you from what you wrote and how busy the day was, a 12-month heatmap, what was on your mind and search across every day. Nothing asks you to write a review. |
| Notes, Journal | Markdown editor with preview, [[wikilinks]], backlinks, tags and a page per day. Open notes as tabs, and put a second note beside the first (columns button, Alt+click a link or tab, or drag a tab to the right): both stay editable, links in the side note open there, and the layout is remembered. |
| Map | A live graph of every note: drag notes (they stay pinned), zoom, pinch, hover to light up neighbours with direction arrows, click for an inspector with summary and links in/out. Shift-click two notes for the path between them, Alt-drag one onto another to write a [[link]], double-click a hollow "unwritten" link to create that note. Local graph (1-3 hops), search, colour by type / folder / cluster / status, tag hubs, orphan filter, a time-lapse of how the brain grew. Canvas-rendered, smooth with thousands of notes, and every note stays reachable by keyboard. |
| Canvas | Infinite boards of notes, cards, links and groups joined by arrows, saved as Obsidian-compatible .canvas files. Shift-drag to box-select, Ctrl+C / V / D to copy, paste and duplicate (pasting a link, a [[note]] or text makes the right card), drag notes in from the Notes panel. A note shows the canvases it sits on, and the Map draws each canvas as a square joined to its notes. |
| Obsidian sync | Import an Obsidian vault and keep it in sync both ways (notes and canvases). Files are mirrored as they are; nothing is converted. |
| Databases | Notion-style databases inside any note: a ```database block (type: task, where: status != done, sort: due asc, view: board) becomes a live table, board, gallery, list or calendar of your notes. Filters can be relative (where: due < today, due <= today+7), so an Overdue view stays right every day. Click a cell to edit it, drag a card to another column, press New to add a row. Unlike Notion, every row is still a plain Markdown file and every edit lands in its front matter, so Obsidian, GitHub and AI assistants see the same data. The view you pick is saved in the block itself. |
| / menu | Type / in the editor for a Notion-style block menu: headings, to-dos, toggles (foldable Obsidian callouts), callouts, tables, code, maths, Mermaid diagrams, links, embeds, dates and databases. Everything it inserts is plain Markdown. |
| Projects | Every GitHub repo of a person (yours by default, Cairn itself always included; forks, archived and profile/settings repos left out) ranked by how solid it is (live demo, tests, CI, codebase size, months of upkeep, README, license) and how much potential it has (stars, recent pushes, how often your own notes mention it, whether people can try it). Scores are partly relative to your other repos, so similar projects still spread out. Each card says what sets that repo apart (Why) and the concrete step that would lift it (Next); advice that applies to most of your repos is shown once above the list. It re-ranks itself every 15 minutes, shows who moved since yesterday, remembers test/CI checks until a repo is pushed again (so it stays inside GitHub's anonymous rate limit) and can keep a Project ranking note in the brain up to date. A repo's name opens it inside Cairn, so you need not go to github.com to see what was pushed: Look opens with the project's Versions (Windows, Mac, iPhone and Android: the file to download from the newest release that has one, the web app to keep on an iPhone's home screen, or "not published"), then shows every picture and video (banners, screenshots and demos first), the folders as cards with a cover and the README; Pushes shows the latest commits with the pictures, files and lines each one changed; Files opens any file as a picture, video, sound, rendered Markdown or text. Every folder opens the same way, so a repo of many projects can be walked one project at a time. Releases shows each release with its notes and files; Issues and pull requests opens one with everything said on it, and a pull request with its reviews and changed files. The branch name under the title switches branch. A link to github.com anywhere in Cairn opens that repo, folder, file, push, pull request or issue here (Ctrl or Cmd with the click, or a GitHub button, still goes to github.com). Private repos work when you are signed in as someone who can read them. |
| Plugins | Community plugins: install from the list, a GitHub repo or a link. Each plugin gets a settings page drawn from its own options, a plugin that breaks is flagged on its row with a Restart button, and the list of plugins you use can be saved into the brain so your other devices get the same ones: the built-in plugins install themselves, the others ask first (sources only, never code). Write your own in one file (PLUGINS.md). |
| Code inbox | Every TODO, FIXME and HACK comment in the repo. One click makes a task that remembers file:line. Under Tools (Ctrl+K), with Notes, Context pack, Obsidian sync and Plugins. |
| 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, ? shows every shortcut. |
| 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). |
![]() Canvas. Notes, cards, links and groups on an infinite board, saved as Obsidian .canvas files. | ![]() Tabs and split view. Keep several notes open and edit two side by side. |
![]() Plugins. Install from the list, a repo or a link; each plugin gets its own settings page. | ![]() Keyboard first. Press ? anywhere for every shortcut. |
Press ? anywhere in the app (or pick Keyboard shortcuts in the palette) for the full sheet. The ones you'll use most:
| Where | Keys |
|---|---|
| Everywhere | Ctrl/⌘+K palette · / search · C capture · L voice log · ? shortcuts · Esc close |
| Tabs | Ctrl+click a link opens a tab · Ctrl+Alt+←/→ switch · Ctrl+Alt+W close · Ctrl+Alt+T reopen |
| Split view | Ctrl+Alt+\ open/close · Alt+click a link or tab · drag a tab to the right half |
| Writing | Ctrl+B/I bold/italic · [[ link a note · Enter continues a list |
| Canvas | double-click add · Shift+drag select · Ctrl+C/V/D copy/paste/duplicate · Ctrl+Z undo · arrows nudge · Shift+1 fit |
There are four ways to run it. All of them read and write the same plain files.
0. Desktop app for Windows (easiest). Download Cairn-Setup.cmd
and double-click it, or paste this in PowerShell: irm https://juw12.github.io/cairn/install.ps1 | iex.
No admin rights needed. It installs whatever is missing (Python, Git, the window and tray libraries), then opens
Cairn in its own window. After that, everything happens inside the app:
Documents\Cairn). Switch brain opens another folder, gets a repo from GitHub (private
ones too; GitHub's own sign-in window appears once), or starts a new brain.HTTPS_PROXY, signing in to the proxy as you) and remembers the one that works.you/brain) and turn on
Publish automatically: after each sync, notes marked publish: true are published, but only when one of
them changed. The same notes go online as a web page anyone can read and search, at
https://you.github.io/brain/ (below).On a phone. iPhone: open juw12.github.io/cairn in Safari, tap Share, then
Add to Home Screen. Android: download
Cairn-android.apk (a full-screen
window around the same web app, see android/), or open the page in Chrome and choose
Install app. On a phone Cairn opens the brain you keep on GitHub, or pairs with the desktop app by QR code.
Desktop app for Mac. Open Terminal and paste this:
curl -fsSL https://juw12.github.io/cairn/mac-install.sh | bash
It runs mac-install.sh: no admin rights and no password. It gets
a Python of Cairn's own (your other Pythons are left alone), Cairn and the window libraries, puts Cairn.app in
~/Applications and opens it. The app is the same one as on Windows: your notes open by themselves, one Sync
button, and it updates itself. Closing the window keeps Cairn in the menu bar; a click on its Dock icon brings the
window back. Because the app is made on your Mac and not downloaded, macOS does not ask whether you trust it. Not
there yet on a Mac: starting at login, and keeping the Mac awake for a paired phone. Checked on an Intel Mac with
macOS 15; Apple silicon uses the same script and has not been run yet. To remove it, delete
~/Applications/Cairn.app and ~/Library/Application Support/Cairn (your notes are in neither).
1. Local app from the terminal. Python 3.13+, no dependencies:
git clone https://github.com/juw12/cairn
cd your-project
python -m cairn --root . # run from the cairn folder, or `pip install ./cairn` and run `cairn`
It opens http://127.0.0.1:4777 with code scanning and one-click Commit brain (commits only brain/; push with your usual git tool).
2. In the browser, on your real repo. Open juw12.github.io/cairn, choose Open a repo folder, and pick your project. Chrome and Edge on desktop can read and write the folder directly (File System Access API). Nothing is uploaded.
3. Demo. Try the sample project (an offline hiking app). It's saved only in your browser.
Vibe (sidebar → Build) shows what your AI assistant is doing right now, what came out of it, and what people
thought. A session is a plain file in brain/sessions/ with status: live while you work and a log of timestamped
steps; feedback lives in brain/feedback/ with an optional 1-5 rating.
Every block on the Vibe page (live recap, overview, numbers, activity, sessions, skills, models...) folds to one
line with a summary, and moves up or down with its arrows or by dragging its handle. Every other page is built the
same way (Today, Board, Ideas, Decisions, Journal, Projects, Chat, Autopilot, Map, Canvas, People, Proof, Notes and
the Code inbox), each with a Dashboard (the numbers) and a Recap (what changed and what needs you). On Chat
and the Map the tool comes first and the two blocks sit under it; move them where you like. The layout is saved in
brain/CAIRN-LAYOUT.md (one page-order: and page-folded: line per page), so the desktop app, the web app and
your phone show the same pages.
The Live recap is the one list of sessions that are open: each row says working, turn finished, stopped on
an error or left open, and opens to the full session (progress, steps, add a step, end it). Its sections
(running, left open, just finished) and each assistant in the overview (OpenCode, OpenBot, Vector...) fold too.
A session counts as running only while it is doing something: nothing ever waits for you to press a button.
Blocks with nothing in them stay away (feedback before the first fb: note, models that used no tokens).
cairn vibe start "add dark mode" --agent claude # opens a live session
cairn vibe log "asked for a theme toggle" --kind prompt
cairn vibe log --progress 40 "wiring the toggle" # how far along it is: drives the live bar and time left
cairn vibe skill /refine "6.5 -> 8.7" # skill runs: /refine, /council, /ambitious-founder, /precedent...
cairn vibe check -- python -m pytest # runs your tests, logs pass/fail with the summary line
cairn vibe end --result shipped "toggle works" # records commits and +/- lines since the start
cairn feedback "toggle is hard to find on mobile" --rating 3 --from @alice
cairn vibe status # the same stats in the terminal
Paste the instructions from the Vibe page into AGENTS.md or CLAUDE.md and your assistant reports its own
progress. Any logged step that starts with a slash command counts as a skill run, and the page tallies them.
--progress 40, [40%] ..., step 3/7); without that, Cairn
estimates it from your own finished sessions (same agent when there are 10+), and says so on the card.start prints the
session's slug; set CAIRN_SESSION to it in that terminal (or pass --session) and every command goes there.cairn vibe watch notices AI coding sessions without anyone typing vibe start:
cairn vibe watch --once # one sync, then exit
cairn vibe watch # keep watching (every 60 s; --every 30)
cairn vibe watch --everywhere # OpenCode sessions from any folder, not just this repo
cairn vibe watch --install # start hidden at Windows sign-in (--uninstall removes it)
The desktop app does this on its own while it runs (Settings → Record AI coding sessions), so you only need the command without the app. An Obsidian vault takes sessions from every folder; any other brain only its own. Only one watcher writes a brain at a time: if the app, a startup watcher and a terminal all run, the others stand by and take over within five minutes of it stopping.
source: opencode) with active
minutes (gaps between messages, capped at 10 minutes) and when they happened (spans), model and cost. OpenCode
does not record line changes, so the watcher also counts the commits made in the session's folder while it ran
(local branches, no merges, no [bot] authors). It is live only while a turn is running: the moment the
assistant finishes its turn the session ends (shipped if it changed or committed code, otherwise done), and a
new message opens it again. A session deleted from OpenCode's database (bots that clean up after themselves) is
closed too. The log says whether the folder had no commits or is not a git repo at all.
Re-running is idempotent and finished sessions are not re-read, and a status you set by hand is kept until the
session moves again. Subagent and archived sessions are skipped.shipped with commits, else partial).
Detection is from the outside only (process list and git), so it can't see what was asked. For prompts and steps,
let the assistant report itself with cairn vibe start/log/check/end. A self-reported session that never says
vibe end is closed after four hours without a step, and its next vibe log --session <slug> opens it again.--no-opencode and --no-vector turn either source off.machine:), so two computers can write
into one brain. Sync the brain between them the way you already do (git), run Cairn on each, and the Vibe page
gets a device bar: All devices with the totals together, or one computer alone with its own sessions, live
count, tokens and load reading. The first pass on a computer takes every session its OpenCode still has, not just
the last 14 days (--days 0 does that again later). A watcher only opens and closes the sessions of its own
computer. Another computer is as current as its last sync into the brain. cairn vibe device shows the name in
use (CAIRN_DEVICE=... sets another), and cairn vibe device --adopt, run once on the computer that made them,
puts its name on older sessions that name none. On a Mac the load reading comes from vm_stat, pmset and ps.cairn publish uses) the watcher reads your Actions
usage once an hour and keeps one note per month in github-usage/. The Vibe page shows this month's free
minutes as a meter, warns at 75%, 90% and 100% (or when the last 7 days' pace would pass 100% by month end),
and keeps the daily and monthly history. Only private repos count; it is an estimate and GitHub's own meter
decides. The calls only read; --no-github turns them off.gh auth login, with the user scope so it may read
billing: gh auth refresh -h github.com -s user), cairn vibe watch --github-account NAME notes its minutes
too, in github-usage/NAME/, and the Vibe page shows a meter for each account. In the desktop app the setting
is vibeWatchGithubAccounts. One computer can write the main account's note and another the second account's
(--no-github --github-account NAME), so two never write the same note. cairn vibe github --account NAME
reads or sets that account's figure.cairn vibe github move REPO --to NAME). It asks
GitHub to transfer the repo: GitHub mails the new owner, nothing moves until that link is opened (within a
day), the old owner stays on as a collaborator and can still push, and the old address redirects. Only between
accounts signed in on this computer, only for private repos, only from Cairn on the computer itself (never
from a paired phone), and never without a confirmation. Mind GitHub's terms on how many free accounts one
person may hold.cairn vibe hand [NAME], cairn vibe hand here). Press another computer and
the assistants on this one stop doing the work themselves: each chat leaves its work for that computer as a
handoff that says what done looks like, follows the answers and checks the result, and still does what only
this computer can. Nothing is interrupted: a running chat is told at its next step (cairn vibe log prints
it), a new chat when it starts (the memory skill's recall.py rules begins with it). For one chat alone, a
live session of this computer has Hand to on its row (cairn vibe hand NAME --session SESSION): Cairn
writes the handoff itself from the session's goal and log, and marks the session; Take back closes that
conversation so the other computer stops. What moves is the work, not the conversation, which stays in the
AI app; the other computer does it when a chat there picks the handoff up. The switch for all chats is a
setting of the one computer (handover.json in Cairn's folder), not a note.cairn vibe github push-as [NAME]). A press runs gh auth switch; the first press also runs
gh auth setup-git, after a confirmation, so that git asks the GitHub CLI for its GitHub sign-in. From then
on git push, gh and an assistant working on that computer all go out as the account picked, and a switch
made in a terminal shows on the page within seconds. Commits keep their author; only the sign-in changes,
the name GitHub puts on a push, a pull request and a release. It is checked on the computer, by comparing
the sign-in git would send with the CLI's, and no token is shown or stored. Never from a paired phone. A repo
whose address names a user or uses SSH keeps its own sign-in. To undo the first press:
git config --global --unset-all credential.https://github.com.helper (and the same line for
gist.github.com, which the GitHub CLI sets along with it).cairn vibe github copy FOLDER keeps a full copy (a git mirror:
every branch, every tag, the whole history) of every repo of the accounts the GitHub CLI is signed in to, in
FOLDER/owner/name.git, so that GitHub is not the only place your work exists. A locked account, a deleted
repo or a force-push then costs nothing: git clone FOLDER/owner/name.git gives the work back, and
git --git-dir FOLDER/owner/name.git push --all NEW-URL (then --tags) puts it on another host. Beside each
mirror, FOLDER/owner/name.extras/ holds what is not in git: issues and pull requests with their comments
(issues.json, comments.json, review-comments.json), releases and the files attached to them
(releases.json, releases/TAG/FILE), the wiki (wiki.git), what the repo page says (repo.json) and the
Actions variables with the names of the Actions secrets (actions.json). Git LFS files are fetched into the
mirror. One thing nobody can copy: the value of an Actions secret, which GitHub never gives back, so only its
name is kept. The folder is remembered per computer, later runs (cairn vibe github copy) fetch only what
changed since (and look at every repo's extras once a week), and the watcher does that once a day. A repo
that is gone from GitHub keeps its copy. --account NAME copies one account only. The sign-in goes to git and
to GitHub for one request at a time and is never written into the copy.
One disk is one accident away from none. cairn vibe github copy everywhere asks every other computer whose
watcher reads the same brain to keep its own copy, in github-copy in its home folder, once it has the room
and the GitHub CLI is signed in there (everywhere off stops asking). That holds on a computer whose watcher
runs with --no-github too, since each computer writes only its own note; cairn vibe watch --no-copy
keeps one computer out. A note per computer in
github-usage/copy/ says how many repos it holds, how big and how fresh, and the command says whether this
computer's copy is the only one. Cairn does not replace GitHub as the place others find your work or your
devices sync through; it makes losing it survivable.Pair a phone the way opencode pair does: in the desktop app open Settings > Pair a phone (or the tray icon's
Pair a phone..., or run cairn pair in a terminal) and scan the QR code. The phone opens straight on the Vibe page
and stays paired, so a home-screen bookmark keeps working: live sessions, autopilot jobs and notes, from the couch.
~/.cairn/chats. The Glow tab next to it opens your Glow app (Chat, Council, Arena).cairn relay setup once: it creates
the private repo <you>/cairn-relay and saves your GitHub token encrypted for your Windows user in
~/.cairn/relay.json; the desktop app then answers from it. On the phone open
Cairn, sign in with a fine-grained token limited to that repo (Contents: read and
write) and open Chat: messages land in devices/<pc>/requests/, that PC runs them and streams the answer into
devices/<pc>/threads/, and the page shows when the PC last checked in. Expect roughly 5-15 s before the reply
starts. Several PCs: run cairn relay setup (optionally --name "Home PC") on every PC signed in to the same
GitHub account; each gets its own folder in the repo and the phone shows a Talk to picker to choose which one
answers, with each PC's own chats and models. Keep the repo private: anyone who can push to it can make your PCs run
OpenCode prompts, and your chats are stored there.cairn relay setup saved)
and opens this brain from its GitHub repo. Copy link does the same for another browser. Show it only to your own
devices; revoke the sign-in on GitHub to cut a device off.my-pc.tail1234.ts.net), so the paired phone works on mobile data or any Wi-Fi. Without
Tailscale, phone and PC need the same Wi-Fi.One brain, several computers: a laptop at home, one at work, a Mac for the things only a Mac can check, a phone. What one of them found, left hanging or cannot do itself used to get lost between them. Now it leaves a message.
cairn handoff # what the other computers left for this one
cairn handoff send "Buddy 1.13 is untested on a real Mac" --to "macbook" -m "Run the self-test, tell me what the log says."
cairn handoff send "Pull Cairn before the next session" --to all
cairn handoff show "buddy" # one conversation in full
cairn handoff pickup "buddy" # this computer has taken it on
cairn handoff reply "buddy" "Which macOS do you want it on?"
cairn handoff done "buddy" "24 of 24 checks pass. The update check fails: see pull request 45."
cairn handoff close "pull cairn" "Everyone has it." # over, for every computer
cairn handoff --all # also what is between other computers, and what is settled
--to takes a computer's name or a few words of it (macbook for MacBook Pro 15,4),
several times for several computers, or all for every computer. A computer is known once it has written
into the brain (a session, its machines/ note or a message). cairn vibe device shows this one's name.pickup when it takes it on
and done when its part is finished; anyone can reply in between, also a computer it was not for. It is
settled when every computer it was for has said done, when the one that started it says done itself, or
when anyone says close, which calls it off for every computer.git config cairn.sync auto in the brain's repository); your own sync script works too
(git config cairn.sync "/path/to/sync.sh"). Then cairn handoff send and an answer push right away and
say so, cairn handoff fetches before it lists, and while the app is open it asks the remote every 20
seconds whether something new is there (every 5 for ten minutes after a message left or arrived, since an
answer usually follows), so the other computer's message shows without a reload. With the app closed the
command line and the memory skill still send and fetch by themselves; only the Today page needs the app.
Without that setting nothing is pushed for you: the message goes with the brain's next sync, and the
command says so. --offline skips the network for one command.sent), and the message it follows (after). Two computers in different time zones read the same order,
and an answer never shows before what it answers, even from a computer whose clock is wrong.brain/handoffs/, written once by the
device that says it and never changed. Two devices never write the same file, so the brain's git remote
(or any folder sync) carries the conversation with nothing to merge.cairn mcp has handoffs, handoff_send and handoff_answer, and tells an assistant
to look at the start. The memory skill that cairn connect puts into your AI app says the same
(recall.py handoffs, remember.py handoff, remember.py answer), and so do the agent instructions on
the Vibe page. An assistant that stops with something only another computer can do leaves it there.A Telegram bot of your own tells you once a day whether Cairn is healthy and what the day held, and answers
/status whenever you ask:
Cairn on MY-PC · Tue 17 Nov
All good.
Today
6 AI sessions: 4 shipped, 1 partial, 1 still live
3h 05m of session time · checks: 12 passed, 0 failed
Live now: Fix the map on phones
Tasks: 4 to do, 1 in progress
Cairn
Desktop app 1.0.0 (5ba5fd8): running
Brain "brain": in sync with GitHub
Session watcher: running
Phone access: on, 1 phone paired
The first line under the date is the verdict: All good. or Needs a look: ... with what is wrong (the desktop
app is not running, the brain has work that is not on GitHub, the session watcher stopped, checks failed, GitHub
Actions minutes are running out). If the PC has been off or asleep, the report says since when.
cairn telegram setup <bot token> # token from @BotFather's /newbot; then open the link it prints (--hour 8 for mornings)
cairn telegram show # print the report here, send nothing
cairn telegram send # send it now
cairn telegram status # what is connected
cairn telegram off # forget the bot
The bot runs on a small free Cloudflare Worker rather than on the PC, because office networks often block
Telegram and a PC that is off cannot say so. Deploying it takes about ten minutes:
see worker/README.md. Only the report text leaves the PC (session titles, counts, sync
state), and nothing is sent until you set a bot up.
Say what you want once and get what you would have asked for next. cairn precedent learns from your own
history (past prompts in Claude transcripts and OpenCode's local database, your Update Log, lessons you logged)
and writes a brief for any goal: a draft Definition of Done, the hidden asks (what you asked for after similar
goals before), the closest past prompts, your working profile (brain/notes/precedent-profile.md), the queue and
the loop to follow. Any assistant can read it through MCP (precedent_brief, the precedent prompt) or the
/precedent command that cairn precedent install writes for Claude Code, OpenCode and Codex.
cairn precedent learn # build the library in ~/.cairn/precedent (redacts tokens and passwords)
cairn precedent brief "landing page for the new app"
cairn precedent queue "add CSV export" --auto # a #queue task; --auto = safe unattended, --needs-me = waiting on you
cairn precedent next # the next open queue item
cairn precedent log "goal" "what shipped" "what you corrected"
cairn precedent install # /precedent for Claude Code, OpenCode and Codex
The Autopilot page (and cairn autopilot) goes one step further: hand over a goal and Cairn runs your coding
agent round after round (OpenCode by default, or any command such as claude -p) until it reports STATUS: DONE,
gives it a couple of polish rounds, marks the queue task done, logs the lesson and takes the next #auto item.
You watch the live log, steer with a comment, and get a Windows notification when it needs you.
A round that fails with no reply (connection lost, gateway down) is not counted: the job waits 30 seconds to
10 minutes and tries again by itself, and only asks for you after about a day of failed tries.
cairn autopilot add "add dark mode to settings, tests passing" --workdir ~/code/app
cairn autopilot on # the desktop app or `cairn serve` runs the worker (one per machine)
cairn autopilot status
cairn autopilot set engine=command command="claude -p"
The queue is plain tasks tagged #queue in brain/tasks/, so it shows on the Board and in Obsidian too. Cairn
itself still never calls a model: it starts the agent CLI you already use, with your own login. The worker is off
until you turn it on, and its state and logs live in ~/.cairn/autopilot (CAIRN_HOME moves both).
Cairn Pro. Cairn is free; the Autopilot is the one paid part. The first goal on a computer is free. After that,
new goals need a Cairn Pro licence key
(USD 8 a month or USD 60 a year): paste it on the Autopilot page or run cairn pro activate <key>. Goals already
handed over keep running. The key is checked with Polar about once a day and keeps working for 14 days away from the
network; only the key and Polar's yes or no are kept, in ~/.cairn/pro.json.
Moving from the standalone precedent skill or Precedent Agent app:
cairn precedent init --import-skill <skill folder> --queue-file <Queue.md> --agent-app <app folder> (safe to re-run).
Press the Log button, or L. On a computer it sits in the top bar next to search; on a phone it floats bottom-right where your thumb is, and slides out of the way while you scroll down to read. The microphone starts (you can turn that off), you talk, and every sentence lands in today's page as a plain Markdown bullet:
## Log
- 08:12 Walked to work, sorted the GPX bug on the train #beta
- 09:40 Task: [[book-the-train-to-lyon|Book the train to Lyon]]
- 18:05 Mood: good (4/5)
| Say | What happens |
|---|---|
| anything | a timestamped line in today's log |
| todo …, remind me to … | a task on the board, linked from the log |
| idea …, decision …, note … | that note, linked from the log |
| mood good, I feel tired | a mood line (1-5) for the mood chart |
| undo, scratch that | removes the last line (and the note it made) |
| read today, what did I do last Friday, how was 3 November | reads that day back aloud |
| open today, open 3 November | opens that day's page |
| search for the export, when did I last mention Sam | searches every day and reads out the latest hit |
| weekly review, stop | writes the review, stops listening |
"Hey Cairn" in front is fine and ignored. Keep listening logs line after line hands-free; Review before saving puts what you said in the box first. Pick the speech language in the sheet (English, 中文, Bahasa Indonesia, Español, Français, Deutsch and more). Turn on Listen for "Hey Cairn" and the mic waits in the background while Cairn is open: say "Hey Cairn, finished the export" on any screen and the line is logged (a small dot on the button shows it is listening; it pauses when the tab is hidden). Write @sam to tag a person; once someone has been @mentioned, saying "lunch with Sam" links them too, and Journal lists the people on your mind.
Speech recognition is the browser's own (Chrome, Edge, Safari), which usually needs a connection. For voice without one, open Offline voice in the sheet: download a small speech model for your language (English, 中文, Deutsch, Español, Français, Italiano, Português, Русский and a few more, 30-50 MB, Vosk) or pick a model file you already have. It is kept in the browser, recognition runs on your device, and Cairn switches to it on its own when you go offline or the browser's speech service fails; tick Use it even when online to always keep audio on the device. In Chrome versions that can recognise speech on the device, the same panel offers Install it for the browser's built-in local engine. Wake words are matched loosely, so "hey Karen" or "hey Cairo" still count. In browsers without it the mic is greyed out and the box works the same with typed prefixes (todo:, idea:, mood:). Nothing is sent anywhere by Cairn, and read-only brains never show the button.
Journal turns the pages into memory. Pick a period once (7, 30 or 90 days, a year, all time, or type any number of days) and the whole page follows it: your streak, days logged, the busiest day, agent sessions and tokens, with the all-time totals beside them. The Recap is one line per day (mood, entries, sessions, tokens, top topics); open a day for its short summary, or jump straight to yesterday, a week, a month or a year ago. The mood is worked out for you: a mood you set yourself wins, otherwise it is read from the prompts you typed to your agents, from how the day's lines read (trouble counts three times) and from how busy the day was against your usual day, and the row says why. Cairn's own journal/ page is the one shown for a date even when another app keeps a page with the same date. Below that: a heatmap of the last 12 months, the people, tags and notes that were on your mind, days that share links with today, and search across every entry (exact hits first, then close matches, so a typo like weathr still finds the weather). The log sheet keeps keyboard focus inside it until you close it. Nothing on the page asks for a review. If you want one anyway, say weekly review or monthly review in the log sheet: it collects the entries, moods, finished tasks and new notes into journal/2026-W45.md, a normal note that shows up on the Map and in backlinks.
Cairn uses GitHub as the network, so there is nothing new to sign up for.
brain/ in a public repo and add the topic cairn-brain (repo page → About → Topics).https://juw12.github.io/cairn/?u=<your-username>, or a brain directly:
https://juw12.github.io/cairn/?brain=<owner>/<repo>.This repo dogfoods it: see @juw12's profile or Cairn's own brain. Only repos with the topic ever appear; other people's brains are always read-only. Unsigned GitHub API calls are limited to 60 per hour per IP, so results are cached for 10 minutes.
Write a claim as a note with a claim: line and links to the work under evidence: (repos, merged
pull requests, commits, releases). The Proof view and everyone's profile check each link on
GitHub and show a level nobody can type in: L1 claimed, L2 backed by work you own, L3 used by others
(merged into someone else's repo, forked or starred), L4 vouched (another person committed a vouch
file in their own repo; the Vouch button prefills it). Keep your brain private and publish only
the notes marked publish: true:
python -m cairn publish --to YOUR-NAME/brain --source "path/to/your/vault"
The full format is in PROOF.md.
A web page anyone can search. The same commit puts those notes in the public repo's docs/ folder as
a web page, and switches GitHub Pages on for it, so your public brain is online at
https://YOUR-NAME.github.io/brain/ (see @juw12's). Nobody needs
Cairn, a GitHub account or a sign-in to read it:
/ jumps to the box, and the address keeps the search
(?q=offline+voice), so a search can be sent as a link. The words travel with the page in one small
script, so no server is asked and there is no rate limit. Without JavaScript the box is not shown and
the pages read the same.sitemap.xml lists them all with the day each last changed.feed.xml, an Atom feed of your notes, has changed. No account is
needed: the page carries its own IndexNow key file. Only addresses of pages that are already public are
sent. --no-announce on the command line, or "announcePublic": false in the desktop app's config,
turns it off. When a page shows up in a search engine is still that search engine's decision.main, folder /docs); the next publish by
the owner does it by itself.docs/ is left alone, and --no-site publishes the notes
without the page.Want a link you can send to anyone, with no repo, topic or token? Build a plain web page from the
same publish: true notes:
python -m cairn publish --site my-page --title "Your Name"
my-page/index.html lists your work (each claim with the links that back it) and every public note
gets its own page. It is plain HTML with no calls to GitHub, so it opens straight from disk and has no
rate limit; the one script is the search box on the first page, and everything reads the same without
it. To put it online, upload the folder to any static host (Cloudflare Pages, Netlify, GitHub Pages,
your own server). Add --url https://the-address-it-will-have/ and each page names its own address and
a sitemap.xml is written, which is what Google and Bing read to find the pages. Run the command again
after you change notes: pages of notes you un-publish are removed, and files you added to the folder
yourself are left alone. This page shows your claims and evidence links as written; the checked proof
levels stay in the Proof view.
Sign in with GitHub on the web app and your brain repo becomes editable from your phone, a borrowed laptop or
any browser. Every save is a commit to brain/ in your repo; there is still no Cairn server or database.
public_repo
also lets you create new brains from the People page.If the same note was changed somewhere else, Cairn shows the newer version and keeps yours next to it (Use my version, Copy my text or Keep the newer one). Failed saves (offline, expired sign-in) keep your text the same way. Repos you can't push to stay read-only.
Or click Continue with GitHub: approve on github.com with a short code, no token to copy. GitHub's OAuth
endpoints don't allow browser calls, so this goes through a tiny Cloudflare Worker that holds no secret and
forwards only those two requests: see worker/README.md.
Cairn opens an Obsidian vault as it is: no import, no copy, no brain/ folder needed. A folder with
.obsidian/ in it (or a GitHub repo of notes) is used directly, .obsidian/, .trash/ and other
hidden folders are skipped, and links resolve the way Obsidian resolves them: [[folder/note|alias]],
[[note#heading]], ![[embeds]], [text](https://github.com/juw12/cairn/blob/main/note.md) and wiki links in properties.
python -m cairn --root "path/to/your vault" serve, or Choose a folder in the browser.you/your-vault.Edits only change what you changed: properties keep their order, comments and list style, and files keep their line endings, so Obsidian and git see clean one-line diffs.
The Map goes further than Obsidian's graph: filters, colour by type, folder, cluster or tag, local maps
of depth 1 to 3, the shortest path between two notes, keyboard navigation (arrow keys walk the links,
Enter opens, L for local), hubs, orphans and islands at a glance, and suggested links: notes that
mention another note's title without linking it, linked in one click. Alt-drag one note onto another to
write the link, double-click a missing note (a link to a note that doesn't exist yet) to create it, and
Watch it grow replays the map in the order your notes were written. Daily notes named 2026-11-05.md
show up in Journal, wherever they live in the vault.
The editor speaks Obsidian-flavoured Markdown, so a vault reads the same in both apps:
Markdown: callouts (> [!tip], foldable with +/-), ==highlights==, task lists you can tick in
the preview, nested lists, tables, footnotes, %%comments%%, inline #tags (click one to filter Notes),
images and attachments (![[diagram.png|300]], PDFs) and note embeds (![[note#Heading]]).
Write, Split or Preview, with a live word count. In the editor, type [[ for link suggestions (add # to
pick a heading); Enter continues lists; Ctrl+B, Ctrl+I and Ctrl+E (toggle preview) work as you'd expect.
Under every note: an outline of its headings, backlinks, links out, and unlinked mentions you can turn into links in one click. Hover any link for a preview of the note.
Properties: edit, add or remove any front-matter key, not just the built-in ones.
Rename a note and every link to it is rewritten. Links to missing notes are shown dimmed; click one to create it.
Find things: Notes has a list or a folder tree, a Bookmarks filter, and search operators: tag:release,
path:ideas/, file:, type:, status:, line:, "exact phrase" and -exclude.
Templates: notes in Templates/ (or _templates/) appear in the command palette (Ctrl+K), as a new note or
inserted into the open one; {{title}}, {{date:YYYY-MM-DD}} and {{time}} are filled in. The palette also
has Random note and Rename.
First run: a short guided tour points at each part of the app. Skip it any time; replay it with the ? button at the bottom of the sidebar or Take the tour in the palette.
Maths and diagrams: $E=mc^2$ and $$…$$ are typeset with KaTeX, and ```mermaid blocks become
diagrams. Both libraries load only when a note uses them (pinned versions, integrity-checked); offline, the note
shows the source instead.
Canvas: an infinite board for laying out notes, cards, links and groups and drawing arrows between them.
Double-click to add a card, drag a dot on a card's edge to connect, colour, undo, zoom and pan with mouse, keys
or touch. Saved as .canvas files in the open JSON Canvas format, so boards open in Obsidian and sync with your
vault both ways; fields Cairn doesn't know are kept.
Tabs: keep several notes open. Ctrl/⌘+click or middle-click any note to open it in a new tab; drag tabs to reorder, Ctrl+Alt+←/→ to switch, Ctrl+Alt+W to close, Ctrl+Alt+T to reopen. Tabs are remembered per brain.
Split view: Ctrl+Alt+\ (or the columns button) opens a second note beside the first; Alt+click any note, link or tab to open it there. Read or edit it, click its title to swap sides, × to close.
Community plugins: turn them on under Plugins, then install from the built-in list (Note queries,
Calendar, Writing stats, Recent files, Pocket meter), from any GitHub repo (owner/repo) or from a link. A plugin is one
JavaScript file that can add commands, sidebar pages, ```lang block renderers and event hooks; see
PLUGINS.md. Plugin code lives on your device, never in a shared brain; a brain can only name which
plugins to use, and only the built-in ones install without asking. Obsidian's own plugins don't run
here (they need Obsidian's API), but Cairn's API mirrors theirs, so porting is usually quick.
When your notes live in a project's brain/ folder (or a GitHub repo) and you also keep an Obsidian vault,
open Obsidian sync (the puzzle button at the foot of the sidebar, or Ctrl+K) or run cairn obsidian ~/path/to/vault. Cairn copies the vault into
brain/obsidian/ and from then on keeps both sides in sync: edit a note in either app and the next sync
copies it over. (If Cairn opened the vault itself, there is nothing to sync and the page says so.)
cairn obsidian --watch 10
keeps syncing with the app closed. --folder . mirrors the vault into brain/ itself (--folder "" too,
except in PowerShell, which drops empty arguments); --dry-run shows what would be copied.Nothing is ever lost: a note deleted in Cairn goes to the vault's .trash/, one deleted in Obsidian goes to
brain/.cairn/trash/, and if both sides changed a note the newer wins and the other is kept as
Name (conflict 2026-11-06).md. A vault that suddenly looks empty (unplugged drive) stops the sync instead
of deleting anything. Only Markdown is synced; attachments and .obsidian/ settings stay in the vault.
Switch the Map between 2D and 3D with the toggle in its corner (or press 2 / 3). The 3D map lays your notes out in space with perspective, depth and lit spheres; drag to turn it a full 360° any way, right-drag or Shift-drag to pan, scroll or pinch to zoom, R for auto-rotate. Selection, local maps, paths, filters and suggested links work the same in both, and Cairn remembers which one you like.
cairn init # create brain/ (never overwrites)
cairn add "todo: ship v1 #release" # capture from the terminal
cairn add "decision: use SQLite" # → brain/decisions/0001-use-sqlite.md
cairn log "fixed the GPX bug #beta" # a timestamped line in today's journal page
cairn log "todo: book the train" # the task, linked from the log
cairn log # show today's log (--day yesterday, --days 7)
cairn list --type task --status doing
cairn todos # TODO/FIXME/HACK comments in the code
cairn context # write brain/CONTEXT.md
cairn mcp # MCP server for Claude, Cursor, Copilot, OpenCode (--print-config, --read-only)
cairn connect # make this brain the memory of the AI apps on this computer (--status, --remove, --off)
cairn cloud # a second copy of the brain and your repos in a cloud drive, locked first (setup, sync, auto, key)
cairn obsidian ~/Documents/MyVault # import a vault into brain/obsidian/ and sync both ways
cairn obsidian --watch 10 # keep syncing every 10 s (--dry-run to preview)
cairn vibe watch # detect OpenCode and Vector sessions automatically
cairn vibe device # the name this computer puts on its sessions (--adopt names older ones)
cairn handoff # what your other computers left for this one (send, show, pickup, reply, done, close)
cairn vibe github copy D:/github-copy # a full copy of every repo of your GitHub accounts on this computer, with issues, releases and wikis
cairn vibe github copy everywhere # ask your other computers to keep their own copy too (everywhere off stops asking)
cairn precedent brief "goal" # a brief from your own history (learn, queue, next, log, install)
cairn autopilot add "goal" # your agent carries it to done (on, off, status, set)
cairn pro activate <key> # Cairn Pro: more than the one free autopilot goal (status, remove)
cairn telegram setup <bot token> # a daily status report in Telegram (show, send, status, off)
cairn serve --port 4777 # the app (default command)
your-repo/
brain/
ideas/ offline-maps.md
tasks/ ship-v1.md
decisions/ 0001-use-pmtiles.md
notes/ architecture.md
journal/ 2026-11-05.md
CONTEXT.md (generated)
README.md (explains the folder to people who don't use Cairn)
---
title: Ship v1
type: task # idea | task | decision | note | journal
status: doing # idea: raw/exploring/ready/parked · task: todo/doing/done · decision: proposed/accepted/superseded
tags: [release, web]
created: 2026-11-05
source: src/app.py:42 # optional: where in the code this came from
---
Plain Markdown. Link other notes with [[offline-maps]].
[[offline-maps]] resolves in Obsidian and Foam too. Open brain/ as an Obsidian vault if you like.Add one line to AGENTS.md, CLAUDE.md or .github/copilot-instructions.md:
Read brain/CONTEXT.md before starting. Decisions in brain/decisions/ marked "accepted" are binding.
CONTEXT.md also has a short Lately section with the last three days of the journal, so the assistant knows what you were just doing.
A new chat starts knowing nothing about you. With Cairn on the computer it starts with your brain: Cairn puts a small
skill, cairn-memory, where the AI app reads skills. The skill tells a new chat to search the brain before it answers
or asks you something you already answered, and to save what the next chat will need. Two scripts in it, recall.py
and remember.py, do both through Cairn's own tools. No account, no s