Skip to main content

Dotbrain

Dotbrain

English | 简体中文

PyPI CI Python License: MIT Documentation

Private project context for Claude Code and Codex.

Dotbrain brings the Dotfiles convention to your project work. Keep your working notes, plans, instructions, and selected agent resources in a private home, then wire them into the checkouts where you work.

Your context stays in local files with its own Git history. The CLI connects your workspace to the code repo; the plugin's workflow skills guide how your agent uses and maintains it with you.

https://github.com/user-attachments/assets/540e8945-b8bc-4fc1-ac05-c125bf768fa9

Documentation · Getting started · The workflow

Why I built it

Global agent instructions describe how I want my agent to behave at user level. Shared repository instructions describe how anyone should work on the code. My own reasoning, working notes, and plans for a particular project need a private home.

Mine were scattered across Obsidian, gitignored notes, and agent memory. Finding that context and bringing it into another session took effort. So did making my selected skills and subagents available in a new checkout. I built Dotbrain to keep that project workspace together and make connecting it to where I work repeatable.

Read the story behind Dotbrain: Dotfiles for Your Repo.

Is this for you?

Use Dotbrain when you need a private project workspace you want to keep developing across agents, sessions, or worktrees: context you've built up, plans in progress, and your own instructions and selected skills for the work.

It works alongside your agent's memory system and other context tools. The workspace is yours; you decide which outcomes belong in shared repository docs or public proposals.

If a few standing instructions in AGENTS.md or CLAUDE.md cover your needs, keep it simple.

Get started

Install the plugin into your coding agent. You do not need to clone this repo.

Claude Code — send these as two separate prompts:

/plugin marketplace add arminzou/dotbrain
/plugin install dotbrain@dotbrain

Codex:

codex plugin marketplace add arminzou/dotbrain
codex plugin add dotbrain@dotbrain

In Codex, open /hooks, trust the dotbrain hook, then start a new thread. On Windows, enable Developer Mode before wiring so Dotbrain can create directory symlinks without Administrator privileges.

Then ask your agent:

Use wire-brain to wire this repo with Dotbrain.

The skill installs the matching CLI, uv, and Beads if needed, prepares the machine, and wires the repo to its private Brainspace. Check the result with:

dotbrain doctor

Start a fresh agent session in the wired repo to load the Dotbrain convention. It tells the agent where to find your project context and how to work with it. See Getting started for manual installation, backups, a second machine, and troubleshooting.

Update

Update the plugin and the CLI together. In Claude Code, run /plugin, update dotbrain from the menu, then /reload-plugins. In Codex:

codex plugin marketplace upgrade
codex plugin add dotbrain@dotbrain

Then upgrade the CLI and reconcile your machine and projects:

uv tool install dotbrain@latest
dotbrain bootstrap
dotbrain refresh --all

Installed the CLI with pipx or pip? Upgrade with that tool instead. See Staying current.

How it works

Each project has a Brainspace under your private dotbrain home, by default ~/dotbrain/. It holds the Brain (.brain/: local Markdown files for project rules, vocabulary, decisions, and designs) and an execution store (.beads/: issues tracked with Beads). Gitignored symlinks make both available through the checkout while their files and history stay outside the code repo.

Claude Code and Codex work in the code repo. Gitignored links connect it to a separate private Brainspace holding the Brain and Beads.

Wiring also delivers selected skills and subagents into the repo's agent workspaces, .claude/ and .codex/. Skills and Claude agents use symlinks; Codex agents use generated, Git-ignored TOML files. Wiring a Git worktree connects it to the main checkout's existing Brainspace, so both use the same knowledge and tracker.

At session start, the plugin hook supplies DOTBRAIN.md, the shared convention. The agent then reads the project's private rules and retrieves the context the task needs. Workflow skills guide how it consults that context and records what you work out together. See Session context for the loading sequence.

Use dotbrain projects list to discover registered projects. Inside a wired checkout, dotbrain refresh maintains that checkout and dotbrain unwire detaches it while retaining the shared Brainspace. From elsewhere, select --project <name>; use refresh --all for registered projects. Machine-global asset reconciliation is explicit: skills link --scope global or agents link --scope global.

Git versions the Brain. Back it up to a private remote; the Beads database is Git-ignored and needs its own Dolt remote or shared server to back up or share issues. See Architecture, Wiring, and Beads backend for details.

The loop

Every piece of work should leave the next session better informed. Dotbrain's bundled skills carry work from idea to implementation, then return what you learned to the project's context.

Workflow skills guide work through decisions, design, issues, execution, review, and closure. Discoveries update the active design; lasting decisions return to the Brain for the next initiative.

The loop closes in two places:

  • During the work: discoveries feed back into the active design and affected issues. An unexpected API constraint becomes a design question; once you settle it, the design and issues capture the decision before implementation continues.
  • After review: closing the design records the evidence and preserves useful decisions and vocabulary in the Brain. The next initiative starts with that knowledge already available.

The Brain holds durable knowledge, the design holds current intent, and Beads holds execution state. Each handoff lives in a document or tracker entry that another session or agent can consult to continue the work.

You own the success criteria and the final review decision. Use the full loop when work spans sessions or carries open questions; small changes can use just the steps they need.

See The workflow for a walkthrough and Skills for the full catalog.

Develop

The CLI is a uv-managed Python package.

git clone https://github.com/arminzou/dotbrain.git
cd dotbrain
uv sync
uv run dotbrain --help
uv run pytest

For an editable CLI, run ./scripts/dev-install.sh (or .\scripts\dev-install.ps1 on Windows), then dotbrain bootstrap. Bundled skills are authored in plugin/skills/. See the CLI reference for commands and options.

For bug reports and pull requests, see Contributing.

Released under the MIT License.

Metadata

Release files for dotbrain 0.8.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for dotbrain 0.8.0
File Size Uploaded
dotbrain-0.8.0.tar.gz 2.9 MB Details

Built distribution (wheel)

Table of built distributions (wheels) for dotbrain 0.8.0
File Interpreter ABI Platform
dotbrain-0.8.0-py3-none-any.whl Python 3 none any Details

Total release size: 3.0 MB

Release files / dotbrain-0.8.0.tar.gz

Download URL dotbrain-0.8.0.tar.gz
Size 2.9 MB
Tags Source
SHA-256 checksum
How to use checksums
90495a96f7ef1d8ccb3555f435477ef06ed01963a4931600e5276d6b093489fa
BLAKE2b-256 checksum
How to use checksums
cb57c877d4ac188ab2eac0c9923832b72909341d81f808e0dd69bd90fd03fdc6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.13.1 {"installer":{"name":"uv","version":"0.13.1","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / dotbrain-0.8.0-py3-none-any.whl

Download URL dotbrain-0.8.0-py3-none-any.whl
Size 143.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
9b444eba0b57832e4bca5ba100f9dec2bb541c1300b9e939a6a84baa9918a9e6
BLAKE2b-256 checksum
How to use checksums
776d432e9880164896c5a107bacb52a7be8e11ca955aea9be1275f519a366746
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.13.1 {"installer":{"name":"uv","version":"0.13.1","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release history Release notifications | RSS feed

0.9.0

2 release files

This release

0.8.0 This release

2 release files

0.7.0

2 release files

0.6.1

2 release files

0.6.0

2 release files

0.5.1

2 release files

0.5.0

2 release files

0.4.6

2 release files

0.4.5

2 release files

0.4.4

2 release files

0.4.3

2 release files

0.4.2

2 release files

0.4.1

2 release files

0.4.0

2 release files

0.3.5

2 release files

0.3.4

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page