Skip to content
omit-nzPublic

About

Your notes, searchable on your own computer, for you and your AI

Resources

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

brain, by omit

Leave a brain at home. brain keeps a folder of your Markdown notes searchable on your own computer, and gives your AI tool the same search, so it answers from what you have written down. A Rust daemon and command line with a local MCP server. Apache-2.0. Built by omit.

What works today

  • Search over your notes on your own computer, by words, meaning and links. To a question it returns nothing rather than a weak match, and for three words or fewer it also lists notes holding every one of them, common words such as "the" aside. It says when each note it finds was written, marks one that another note corrects or supersedes, orders by date when you ask for the latest decision, says for a copy whose source it has recorded whether that file has changed since, and keeps the questions nothing answered (brain gaps).
  • Claude Code and Claude Desktop search your notes, capture new ones into an inbox, correct a note and list what is due for review.
  • A background daemon indexes a note soon after you save it (macOS; on Linux you run brain daemon yourself).
  • Rooms, so AI sessions on one computer can leave each other messages.
  • A Claude Code plugin: a session starts with the notes due for review and the memory indexes you name. What brain reads and decides at each hook is kept on your computer (docs/traces.md says what, and when it is dropped); the check of a written note keeps nothing.
  • Note guards: when Claude Code writes a note, brain says what the write put wrong and offers the fix. It never stops a save. This needs the plugin, which brain connect claude-code installs.
  • Copies of Claude Code's auto-memory that follow their sources (brain memory follow).
  • Import of a learning-loop vault.
  • brain setup, and /brain:setup in Claude Code: your notes folder, the index and the settings in one step.
  • Signed releases and updates.

brain is pre-1.0 and early. A Mac with Apple silicon is the platform it is used on. Linux and Windows builds are published and tested in CI; connecting an AI tool is not supported on Windows yet.

Planned, not built

  • Upkeep that notices what has gone stale or should be written down.
  • Your own email, for your own AI only.
  • Screen context, off until you turn it on.
  • Sync between your devices and your colleagues, through a relay that only ever holds ciphertext.

None of these exist yet, and the plans can change.

Install

On a Mac (Apple silicon): download brain.pkg from the releases page and open it. It installs for you alone, with no admin password, and macOS checks its Developer ID signature and notarisation before it runs. macOS names the signer as Robin Lange (team 5BCNYRT23U), the Apple developer account omit releases under. Then run brain setup, which makes your notes folder and starts the daemon. Pointing brain at notes you already keep comes in a later release: until then brain setup and brain init refuse a folder, other than the one already set up, that holds notes brain did not make, or an Obsidian folder with no notes yet. Or run brain connect claude-code first and then /brain:setup in Claude Code.

On Linux (x86_64), and for CI and scripted installs:

curl --proto '=https' -fsSL https://raw.githubusercontent.com/omit-nz/brain/main/scripts/install.sh | bash

Then brain update moves you to each new release once its signature checks. docs/release.md says what is trusted and when, and SECURITY.md answers the questions a security review asks.

Auto-memory

brain memory follow ~/.claude/projects keeps brain's copies of Claude Code's auto-memory in step: the daemon looks every minute, rewrites a copy whose source changed, and archives a copy whose source it has seen there and two looks in a row then found gone. A copy you have edited is left as it is, a copy you have removed stays removed, and a followed folder that is missing or empty changes nothing. brain memory run makes one pass now, and brain memory unfollow stops. brain setup follows it too, unless you have said no (--memory off, an off in guided setup, or brain memory unfollow) or brain has copied memory before with nothing followed now; nothing starts following on an update. A copy takes the day its memory says it was changed. A copy made before 0.3.0 is given that one line on the first pass after the update: brain says how many, and lists them in dated-copies-<date>.txt in its data folder before it writes them. A release before 0.2.11 that writes the config forgets a recorded no.

The followed folder is [memory] projects in the config. Releases up to 0.2.11 look for [memory] follow, so a daemon of theirs left running copies nothing a newer brain chose to follow; restart it after an update. Going back to one stops following, and brain memory follow <projects folder> starts it again.

A memory that looks like it holds a key or password is not copied: a note in its place names the source file and holds none of its words, and brain status names it. Take the key out of the source and the memory is copied, unless you have written in the note or removed it. A copy you have edited is never written over: one holding a key or a withheld: credential line is not searched, by you or your AI. Copies already archived, or archived because their source was gone when brain was updated, stay as they were, and so does your notes folder's git history, or any other copy of the folder: change a key that was in one. brain looks for known shapes of key and for a value given to a name such as password or token. A value that reads as a placeholder, or as the next word of a sentence (token: stored in the keychain), passes. So does a web address or a path given to such a name, unless the address holds a long run of letters and digits past its host; the webhook addresses of Slack, Discord, Teams, Zapier and Telegram that carry a key are caught wherever they are. It is not every secret: one written in plain prose is not caught.

Archiving is undone when the source returns: the same file comes back under the same id. If its words changed while it was away, a new copy is written under that id and the old one stays in _archive. An archived memory is out of search, and brain status says how many there are. Archiving does not purge it from brain's traces. Deleting the archived file brain would bring back does, once two passes have found it gone, and that memory is not copied again. If it returned with other words it kept its id, so removing the new copy can purge the old words' traces too.

When a project's memory folder becomes a link to another project's, its copies move to the new name; where brain had already copied a memory under both, the copy under the old name is archived, or kept if you edited it. To move a project's memory yourself, run brain memory unfollow, move it, link the old name to it, and follow again; run no import in between.

Past sessions

brain setup turns this on unless you have said no (--sessions off, an off in guided setup, or brain transcripts off), and nothing starts it on an update. brain transcripts on has brain read your past Claude Code sessions from ~/.claude/projects into a store of its own, transcripts.db, apart from your notes. It takes only what you and Claude said, never a tool's input or output, and keeps a question with its answer as one piece; what Claude said back to something nobody typed, such as another session's message, is kept without a question. The daemon reads a session file once it has not changed for ten minutes, newest first, a few megabytes at a time. What is older than 90 days is dropped (brain transcripts keep takes 7 to 365), and what brain read stays for that long even after Claude Code removes the file. A turn that looks like it holds a key or password is left out, by the same check as for memories, which is best effort: it misses some keys.

search_my_brain answers from past sessions too: up to three of them after your notes, marked as what was said then, where ONNX Runtime can rank them. search_company never does, and a question only a session answers still counts as one your notes do not. brain transcripts search searches what was said, and brain transcripts status says what is read and held. brain transcripts pause, brain transcripts resume and brain transcripts off stop and start reading; off leaves what was read, unused. brain transcripts skip leaves a project's folder out and drops what it gave. brain transcripts delete takes a session, or a span of days, out of the store for good: it says what it would take until you add --apply, purges the calls brain recorded as answered from it, and never reads it again, nor the same words in a resumed or forked copy (a session file already gone before brain could look is one it cannot cover, and it says so). Your Claude Code session files, notes and memories, and later sessions that quote what you deleted, stay. What a session's agents said is left out unless you ask with brain transcripts agents. A store brain cannot read is named by brain status, and brain transcripts reset sets it aside, keeping what was deleted and the folders left out where the old store can still give them.

Limits

  • brain writes no id into a note it finds: a note with no id in its frontmatter is known by its path, and one that repeats another note's id is too, so renaming or moving it reads as one note removed and another added. Notes that already carry an id keep it. (a_pass_writes_nothing_into_a_note_with_no_id, a_duplicate_id_leaves_both_files_alone)
  • Only a kept note of yours, or of nobody's, can be marked still true: not one in the inbox or under private/, which brain would never ask about again, and not a room post, and not one whose owner brain cannot read. (confirm_refuses_what_is_not_the_persons_to_confirm, a_room_post_is_neither_offered_nor_confirmed, confirm_never_replaces_an_owner_it_cannot_read, an_owner_past_a_blank_or_comment_line_is_still_an_owner)
  • A copy of a memory you marked still true loses that when the memory changes: the words are new. (a_confirmed_copy_still_follows_its_source)
  • A project's memory folder moved before the old name is linked to the new one gets new copies, ones you had removed included. The old copies are archived, or kept if you edited them, and the archived ones come back if you move the folder back. (a_folder_moved_with_no_link_is_copied_anew)
  • Do not rename or switch your notes folder once brain has followed memory, even after brain memory unfollow: copies made before stop following their sources, ones you had removed can be copied again, memories archived before are not brought back, and there is no supported way yet to tie them back. (a_renamed_vault_folder_stops_following_its_copies)
  • brain import run between a memory folder's move and the next pass copies that project again under its new name. (an_import_between_a_move_and_the_first_follow_copies_the_project_again)
  • A linked project whose new name brain has never copied: a file of the same name there is taken for the old memory renamed, and the copy takes its words. If it was a different memory, the old words are not kept. (a_linked_name_never_copied_takes_the_old_copy_and_its_words)
  • A copy you removed is written again if its project was linked to one that has its own copy of that memory and you later undo the link. (a_removed_copy_is_made_again_after_a_link_is_undone)
  • A pass killed after writing copies and before saving its record leaves those copies reading as yours, so they stop following. (a_pass_killed_before_the_ledger_save_leaves_its_copies_as_the_persons, a_changed_copy_cut_short_before_the_ledger_save_is_not_taken_for_the_old_one)
  • A followed folder that is reset takes those memories out of search until it is restored. (a_folder_reset_and_restored_in_halves_leaves_the_vault_as_it_was)
  • A supersedes naming a memory copy does not count when the copy reads as later than the note naming it, even if that date is only something the memory mentions. corrects: with the copy's id or path counts whatever the dates say. (a_later_date_in_a_memory_copy_outdates_a_supersedes_naming_it)
  • A memory that is removed and written again every few minutes moves its file each time. (a_source_that_comes_and_goes_moves_its_file_each_time)
  • An archived file you move elsewhere, or rewrite without its id, reads as deleted and its memory is not copied again; one you moved into your notes is a note there, and its traces stay if the index has seen it by then, as it does while the daemon runs. So does every one of them read as deleted if your notes folder is copied without _archive. (an_archived_file_rewritten_without_its_id_reads_as_deleted, an_archived_file_moved_into_the_notes_keeps_its_traces, a_vault_without_its_archive_folder_reads_as_the_files_deleted)
  • An archived file you move back by hand while its source is still gone is archived again. (an_archived_file_moved_back_while_its_source_is_gone_is_archived_again)
  • After you follow a different folder, memories archived before are not brought back; one that returns is copied afresh, and the archived file stays. brain no longer tracks that file, so deleting it purges nothing. (another_followed_folder_restores_nothing_and_takes_no_id)
  • brain import of an archived memory's source writes a fresh copy with a new id, and the archived file stays. brain no longer tracks that file, so deleting it purges nothing. (an_import_copies_an_archived_memory_afresh)

Connect your AI

  • Claude Code: brain connect claude-code. It runs Claude Code's own claude mcp remove and claude mcp add for a user-scope server named brain, so it replaces any server of that name you added yourself, and it writes no file of Claude Code's itself; start a new session afterwards. It also installs a plugin through claude plugin, from a folder in brain's own data folder, with five hooks that each call brain hook, and the commands /brain:setup, /brain:tutorial (also /brain:walkthrough and /brain:guide) and /brain:help. Setup run there for the first time goes on into the tutorial: four short steps on your own notes, each a question you answer in chat. Before brain is set up its eleven tools only say how to start setup. A hook answers within 250 ms or says nothing, and never blocks a session. After Claude Code writes or edits a note in your notes folder, brain tells it what that write put wrong (frontmatter brain cannot read) with the fix to make; the save has already happened. Two more checks are off until config.toml asks for them: [guards] with dashes = true (no em or en dash in a note's words), require = ["source"] (frontmatter keys a note has) and require_in = ["3-permanent"] (the folders require holds in; every folder when left out; brain status names one outside your notes folder). With dashes = true, capture and correct make those dash fixes in your words before saving them, and say which lines they changed. Notes changed any other way are not checked. The check after a write runs only from that plugin, so an AI connected to brain's tools alone gets none; brain status says when brain connect claude-code has not written the plugin. A session starts with the notes due for review; name a memory folder with --index <folder> and its MEMORY.md is shown too, unless it looks like it holds a key or password. What brain records about each one is in docs/traces.md.
  • Claude Desktop: open brain-<version>.mcpb from the release page. The extension's copy of brain hands every connection to the brain you installed, so it needs the install above first.

Both reach your notes through the same eleven tools: search your brain, search only the notes that are not private, capture, correct, say a note is still true, due, three for rooms, setup, and the guided first run.

Rooms

A room lets your AI sessions leave each other messages on this computer, even sessions signed in to different Claude accounts. A room is the folder rooms/<name>/ in your vault and each post is a private note in it, so search finds posts and nothing leaves the machine. room_post writes a post (to squads unless a room is named), room_new shows the posts a session has not seen yet, and room_list lists the rooms. Give each session its own name with brain connect claude-code --as "<name>", or pass as on a call; without one, posts carry the name brain was set up with. The same works from a terminal: brain room post <text>, brain room new and brain room list.

Commands

  • brain setup: set brain up, taking the defaults, or --guided to be asked. On a brain already set up it restarts a running daemon and starts none.
  • brain init, brain status, brain update: set up over an empty folder or one of brain's own notes, see what the index holds, install the newest signed release.
  • brain start, brain stop, brain daemon: keep the index up to date at every login or in a terminal.
  • brain index, brain search, brain show, brain gaps, brain due: index now, search, print a note, list unanswered questions, the oldest 20 notes due for review (--all for every one) and recent notes with something left open.
  • brain add, brain correct, brain inbox, brain inbox keep, brain inbox skip: write a note into the inbox, correct one, and work through the inbox.
  • brain connect, brain mcp: connect an AI tool, and serve it.
  • brain meetings, brain meetings open: list your recorded meetings by date and length, and open one in TextEdit. brain prints no name and no word of them. brain meet records one, once the meet extension is installed: from a checkout, scripts/install-meet.sh builds and installs it (macOS 26 on Apple Silicon). Then brain meet check proves both sides are heard, brain meet --no-ai records a call your AI will not see, and brain meet retry and brain meet drop deal with one that was never written up.
  • brain calls: the last tool calls your AI tools made and what each asked. No reply and no captured text is kept.
  • brain memory follow, brain memory run, brain memory unfollow: follow Claude Code's auto-memory.
  • brain transcripts status, brain transcripts on, brain transcripts off, brain transcripts pause, brain transcripts resume: whether past sessions are read.
  • brain transcripts keep, brain transcripts skip, brain transcripts unskip, brain transcripts agents: what of them is kept.
  • brain transcripts run, brain transcripts search, brain transcripts reset: read what is due now, search it, set the store aside.
  • brain transcripts delete: take a session or days out for good; it only says what it would take until --apply.
  • brain import learning-loop: copy another brain's notes in. A copy gets no review date until you say it is still true: then brain asks again in 90 days, or [review] days in config.toml (7 to 365).
  • brain import clear-review-dates --imported-on <day>: take out the review dates 0.2.5 and earlier stamped on what they imported. It only lists them until --apply. A date you confirmed stays.
  • brain room post, brain room new, brain room list: leave and read messages between sessions.
  • brain usage, brain usage on, brain usage off: see and set what omit is sent.
  • brain setup reminders: turn brain's reminder to run setup off or on.

What omit sees

omit looks at usage, never at notes. brain sends one report a day of counts of its own use, and never note text, titles, questions or paths. docs/usage.md lists every field, and brain usage off stops it. Sending is on by default. brain also downloads its search model from Hugging Face on first use, and the installed daemon checks GitHub for updates.

About

Your notes, searchable on your own computer, for you and your AI

Resources

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages