Your notes and your AI chats, in one searchable brain that stays on your computer.
Ask it a question in plain words and get a short answer with the notes it used. Your Claude Code and Codex chats become notes too, with keys and tokens removed first. Nothing is sent anywhere unless you set up an online writer yourself.
Ready to try it? Jump to the Quickstart.
|
One folder. One search. Your computer. The brain is a plain folder of notes (by default
|
|
Past chats turn into notes you can search. Claude Code and Codex are supported today. Gemini, ChatGPT exports and Cursor are not yet.
Secrets go first. Keys, tokens, passwords in links and private key blocks become
[redacted] before anything is saved. Redaction cannot be turned off; to skip it, skip the source. Your own email address is dropped once you list it ([email protected], or one address per line in ~/.config/second-brain/own-emails).
You choose what goes in.
brain onboard shows what it found and reads nothing until you say. The default is nothing. This is a real run on a made-up folder:
|
Plain words in. Notes and sources out.
For meaning-based search (so "restart" finds a note that says "reload"), run |
Run |
| Folder | What |
|---|---|
bin/ |
The brain command and small wrappers |
ask/ |
Search and ask: the answer writers, the chat proxy, the memory store |
chats/ |
Turns Claude Code and Codex chats into notes and removes secrets |
index/ |
The qmd search config, onboarding, the reindex scripts and optional systemd units |
day/ |
Day pages, standups and the canvas page |
jobs/ |
Small jobs: remember, remind, open a note, start a Claude |
media/ |
Notes for pictures and videos your agents make |
eval/ |
A weekly check-up that scores the search on questions you give it |
deciders/ |
The privacy list guard (decider tools are optional and not part of this repo) |
deck/ |
The Deck: a 3D map of your notes |
It lives on your computer. The brain is a plain folder. It never lives inside a repository and is never pushed.
Chats are redacted before they become notes.
The private list. Put words in
deciders/private.json (copy private.example.json) and any ask that contains them is kept away from online models. An empty or broken list stops anything being sent.
The private folder is for the Deck and Obsidian. Notes in
~/brain/private show up only when you search from the Deck or Obsidian. brain search and brain ask in a terminal, the island and every coding agent get the brain without them: an agent typing into a terminal looks just like you.
Folders you choose stay where they are. The search reads them in place and never changes them.
You need Python 3.12 or newer, git and the Python package pyyaml, plus qmd, the local notes search (npm i -g @tobilu/qmd, needs Node 22.12 or newer). Optional: Ollama with a small model for brain ask; numpy and Node for the Deck; Claude Code if you want your chats turned into notes.
An AI agent can follow these steps from a fresh clone. Each step says what you should see.
- Get the code:
git clone https://github.com/DogmaLabsTech/second-brain.git, then go into the folder. - Check the computer: run
./install.sh. You should see "ok" for each needed tool and a line that says Ready. Fix anything marked MISSING and run it again. (./install.sh --jsongives the same answer for scripts.) - Choose what goes in: run
bin/brain onboard. It lists the notes folders and AI chat histories it found and asks about each one. Say no to anything you do not want. Or, without questions:bin/brain onboard --yes --notes ~/notes --sessions claude - Try it: run
bin/brain search "something from your notes". You should see paths and snippets. - Optional: put
bin/brainon your PATH, for exampleln -s "$PWD/bin/brain" ~/.local/bin/brain
More detail and a checklist for a brand-new machine: docs/getting-started.md.
- Run things on a timer:
index/install-units.shcopies the systemd user units into place with your real path filled in. It enables nothing. Turn on only the timers you want. - The Deck: see deck/README.md.
- Local models: install Ollama and pull a small model, for example
ollama pull qwen2.5:3b. SetBRAIN_LOCAL_MODELto use another.
Run bin/test. It runs every folder in a throwaway home, so it never touches your real notes. Tests that need your own data or services skip themselves.
agent-os is the desk that talks to your AI team. Its agent-os start step finds this brain, shows what it could read and ingests only what you choose. The brain works on its own too; agent-os is optional.
The code is MIT licensed (LICENSE). The pictures in docs/media/readme/ are CC BY 4.0 (LICENSE-ART); make_art.py there draws them. Third-party notices are in NOTICE.