getdevbrain
v1.0.0
Published
Git-backed prompt memory and resume skills for Claude Code and Codex — the log is the agent.
Downloads
22
Maintainers
Readme
Every prompt is captured to a private, git-synced markdown store, distilled into a searchable brain, and replayable by any future session or machine. Markdown + git is the source of truth; everything else is a rebuildable projection. Built for Claude Code, with the same workflows installed as skills in other agents (e.g. Codex).
How It Works
devbrain install wires Claude Code (and any other installed agents) on this machine, then gets out of the way:
A. Capture every prompt → raw markdown log automatic, model-free · source of truth
B. Brain /distill → brain pages + queue markdown on disk · searchable, rebuildable
C. Assemble /continue → brief + work top task opens a minimal-MVP PR · /loop to drainThe hooks are devbrain hook <event> commands registered in the agent's
settings.json — a UserPromptSubmit hook logs every prompt verbatim; a 5-min timer
commits and pushes it off-machine. Config lives at ~/.config/devbrain/config.json.
The markdown log layout is the same across agents, with only header metadata naming
which one. /distill folds new log into linked brain pages and queue tasks;
/continue pulls what's relevant, briefs you, and works the top task. The log is keyed
by git remote, so all worktrees of a repo collapse to one project. Full design in
DESIGN.md.
Only the system ships. devbrain is a single binary. Your prompts and brain live in
a separate private store at ~/devbrain-data that you own — devbrain install
creates it; give it a private remote to back up and sync.
Install
brew install TheWeiHu/devbrain/devbrain
devbrain installNo Homebrew? go install github.com/TheWeiHu/devbrain/cmd/devbrain@latest or grab a
release tarball and put devbrain on PATH.
devbrain install is idempotent and wires only this machine. In a terminal it asks
y/n per component; non-interactive runs take every default. When it finishes it opens
the browser dashboard (devbrain queue — Board · Nightshift · Profile). Common flags:
devbrain install --without nightshift # skip the overnight loop
devbrain install --only capture # just the prompt-capture hook
devbrain install --no-open # don't auto-open the dashboard
DEVBRAIN_DATA=~/path devbrain install # store the brain elsewheredevbrain needs only your coding agent and Git — no python3 or Node. Some agents may
ask you to review and trust the installed hooks with /hooks on next startup; that
is their normal hook trust flow.
Daily Use
| Command | What it does |
|---|---|
| (automatic) | every prompt captured; flusher commits and pushes every 5 min |
| /distill | fold new log → brain pages and queue tasks |
| /continue | resume: brief, then work the top task as a minimal-MVP PR |
| /work | lean drain turn: top task → MVP PR, no fold-in/briefing (for /loop + nightshift) |
| /loop /work | keep draining the queue fast, one MVP PR per task |
| /reconcile | mark brain facts the live repo contradicts (auto-runs ~daily) |
| gbrain search / devbrain brain search | query the brain from the shell (gbrain if installed, else offline grep) |
| devbrain queue | browser control plane for the queue (view · edit · prioritize · unblock) |
| devbrain help | every devbrain subcommand |
The brain records what happened; the queue records what's next — one markdown file
per task, priority-ranked. /distill fills it, /continue drains it, and a task isn't
done until its PR merges. Agents without slash commands run the same workflows as
skills ($distill, $continue, $work, $reconcile).
nightshift
Run several claude workers in parallel against the queue, each in its own worktree,
auto-merging green work onto a throwaway nightshift branch — you wake to one
git diff main...nightshift.
devbrain nightshift start ~/nightshift/myrepo # launch the fleet (runs until stopped)
devbrain nightshift watch # live browser dashboard
devbrain nightshift stop # stop the fleetInstalling it never spawns anything — the fleet runs only when you start it, and it
does autonomous git ops and spends real tokens, so point the first runs at a throwaway.
You stay the only nightshift → main gate.
More
DESIGN.md— architecture, the TODO queue, and the golden rule (never lose the log)SECURITY.md— what's captured, where it's stored, who can see it, and how to report a vulnCHANGELOG.md— release historymake test— run the full suite- Ranked + semantic brain search comes from the optional gbrain engine, installed by default; skip it with
devbrain install --without-gbrainand the offlinedevbrain brain searchstill works. devbrain import— seed the brain from your existing agent transcripts.- Re-run
devbrain installanytime; it only adds what's missing. Tear down withdevbrain uninstall(leaves your data untouched).
