1. Project Overview & Quickstart (gastownhall/beads)
File: README.md
bd - Beads
Distributed graph issue tracker for AI agents, powered by Dolt.
Platforms: macOS, Linux, Windows, FreeBSD
Docs: https://beads.gascity.com/
Beads provides a persistent, structured memory for coding agents. It replaces messy markdown plans with a dependency-aware graph, allowing agents to handle long-horizon tasks without losing context.
flowchart LR
create["bd createnew bead"] --> depgraph["dependencygraph"]
depgraph --> ready["bd readyclaimable work"]
ready --> claim["bd update --claimagent takes it"]
claim --> close["bd closework done"]
close -->|blockers released| ready
depgraph <-->|"bd dolt push / pull"| remote[("other machinesand agents")]โก Quick Start
# Install beads CLI (system-wide - don't clone this repo into your project)
curl -fsSL https://raw.githubusercontent.com/gastownhall/beads/main/scripts/install.sh | bash
# Initialize in YOUR project
cd your-project
bd init
# Optional: refresh or install richer instructions for your agent
bd setup codex # Codex CLI - installs skill, AGENTS.md guidance, and hooks
bd setup claude # Claude Code - installs hooks/settings
bd setup factory # Factory.ai Droid - creates/updates AGENTS.mdNote: Beads is a CLI tool you install once and use everywhere. You don't need to clone this repository into your project.
bd init creates or updates AGENTS.md by default so agents can discover the beads workflow, and also installs project Claude/Codex integrations unless you pass --skip-agents or --stealth. Use bd setup --list to see supported integrations, including bd setup codex, bd setup factory, bd setup claude, bd setup mux, bd setup cursor, and more. See Agent and IDE setup.
Manual copy-paste is only for unsupported agents, existing projects where you cannot rerun bd init/bd setup, or custom instruction files. In those cases, run bd onboard and paste the printed snippet into the file your agent reads.
If your agent is not covered by bd setup, add this minimal AGENTS.md section:
This project uses bd (beads) for issue tracking.
- Run `bd prime` for workflow context and command guidance.
- Use `bd ready`, `bd show `, `bd update --claim`, and `bd close `.
- Use `bd remember "insight"` for persistent project memory; do not create MEMORY.md files.
- Do not use markdown TODO lists for task tracking.๐ Features
- Dolt-Powered: Version-controlled SQL database with cell-level merge, native branching, and built-in sync via Dolt remotes.
- Agent-Optimized: JSON output, dependency tracking, and auto-ready task detection.
- Zero Conflict: Hash-based IDs (
bd-a1b2) prevent merge collisions in multi-agent/multi-branch workflows. - Compaction: Semantic "memory decay" summarizes old closed tasks to save context window.
- Messaging: Message issue type with threading (
--thread), ephemeral lifecycle, and mail delegation. - Graph Links:
relates-to,duplicates,supersedes, andreplies-tofor knowledge graphs.
๐ Essential Commands
| Command | Action |
|---|---|
bd ready |
List tasks with no open blockers. |
bd create "Title" -p 0 |
Create a P0 task. |
bd update --claim |
Atomically claim a task (sets assignee + in_progress). |
bd dep add <child> |
Link tasks (blocks, related, parent-child). |
bd show |
View task details and audit trail. |
bd prime |
Print agent workflow context and persistent memories. |
bd remember "insight" |
Store project memory that bd prime injects later. |
๐ Hierarchy & Workflow
Beads supports hierarchical IDs for epics:
bd-a3f8(Epic)bd-a3f8.1(Task)bd-a3f8.1.1(Sub-task)
Stealth Mode: Run bd init --stealth to use Beads locally without committing files to the main repo. Perfect for personal use on shared projects. See Git-Free Usage below.
Contributor vs Maintainer: When working on open-source projects:
- Contributors (forked repos): Run
bd init --contributorto route planning issues to a separate repo (e.g.,~/.beads-planning). Keeps experimental work out of PRs. - Maintainers (write access): Beads auto-detects maintainer role via SSH URLs or HTTPS with credentials. Only need
git config beads.role maintainerif using GitHub HTTPS without credentials but you have write access.
๐ฆ Installation
brew install beads # macOS / Linux (recommended)
npm install @beads/bd # Node.js usersOther methods: install script | go install | from source | Windows | Arch AUR
Requirements: macOS, Linux, Windows, or FreeBSD. See docs/getting-started/installation.md for complete installation guide.
Upgrading? Replacing the binary is not always the whole story. Short
version: sync remote-backed databases with your current bd, back up withbd export --all, upgrade the binary, then run bd info --whats-new,bd hooks install, and bd version. If the upgrade crosses a schema
migration on a remote-backed database, exactly one designated clone runsbd migrate and bd dolt push; other clones install the new binary
and run bd bootstrap. See the full
upgrade guide
or docs/getting-started/installation.md.
Security And Verification
Before trusting any downloaded binary, verify its checksum against the release checksums.txt.
The install scripts verify release checksums before install. For manual installs, do this verification yourself before first run.
On macOS, scripts/install.sh preserves the downloaded signature by default. Local ad-hoc re-signing is explicit opt-in via BEADS_INSTALL_RESIGN_MACOS=1.
See docs/reference/antivirus.md for Windows AV false-positive guidance and verification workflow.
๐พ Storage Modes
Beads uses Dolt as its database. Two modes:
- Embedded (default) โ
bd init. Dolt runs in-process, data lives in.beads/embeddeddolt/, single writer. Recommended for most users. - Server โ
bd init --server. Connects to an externaldolt sql-server
for multiple concurrent writers; data lives in.beads/dolt/.
Cross-machine sync uses bd dolt push / bd dolt pull againstrefs/dolt/data on your git remote; .beads/issues.jsonl is an export for
viewers and interchange, not the source of truth or a backup. Back up and
migrate between modes with bd backup; reclaim space with bd prune /bd purge.
Full detail โ connection flags, sockets, maintenance, backup, and migration โ
in the Dolt backend guide.
Schema Version Guard
bd checks the database schema version at open time. If the database has been
migrated by a newer binary and an older binary tries to open it, bd exits
with an actionable error rather than issuing queries that fail with cryptic SQL
errors:
schema version mismatch: database is at v45, binary knows up to v42 (3 migrations ahead)
Your bd binary is stale. Queries for dropped or renamed columns will fail
with cryptic SQL errors (e.g. "column X could not be found in any table in scope").
Rebuild from main:
CGO_ENABLED=0 go build -tags gms_pure_go ./cmd/bd
Or install the latest release:
CGO_ENABLED=0 go install -tags gms_pure_go github.com/steveyegge/beads/cmd/bd@latest
To proceed despite the risk (some read commands may still work):
BD_IGNORE_SCHEMA_SKEW=1 bd <command>
bd --ignore-schema-skew <command>When this fires: only when the database schema is ahead of the binary
(a newer binary migrated the database; this binary doesn't know those
migrations). Normal upgrades, where the binary migrates the database forward,
are unaffected.
Escape hatch: BD_IGNORE_SCHEMA_SKEW=1 (or --ignore-schema-skew) bypasses
the guard with a warning on stderr. Use this only if you know the forward
migrations are additive and safe for your specific workload.
๐ Community Tools
See docs/community-tools.md for a curated list of community-built UIs, extensions, and integrationsโincluding terminal interfaces, web UIs, editor extensions, and native apps.
See docs/related-projects.md for adjacent or complementary projects that solve different problems in the same neighborhood.
๐ Git-Free Usage
Beads works without git. The Dolt database is the storage backend โ git
integration (hooks, repo discovery, identity) is optional.
# Initialize without git
export BEADS_DIR=/path/to/your/project/.beads
bd init --quiet --stealth
# All core commands work with zero git calls
bd create "Fix auth bug" -p 1 -t bug
bd ready --json
bd update bd-a1b2 --claim
bd prime
bd close bd-a1b2 "Fixed"BEADS_DIR tells bd where to put the .beads/ database directory,
bypassing git repo discovery. --stealth sets no-git-ops: true in
config, disabling all git hook installation and git operations.
This is useful for:
- Non-git VCS (Sapling, Jujutsu, Piper) โ no
.git/directory needed - Monorepos โ point
BEADS_DIRat a specific subdirectory - CI/CD โ isolated task tracking without repo-level side effects
- Evaluation/testing โ ephemeral databases in
/tmp
๐ Documentation
- Documentation site | Installing | Sync Concepts | Agent Workflow | Copilot CLI Setup | Copilot VS Code MCP | Articles | Sync Branch Mode | Troubleshooting | FAQ
File: docs/architecture/dolt.md
title: Dolt Backend for Beads
Beads uses Dolt as its storage backend. Dolt provides a version-controlled SQL database with cell-level merge, native branching, and two deployment modes.
Why Dolt?
- Native version control โ cell-level diffs and merges, not line-based
- Multi-writer support โ server mode enables concurrent agents
- Built-in history โ every write creates a Dolt commit
- Native branching โ Dolt branches independent of git branches
- Single-binary option โ embedded mode for solo users (no server needed)
Getting Started
Install Dolt (Server Mode Only)
Embedded mode includes everything in the bd binary; no separate Dolt install
is needed. Install the standalone dolt CLI only when you want to run server
mode or work directly with the database via dolt sql.
Install a specific version. Do not install releases/latest โ see
Which Dolt version to install for the
version to use and why the pin exists.
DOLT_VERSION=2.2.0 # see "Which Dolt version to install" below
os=$(uname -s | tr '[:upper:]' '[:lower:]')
arch=$(uname -m | sed -e 's/^x86_64$/amd64/' -e 's/^aarch64$/arm64/')
curl -fsSL "https://github.com/dolthub/dolt/releases/download/v${DOLT_VERSION}/dolt-${os}-${arch}.tar.gz" \
| tar -xz -C /tmp
sudo install -m 0755 "/tmp/dolt-${os}-${arch}/bin/dolt" /usr/local/bin/dolt
# Verify you got the version you asked for
dolt versionbrew install dolt installs whatever version the Homebrew formula currently
points at, which is not pinned. If you install that way, check dolt version
against the pin below.
Which Dolt version to install
Beads pins Dolt to 2.2.0. CI installs that same pin withscripts/ci/install-dolt.sh, which records the per-version measurements and
the criterion for raising it; raise the pin here and in that script together.
This pin is about the standalone dolt CLI, which only server and
proxied-server mode use. Embedded mode is unaffected either way: it links the
Dolt engine into bd at the version in go.mod, currently the commit tagged
v2.2.0 upstream, no matter which dolt CLI is on your PATH.
Dolt 2.3.0 (released 2026-08-13) regressed CALL DOLT_RESET('--hard'). A few
percent of freshly created databases come up with that procedure unusable โ
every call answers Error 1105 (HY000): context canceled, from any session
and any new connection, for the life of that server process. Nothing else
about the database looks wrong: SELECT 1, CALL DOLT_CLEAN(),CALL DOLT_CHECKOUT('.'), CALL DOLT_COMMIT() and soft resets all work
normally, so the damage is invisible until something needs a hard reset.
Measured by creating fresh databases and immediately calling the procedure:
| Dolt version | Fresh databases with DOLT_RESET('--hard') broken |
|---|---|
| 2.1.8 | 0 / 40 |
| 2.2.0 | 0 / 60 |
| 2.3.0 | 3 / 60 |
| 2.3.1 | 3 / 100 |
Versions after 2.3.1 have not been measured. Raise the pin only once a newer
release is confirmed clean by that same measurement โ not because it is
newer.
Pin rather than track latest for a second, independent reason: the upstreamreleases/latest URL resolves to the most recently created release, not the
highest version, so it can move backwards โ v1.88.2 was created on
2026-08-17, after both v2.2.4 and v2.3.0.
If you are already running 2.3.x
Whether a database is affected is decided per database, when it is created โ
two databases on the same server can differ โ so check each one you care
about, against the server that is actually serving it:
# 1. The working set must be clean first: on a dirty working set a hard
# reset discards uncommitted changes. If this returns any rows, commit
# or clean up before step 3.
dolt sql -q "SELECT * FROM dolt_status"
# 2. Control โ this must succeed. If it does not, you have a different
# problem and step 3 proves nothing.
dolt sql -q "SELECT 1"
# 3. On a clean working set this is a no-op on a healthy database.
dolt sql -q "CALL DOLT_RESET('--hard')"Step 2 succeeding while step 3 answers Error 1105 (HY000): context canceled
is the discriminating result โ that database is affected. Both succeeding
means it is not.
The breakage lives in the running server process, not on disk, so restartingdolt sql-server clears it โ verified by re-running the check on an affected
database after a restart, with a healthy database on the same server as the
control. A restart re-rolls the dice for every database, though, so the
durable fix is to move to the pinned version.
This matters because bd flatten and the Dolt-history compaction inbd admin compact both finish by hard-resetting main onto a temporary
branch, and the merge-settle path behind bd dolt pull / bd sync falls
back to a hard reset when it has to abandon a merge. See
Maintenance.
New Project
# Embedded mode (single writer, no server โ default for standalone)
bd init
# Server mode (multi-writer, e.g. orchestrator)
gt dolt start # Start the Dolt server
bd init --server # Initialize with server modeMigrate from SQLite (Legacy)
If upgrading from an older version that used SQLite:
Note: The
bd migrate --to-doltcommand was removed in v0.58.0.
For pre-0.50 installations with JSONL data, use the migration script:bashscripts/migrate-jsonl-to-dolt.shSee Troubleshooting if you encounter connection errors after migration.
Migration creates backups automatically. Your original SQLite database is preserved as beads.backup-pre-dolt-*.db.
Modes of Operation
flowchart LR
subgraph embedded["Embedded mode (default) โ bd init"]
bd1["bd processDolt runs in-process"] --> d1[(".beads/embeddeddolt/single writer, file-locked")]
end
subgraph server["Server mode โ bd init --server"]
bd2["bd (agent 1)"] --> srv["dolt sql-server"]
bd3["bd (agent 2)"] --> srv
srv --> d2[(".beads/dolt/concurrent writers")]
endEmbedded Mode (Solo / Standalone)
In-process Dolt engine โ no separate server needed. This is the default for
standalone Beads users. The bd binary includes everything; just bd init and go.
- Single-writer (one process at a time)
- Data lives in
.beads/embeddeddolt/alongside your code - Push to GitHub with
bd dolt pushโ code and issues in one repo - Zero ops: no server, no ports, no PID files
Server Mode (Multi-Writer / Orchestrator)
Connects to a running dolt sql-server for multi-client access.
# Start the server (orchestrator)
gt dolt start
# Or manually
cd ~/.dolt-data/beads && dolt sql-server --port 3307# Initialize in server mode
bd init --server
# Or switch via environment variable
export BEADS_DOLT_SERVER_MODE=1# .beads/config.yaml (server mode settings)
dolt:
mode: server
host: 127.0.0.1
port: 3307
user: rootConfigure the connection with flags or environment variables:
| Flag | Env Var | Default |
|---|---|---|
--server-host |
BEADS_DOLT_SERVER_HOST |
127.0.0.1 |
--server-port |
BEADS_DOLT_SERVER_PORT |
3307 |
--server-socket |
BEADS_DOLT_SERVER_SOCKET |
(none; uses TCP) |
--server-user |
BEADS_DOLT_SERVER_USER |
root |
BEADS_DOLT_PASSWORD |
(none) |
Unix domain sockets: Use --server-socket to connect via a Unix socket
instead of TCP. This avoids port conflicts between concurrent projects and is
useful in sandboxed environments (e.g., Claude Code) where file-level access
control is simpler than network allowlists. The Dolt server must be started
with dolt sql-server --socket . Auto-start is not supported in socket
mode.
Switch to server mode when you need:
- Multiple agents writing simultaneously
- Orchestrator multi-rig setups
- Federation with remote peers
Maintenance โ `bd prune` and `bd purge`
bd prune permanently deletes closed non-ephemeral beads to reclaim storage
and shrink auto-exports. bd purge does the same for ephemeral beads (wisps,
transient molecules). Both require --force to execute.
bd prune --older-than 30d # Preview closed beads >30d old
bd prune --older-than 30d --force # Delete them
bd prune --older-than 90d --dry-run # Detailed preview with stats
bd purge --force # Delete all closed ephemeral beadsReference-aware protection: bd prune automatically skips closed beads
whose ID appears in the description, notes, or comments of any open or
in-progress bead. This prevents accidental deletion of ADR, decision, and
verification beads that downstream work still cites. Use--ignore-references to override when cleaning up known-stale references:
bd prune --older-than 90d --ignore-references --forcebd purge is unaffected โ ephemeral beads' references are themselves
transient. For full Dolt storage reclaim after deleting many rows, follow
with bd flatten.
On Dolt 2.3.x, storage-reclaim operations can fail partway. bd flatten
and the Dolt-history compaction in bd admin compact both build a temporary
branch and then hard-reset main onto it, and the merge-settle path behindbd dolt pull / bd sync falls back to a hard reset when it abandons a
merge. On an affected database that hard reset returnsError 1105 (HY000): context canceled: bd flatten and bd admin compact
stop at that step, and an abandoned merge is left without its rollback. See
Which Dolt version to install for the check
and the fix.
Migrating Between Backends
You can migrate data between embedded mode and server mode using bd backup.
Both directions preserve full Dolt commit history.
bd export is not a substitute for this flow. JSONL exports contain issue
records from the issues table for migration and interoperability; they do not
capture Dolt branches, full commit history, working-set state, or non-issue
tables. Use bd backup or a manual Dolt backup when you need a restorable
database backup.
Server โ Embedded
Create a backup from the server-mode project:
bash# In the server-mode project directory bd backup init /path/to/backup-dir bd backup syncCreate a new embedded-mode project and restore:
bashmkdir new-project && cd new-project bd init # creates an embedded-mode project by default bd backup restore --force /path/to/backup-dir--forceoverwrites the freshly-initialized database with the backup
contents. The restore automatically:- Updates
metadata.jsonto match the restored project identity - Registers the backup directory for future
bd backup sync - Backfills the embedded migration tracker (
schema_migrations)
- Updates
Verify:
bashbd list bd backup status
Embedded โ Server
Create a backup from the embedded-mode project:
bash# In the embedded-mode project directory bd backup init /path/to/backup-dir bd backup syncCreate a new server-mode project and restore:
bashmkdir new-project && cd new-project bd init --server # creates a server-mode project bd backup restore --force /path/to/backup-dirVerify:
bashbd list bd backup status
Backup Commands Reference
| Command | Description |
|---|---|
bd backup init |
Register a backup destination (filesystem or DoltHub URL) |
bd backup sync |
Push database to the configured backup destination |
bd backup restore [path] |
Restore from a backup directory (--force to overwrite) |
bd backup remove |
Unregister the backup destination |
bd backup status |
Show backup configuration and last sync time |
Notes
- Data locations differ between modes:
.beads/embeddeddolt/(embedded) vs.beads/dolt/(server) - The backup directory is a full Dolt backup, not an
issues.jsonlexport โ it can be on a local drive, NAS, or DoltHub - You can also migrate via Dolt remotes (
bd dolt push/bd dolt pull) if both projects share a remote
The sections below are the canonical backend migration reference.
Federation (Peer-to-Peer Sync)
Federation lets independent Dolt-backed workspaces ("towns") sync issues
directly with each other via bd federation add-peer/sync/status,
without a central hub. Credentials are AES-256 encrypted and stored locally.
See Federation Setup Guide for the full setup guide, including
peer configuration, sovereignty tiers, sync/status/topology details, and
troubleshooting.
Dolt Remotes
Use bd dolt remote add to configure remotes. This ensures the running Dolt SQL
server sees the remote immediately. Remotes added directly with the dolt CLI
are written to filesystem config and may not be visible to the server until
restart.
# DoltHub (public or private)
bd dolt remote add origin https://doltremoteapi.dolthub.com/org/beads
# S3
bd dolt remote add origin aws://[bucket]/path/to/repo
# GCS
bd dolt remote add origin gs://[bucket]/path/to/repo
# Git SSH (GitHub, GitLab, etc.)
bd dolt remote add origin git+ssh://[email protected]/org/repo.git
# Local file system
bd dolt remote add origin file:///path/to/remotePush/Pull
bd dolt push
bd dolt pullbd dolt remote add registers the remote through the Dolt store API. SQL
remotes are the source of truth for bd dolt remote list, bd dolt push, andbd dolt pull.
For git-protocol remotes, credentialed external-server remotes, and cloud
remotes whose credentials are only present in the current shell, bd dolt push
and bd dolt pull automatically materialize a matching local CLI remote before
using the dolt CLI transport. The CLI remote is a local transport mirror, not
a separate configuration source.
If you are upgrading from an older beads version and previously added remotes
with raw dolt remote add, re-register them with bd dolt remote add <name> so they are visible through SQL. bd doctor reports legacy CLI-only or
mismatched CLI remotes under Dolt Remote Migration.
Sharing a Git repo: Dolt stores data under
refs/dolt/data, separate
from standard Git refs (refs/heads/,refs/tags/). You can safely point agit+ssh://remote at the same repository as your project source code. See
Dolt Git Remotes.
List/Remove Remotes
bd dolt remote list # Shows SQL-configured remotes
bd dolt remote remove origin # Removes the remoteContributor Onboarding (Clone Bootstrap)
When someone clones a repository that uses Dolt backend:
- Run
bd bootstrapin the clone - If the git remote has
refs/dolt/data(pushed viabd dolt push),bd bootstrapauto-detects it and clones the database from the remote - Work continues normally โ all existing issues are available
No manual steps required beyond bd bootstrap. The auto-detect:
- Probes
originforrefs/dolt/data - Clones the Dolt database from the remote (instead of creating a fresh one)
- Configures the Dolt remote for future
bd dolt push/pull
If sync.remote is set in .beads/config.yaml, that takes precedence
over auto-detection. Any Dolt-compatible remote URL is supported (DoltHub,
S3, GCS, file, or git). On brand-new projects, bd init auto-detectsgit origin and persists it as sync.remote, so the first bd dolt push
publishes Dolt history to refs/dolt/data on the same git remote.
Verifying Bootstrap Worked
bd list # Should show issues
bd vc status # Should show the current branch, no uncommitted changesTroubleshooting
Server Not Running
Symptom: Connection refused errors when using server mode.
failed to create database: dial tcp 127.0.0.1:3307: connect: connection refusedFix:
gt dolt start # Orchestrator command
# Or
gt dolt status # Check if runningBootstrap Not Running
Symptom: bd list shows nothing on fresh clone.
Check:
ls .beads/dolt/ # Should NOT exist (pre-bootstrap)
BD_DEBUG=1 bd list # See bootstrap outputForce bootstrap:
rm -rf .beads/dolt # Remove broken state
bd list # Re-triggers bootstrapDatabase Corruption
Symptom: Queries fail, inconsistent data.
Diagnosis:
bd doctor # Basic checks
bd doctor --deep # Full validation
bd doctor --server # Server mode checks (if applicable)Recovery options:
Repair what's fixable:
bashbd doctor --fixRebuild from remote:
bashrm -rf .beads/dolt bd list # Re-triggers bootstrap
Already Committed `.beads/dolt/` to Git
If you accidentally committed a Dolt data directory:
- Update gitignore:
bd doctor --fix - Remove it from git tracking:
git rm --cached -r .beads/dolt/(or.beads/embeddeddolt/) - Commit the removal:
git commit -m "fix: remove accidentally committed dolt data" - To purge from history, use BFG Repo-Cleaner or
git filter-repo
Lock Contention (Embedded Mode)
Symptom: "database is locked" errors.
Embedded mode is single-writer (enforced via file lock). If you need concurrent
access, switch to server mode. See Migrating Between Backends.
Configuration Reference
# .beads/config.yaml
# Dolt settings
dolt:
# Auto-commit Dolt history after writes (default: on for embedded, off for server)
auto-commit: on # on | off
# Storage mode (default: embedded)
mode: embedded # embedded | server
# Server mode settings (only used when mode: server)
host: 127.0.0.1
port: 3307
user: root
# Password: env var or credentials file (see below)
# Shared server mode (GH#2377): all projects share a single Dolt server
# at ~/.beads/shared-server/. Each project uses its own database (prefix-based).
# Eliminates port conflicts and reduces resource usage on multi-project machines.
shared-server: false # true | falseEnvironment Variables
| Variable | Purpose |
|---|---|
BEADS_DOLT_PASSWORD |
Server mode password (highest priority) |
BEADS_CREDENTIALS_FILE |
Path to credentials file (overrides default location) |
BEADS_DOLT_SERVER_MODE |
Enable server mode (set to "1") |
BEADS_DOLT_SERVER_HOST |
Server host (default: 127.0.0.1) |
BEADS_DOLT_SERVER_PORT |
Server port (default: 3307, or 3308 in shared mode) |
BEADS_DOLT_SERVER_TLS |
Enable TLS (set to "1" or "true") |
BEADS_DOLT_SERVER_USER |
MySQL connection user |
BEADS_DOLT_SHARED_SERVER |
Enable shared server mode (set to "1" or "true") |
DOLT_REMOTE_USER |
Clone/push/pull auth user |
DOLT_REMOTE_PASSWORD |
Clone/push/pull auth password |
BD_DOLT_AUTO_COMMIT |
Override auto-commit setting |
Credentials File
For multi-server setups, you can store passwords in an INI-style credentials file
instead of juggling environment variables per project. Passwords are looked up by[host:port] section, so each project automatically gets the right password based
on its configured server.
Password resolution order:
BEADS_DOLT_PASSWORDenv var (highest priority, existing behavior)- Credentials file lookup by
[host:port](using the resolved runtime port) - Empty string (no password)
Port resolution note: The [host:port] used for credential lookup matches the
resolved runtime port (from the port file, env var, or config โ in that priority
order), not necessarily the port stored in metadata.json. This matters when using
IAP tunnels: if your tunnel maps remote:3307 to localhost:3308, store your password
under [127.0.0.1:3308] and the credentials file will match the actual connection.
Default location: ~/.config/beads/credentials (Linux/macOS), %APPDATA%\beads\credentials (Windows)
Override location: Set BEADS_CREDENTIALS_FILE env var.
File format:
# ~/.config/beads/credentials
[127.0.0.1:3307]
password=localDevPassword
[beads.company.com:3307]
password=teamServerPassword
[10.0.1.50:3308]
password=officePasswordPermissions: On Linux/macOS, a warning is printed to stderr if the file is
readable by group or others (mirrors ssh behavior). Set permissions with:
chmod 600 ~/.config/beads/credentialsDolt Version Control
Dolt maintains its own version history, separate from Git:
# View an issue's version history across Dolt commits
bd history bd-42
# Show current branch and uncommitted changes
bd vc status
# Create manual checkpoint
bd vc commit -m "Checkpoint before refactor"Auto-Commit Behavior
In embedded mode (standalone default), each bd write command creates a Dolt commit:
bd create "New issue" # Creates issue + Dolt commitIn server mode (orchestrator), auto-commit defaults to OFF because the server
manages its own transaction lifecycle. Firing DOLT_COMMIT after every write
under concurrent load causes 'database is read only' errors.
Override for batch operations (embedded) or explicit commits (server):
bd --dolt-auto-commit off create "Issue 1"
bd --dolt-auto-commit off create "Issue 2"
bd vc commit -m "Batch: created issues"Server Management (Orchestrator)
The orchestrator provides integrated Dolt server management:
gt dolt start # Start server (background)
gt dolt stop # Stop server
gt dolt status # Show server status
gt dolt logs # View server logs
gt dolt sql # Open SQL shellServer runs on port 3307 (avoids MySQL conflict on 3306).
Standalone-to-managed-city handoff
When an existing standalone project is later added to a managed city or
orchestrator, avoid letting two Dolt servers become sources of truth for the
same beads database name. A common split-brain symptom is that .beads/dolt-server.port
points at the old standalone server while the shell environment points bd at
the managed server with BEADS_DOLT_PORT or BEADS_DOLT_SERVER_PORT.
Check before migrating:
bd doctor
bd dolt statusbd doctor warns when the runtime managed port differs from the local port
file. The warning is intentionally diagnostic only; do not delete the local port
file until the standalone store has been exported and imported into the managed
server.
Safe manual handoff:
# From the standalone project, without managed-city port overrides:
unset BEADS_DOLT_PORT BEADS_DOLT_SERVER_PORT
bd backup
bd export > /tmp/beads-standalone.jsonl
bd dolt stop
# Then enter the managed-city environment and import into its Dolt server:
bd import /tmp/beads-standalone.jsonl
bd doctorAfter bd doctor shows one healthy store and the imported issue count is
correct, archive the old local Dolt data directory instead of deleting it
immediately. Keep the backup until the managed city has been pushed or otherwise
snapshotted.
Shared Server Mode
On machines with multiple beads projects, each project normally starts its own Dolt server.
Shared server mode runs a single Dolt server at ~/.beads/shared-server/ that serves all projects:
# Enable for this project (config.yaml key)
bd config set dolt.shared-server true
# Or enable machine-wide via environment variable
export BEADS_DOLT_SHARED_SERVER=1
# Or enable during init
bd init --prefix myproject --shared-serverBenefits:
- No port conflicts between projects (single server on port 3308, avoids orchestrator on 3307)
- Reduced resource usage (one process instead of many)
- Automatic database isolation (each project uses its own database name)
How it works:
- Server state files (PID, port, lock, log) live in
~/.beads/shared-server/ - Dolt data directory:
~/.beads/shared-server/dolt/ - Each project's database is stored as a subdirectory (e.g.,
~/.beads/shared-server/dolt/myproject/) - The file lock mechanism ensures safe concurrent access from multiple projects
- Default port is 3308 (not 3307) to avoid conflict with the orchestrator. Override with
BEADS_DOLT_SERVER_PORTordolt.portin config.yaml
Important: Each project on a shared server must have a unique prefix (database name).
Two projects with the same prefix share the same database โ if this happens accidentally,
the project identity check will detect the mismatch and refuse to connect, preventing
silent data corruption. Always use distinct prefixes when running bd init --shared-server.
# Check shared server status from any project
bd dolt status
# Show full configuration including shared mode
bd dolt showData Location (Orchestrator)
<town-root>/.dolt-data/
โโโ hq/ # Town beads (hq-*)
โโโ my-project/ # Project rig (mp-*)
โโโ beads/ # Beads rig (bd-*)
โโโ other-project/ # Other rig (op-*)Central Dolt Server (macOS LaunchAgent)
If you do not use the orchestrator but still want a single persistent Dolt
server for multiple projects on macOS, run a custom LaunchAgent instead of
spawning per-project embedded instances.
Why Not `brew services start dolt`?
After installing Dolt with brew install dolt, the natural next step isbrew services start dolt. However, the Homebrew formula runsdolt sql-server without the --config flag, and Dolt does not auto-discoverconfig.yaml from its working directory. The config file must be passed
explicitly with --config <file>.
Setup with a Custom LaunchAgent
Install Dolt and initialize its data directory. Check the installed version
against the pin โ Homebrew's formula is not
pinned:
brew install dolt
dolt version
cd /opt/homebrew/var/dolt && dolt initConfigure Dolt for port 3307:
# /opt/homebrew/var/dolt/config.yaml
log_level: info
listener:
host: 127.0.0.1
port: 3307
max_connections: 100
behavior:
autocommit: trueCreate the LaunchAgent plist:
cat > ~/Library/LaunchAgents/com.local.dolt-server.plist << 'EOF'
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN"
"http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<dict>
<key>Label</key>
<string>com.local.dolt-server</string>
<key>ProgramArguments</key>
<array>
<string>/opt/homebrew/bin/dolt</string>
<string>sql-server</string>
<string>--config</string>
<string>/opt/homebrew/var/dolt/config.yaml</string>
</array>
<key>WorkingDirectory</key>
<string>/opt/homebrew/var/dolt</string>
<key>RunAtLoad</key>
<key>KeepAlive</key>
<key>StandardOutPath</key>
<string>/opt/homebrew/var/log/dolt.log</string>
<key>StandardErrorPath</key>
<string>/opt/homebrew/var/log/dolt-error.log</string>
</dict>
EOFLoad and verify the service:
launchctl load ~/Library/LaunchAgents/com.local.dolt-server.plist
mysql -h 127.0.0.1 -P 3307 -u root -e "SELECT 1"Point beads at the central server:
export BEADS_DOLT_SERVER_MODE=1
export BEADS_DOLT_SERVER_PORT=3307Manage the service:
# Stop
launchctl unload ~/Library/LaunchAgents/com.local.dolt-server.plist
# Restart
launchctl unload ~/Library/LaunchAgents/com.local.dolt-server.plist
launchctl load ~/Library/LaunchAgents/com.local.dolt-server.plist
# Check logs
tail -f /opt/homebrew/var/log/dolt.logAdvanced Dolt Usage
The dolt CLI lets you operate directly on the database for power-user
workflows. The data directory depends on your mode: .beads/embeddeddolt/
(embedded) or .beads/dolt/ (server).
Branching
cd .beads/dolt # or .beads/embeddeddolt for embedded mode
dolt branch feature-x
dolt checkout feature-xTime Travel
dolt log
dolt checkout <commit-hash>
dolt sql -q "SELECT * FROM issues"Diff and Blame
dolt diff main feature-x
dolt blame issuesMigration Cleanup
After successful migration from SQLite, you may have backup files:
.beads/beads.backup-pre-dolt-20260122-213600.db
.beads/sqlite.backup-pre-dolt-20260123-192812.dbThese are safe to delete once you've verified Dolt is working:
# Verify Dolt works
bd list
bd doctor
# Then clean up (after appropriate waiting period)
rm .beads/*.backup-*.dbRecommendation: Keep backups for at least a week before deleting.
See Also
- Sync Concepts - The conceptual model behind cross-machine sync (Dolt source of truth, wire format, anti-patterns)
- Sync Setup Guide - Setting up sync across multiple computers
- Federation Setup Guide - Peer-to-peer federation setup
- Configuration - Full configuration reference
- Dependencies and Gates - Dependencies and gates
- Git Integration - Git worktrees and protected branches
- Troubleshooting - General troubleshooting
File: docs/architecture/index.md
title: Architecture Overview
This document explains how Beads' architecture works with Dolt as its storage backend: the storage layout, the data model, and the sync paths. For the concept model โ beads, dependencies, ready work, molecules โ see How Beads Works.
Architecture
Beads uses Dolt as its sole storage backend -- a version-controlled SQL database that provides git-like semantics (branch, merge, diff, push, pull) natively at the database level.
By default, Dolt runs in embedded mode (in-process, no separate server). For multi-writer
setups (multiple agents, orchestrator), switch to server mode which connects to a
running dolt sql-server. See the Dolt Server Mode section below for details.
flowchart TD
subgraph DOLT["๐๏ธ Dolt Database"]
D[("embedded default: .beads/embeddeddolt/server mode: .beads/dolt/*Version-Controlled SQL*")]
end
subgraph REMOTE["๐ Dolt Remotes"]
R[("DoltHub / S3 / GCS*Sync & Backup*")]
end
D <-->|"bd dolt push/pull"| R
U((User)) -->|"bd createbd update"| D
D -->|"bd listbd show"| U
style DOLT fill:#2d5a27,stroke:#4a9c3e,color:#fff
style REMOTE fill:#1a4a6e,stroke:#3a8ac4,color:#fffSource of Truth
Dolt is the source of truth. Every write auto-commits to Dolt history, providing full version control, branching, and merge capabilities at the database level.
Recovery is straightforward: pull from a Dolt remote with bd dolt pull, or restore from a Dolt-native backup with bd backup restore.
Why Dolt?
- Version-controlled SQL: Full SQL queries with native version control
- Cell-level merge: Concurrent changes merge automatically at the field level
- Multi-writer: Server mode supports concurrent agents
- Native branching: Dolt branches independent of git branches
- Works offline: All queries run against local database
- Portable:
bd exportproduces JSONL for migration and interoperability
Data Model
The database stores five kinds of records: issues (the beads themselves), dependencies (typed edges such as blocks, parent-child, related, and discovered-from), labels, comments, and events (the audit trail). What each means โ and how bd ready computes the claimable frontier from them โ is covered in How Beads Works.
Issue IDs are content-derived hashes (bd-a1b2) so that concurrent writers never collide and no central ID coordination is needed. See Hash-based IDs for the design and COLLISION_MATH for the birthday-paradox analysis of hash length vs collision probability.
Issue Schema
Core fields on every issue, as stored in Dolt and emitted in bd export JSONL. Optional fields are omitted when empty.
| Field | Type | Description |
|---|---|---|
id |
string | Unique hash ID (e.g., bd-a1b2) |
title |
string | Issue title (required) |
description |
string | Detailed description (optional) |
design |
string | Design notes (optional) |
acceptance_criteria |
string | Acceptance criteria (optional) |
notes |
string | Additional notes (optional) |
status |
string | open, in_progress, blocked, deferred, closed, pinned, hooked (defaults to open; extendable via the status.custom config key) |
priority |
int | 0โ4, where 0 = critical and 4 = backlog |
issue_type |
string | bug, feature, task, epic, chore, decision, message, molecule, gate, spike, story, milestone (defaults to task) |
assignee |
string | Assigned user/agent (optional) |
estimated_minutes |
int | Time estimate in minutes (optional) |
created_at / updated_at |
RFC3339 | Creation and last-modification times |
created_by |
string | Who created the issue (optional) |
closed_at / close_reason |
RFC3339 / string | Set when the issue is closed (optional) |
external_ref |
string | External reference such as gh-9 or jira-ABC (optional) |
metadata |
JSON | Arbitrary extension data โ see Issue Metadata |
labels |
[]string | Tags attached to the issue (optional) |
dependencies |
[]Dependency | Typed edges to other issues (optional) |
comments |
[]Comment | Discussion thread (optional) |
Issues also carry workflow-layer field groups, among others: scheduling (due_at, defer_until), claim leasing (lease_expires_at, heartbeat_at), gates (await_type, await_id, timeout), and molecule/wisp fields (ephemeral, mol_type, bonded_from).
Internal fields โ content_hash (a SHA-256 of the issue's canonical content, used for change detection), source_repo, and id_prefix โ never appear in exports.
The schema is stable by default: prefer the metadata field for integration-, orchestrator-, or team-specific data before proposing new first-class fields. See the Project Charter's schema boundary.
Data Flow
Write Path
User runs bd create
โ Dolt database updated
โ Auto-committed to Dolt historyRead Path
User runs bd list
โ Dolt SQL query
โ Results returned immediatelySync Path
User runs bd dolt push
โ Commits pushed to Dolt remote
User runs bd dolt pull
โ Remote commits fetched and mergedDolt remotes can live on DoltHub, S3, GCS, a filesystem path, or your existing git remote โ issue history rides under refs/dolt/data, separate from code branches. See Sync Concepts for the wire format and setup.
Cross-repo setups can also exchange beads peer-to-peer via federation. Ephemeral wisps are excluded from federation push by default, so execution traces never enter shared history.
Multi-Machine Sync Considerations
When working across multiple machines or clones:
Always sync before switching machines
bashbd dolt push # Push changes before leavingPull before creating new issues
bashbd dolt pull # Pull changes first on new machine bd create "New issue"Avoid parallel edits - If two machines create issues simultaneously without syncing, Dolt's cell-level merge handles most conflicts automatically
See Sync Failures Recovery for data loss prevention in multi-machine workflows (Pattern A5/C3).
Dolt Server Mode
The Dolt server handles background synchronization and database operations:
- Manages the Dolt database backend
- Handles auto-commit for change tracking
- Provides concurrent access for multiple agents
- Runtime files live directly in
.beads/:dolt-server.pid,dolt-server.log, anddolt-server.port
An opt-in shared server mode runs a single Dolt server at ~/.beads/shared-server/ for all projects, enabled with dolt.shared-server: true in config.yaml or BEADS_DOLT_SHARED_SERVER=1 โ see Dolt Backend.
Embedded Mode (No Server)
Embedded mode is the default (bd init with no flags): Dolt runs in-process, single-writer, with data at .beads/embeddeddolt/ โ no server process and no separate Dolt install. Server mode is opt-in via bd init --server; the choice is persisted in .beads/metadata.json.
bd create "CI-generated issue"
bd dolt pushBeyond solo use, embedded mode is a natural fit for:
- CI/CD pipelines (Jenkins, GitHub Actions)
- Docker containers
- Ephemeral environments
- Scripts that should not leave background processes
Multi-Clone Scenarios
Prevention:
- Stop the Dolt server (
bd dolt stop) before switching between clones - Dolt handles worktrees natively in server mode
- Use embedded mode for automated workflows
See Sync Failures Recovery for sync race condition troubleshooting (Pattern B2).
Directory Layout
.beads/
โโโ embeddeddolt/ # Dolt database (embedded mode, default) โ gitignored
โโโ dolt/ # Dolt database (server mode) โ gitignored
โโโ dolt-server.pid # Server-mode runtime files (.pid, .log, .port) โ gitignored
โโโ issues.jsonl # Passive JSONL export for viewers and interchange
โโโ metadata.json # Backend config โ tracked in git
โโโ config.yaml # Project config (optional) โ tracked in gitThe database directory for your mode is the only thing holding issue data; everything else is configuration, runtime state, or a derived export. bd init writes a .beads/.gitignore that keeps the database and runtime files out of git.
Recovery Model
Dolt's version control makes recovery straightforward:
- Lost database? โ Pull from Dolt remote:
bd dolt pull - Have a backup? โ Restore it:
bd backup restore [path] --force - Merge conflicts? โ Dolt handles cell-level merge natively
Create backups with bd backup init (a filesystem path or DoltHub destination) and push them with bd backup sync. Dolt-native backups preserve full commit history; a JSONL export does not.
Universal Recovery Sequence
The following sequence resolves the majority of reported issues. For detailed procedures, see Recovery Runbooks.
bd dolt stop # Stop Dolt server (prevents race conditions)
git worktree prune # Clean orphaned worktrees
bd dolt pull # Pull from Dolt remote
bd dolt start # Restart server- Back up first:
cp -r .beads .beads.backup - Preview changes:
bd doctor --dry-runโ shows what would be fixed without making changes - Review diagnostics:
bd doctor(no flags) โ diagnostic only, no changes made - Then fix:
bd doctor --fixโ orbd doctor --fix -ito confirm each fix individually
Why caution? The --fix flag may remove dependencies it flags as circular, including valid parent-child relationships. Use --fix-child-parent only if you're certain the flagged deps are invalid.
Other diagnostic tools:
bd blockedโ check which issues are blocked and whybd showโ inspect a specific issue's state
See Recovery for specific procedures and Database Corruption Recovery for Dolt recovery steps.
Design Decisions
Why Dolt?
Dolt is a version-controlled SQL database that provides git-like semantics natively. Unlike plain SQLite (binary merge conflicts) or JSONL (slow queries), Dolt gives you both fast SQL queries and proper merge semantics.
Why not a cloud server?
Beads is designed for offline-first, local-first development. The Dolt server runs locally -- no cloud dependency, no downtime, no vendor lock-in, and full functionality on airplanes or in restricted networks.
Trade-offs
| Benefit | Trade-off |
|---|---|
| Works offline | No real-time collaboration |
| Version-controlled database | Server mode needed for concurrent writers |
| Cell-level merge | Requires initial setup |
| Local-first speed | Manual sync to remotes |
| SQL queries | Dolt storage engine dependency |
When NOT to use Beads
Beads is not suitable for:
- Large teams (10+) โ Git-based sync doesn't scale well for high-frequency concurrent edits
- Non-developers โ Requires Git and command-line familiarity
- Real-time collaboration โ No live updates; requires explicit sync
- Rich media attachments โ Designed for text-based issue tracking
For these use cases, consider GitHub Issues, Linear, or Jira.
Related Documentation
- How Beads Works โ The concept model: beads, dependencies, ready work, molecules
- Sync Concepts โ Cross-machine sync, wire format, and anti-patterns
- Dolt Backend โ Embedded vs server mode in depth, shared server, migration
- Recovery Runbooks โ Step-by-step procedures for common issues
- CLI Reference โ Complete command documentation
- Getting Started โ Installation and first steps
- Project Charter โ Product scope and boundaries (contributor doc)
- Internals โ Implementation details (contributor doc)
File: docs/cli-reference/admin.md
title: "bd admin"
{/* AUTO-GENERATED: do not edit manually */}
Generated from bd help --doc admin.
Administrative commands for beads database maintenance.
These commands are for advanced users and should be used carefully:
cleanup Delete closed issues (issue lifecycle)
compact Compact old closed issues to save space (storage optimization)
reset Remove all beads data and configuration (full reset)
For routine maintenance, prefer 'bd doctor --fix' which handles common repairs
automatically. Use these admin commands for targeted database operations.
bd admin [flags]bd admin cleanup
Delete closed issues to reduce database size.
This command permanently removes closed issues from the database.
NOTE: This command only manages issue lifecycle (closed -> deleted). For general
health checks and automatic repairs, use 'bd doctor --fix' instead.
By default, deletes ALL closed issues. Use --older-than to only delete
issues closed before a certain date.
EXAMPLES:
bd admin cleanup --force # Delete all closed issues
bd admin cleanup --older-than 30 --force # Only issues closed 30+ days ago
bd admin cleanup --ephemeral --force # Only closed wisps (transient molecules)
bd admin cleanup --dry-run # Preview what would be deleted
SAFETY:
- Requires --force flag to actually delete (unless --dry-run)
- Supports --cascade to delete dependents
- Shows preview of what will be deleted
- Use --json for programmatic output
SEE ALSO:
bd doctor --fix Automatic health checks and repairs (recommended for routine maintenance)
bd admin compact Compact old closed issues to save space
bd admin cleanup [flags]Flags:
--cascade Recursively delete all dependent issues
--dry-run Preview what would be deleted without making changes
--ephemeral Only delete closed wisps (transient molecules)
-f, --force Actually delete (without this flag, shows error)
--older-than int Only delete issues closed more than N days ago (0 = all closed issues)bd admin compact
Compact old closed issues using semantic summarization.
Compaction reduces database size by summarizing closed issues that are no longer
actively referenced. This is permanent graceful decay - original content is discarded.
Modes:
- Analyze: Export candidates for agent review (no API key needed)
- Apply: Accept agent-provided summary (no API key needed)
- Auto: AI-powered compaction (requires ANTHROPIC_API_KEY or ai.api_key, legacy)
- Dolt: Run Dolt garbage collection (for Dolt-backend repositories)
Tiers:
- Tier 1: Semantic compression (30 days closed, 70% reduction)
- Tier 2: Ultra compression (90 days closed) - planned, not yet implemented
Dolt Garbage Collection:
With auto-commit per mutation, Dolt commit history grows over time. Use
--dolt to run Dolt garbage collection and reclaim disk space.
--dolt: Run Dolt GC on .beads/dolt directory to free disk space.
This removes unreachable commits and compacts storage.
Examples:
Dolt garbage collection
bd compact --dolt # Run Dolt GC
bd compact --dolt --dry-run # Preview without running GC
Agent-driven workflow (recommended)
bd compact --analyze --json # Get candidates with full content
bd compact --apply --id bd-42 --summary summary.txt
bd compact --apply --id bd-42 --summary - < summary.txt
Legacy AI-powered workflow
bd compact --auto --dry-run # Preview candidates
bd compact --auto --all # Compact all eligible issues
bd compact --auto --id bd-42 # Compact specific issue
Statistics
bd compact --stats # Show statistics
bd admin compact [flags]Flags:
--actor string Actor name for audit trail (default "agent")
--all Process all candidates
--analyze Analyze mode: export candidates for agent review
--apply Apply mode: accept agent-provided summary
--auto Auto mode: AI-powered compaction (legacy)
--batch-size int Issues per batch (default 10)
--dolt Dolt mode: run Dolt garbage collection on .beads/dolt
--dry-run Preview without compacting
--force Force compact (bypass checks, requires --id)
--id string Compact specific issue
--json Output JSON format
--limit int Limit number of candidates (0 = no limit)
--stats Show compaction statistics
--summary string Path to summary file (use '-' for stdin)
--tier int Compaction tier (only tier 1 is implemented) (default 1)
--workers int Parallel workers (default 5)bd admin reset
Reset beads to an uninitialized state, removing all local data.
This command removes:
- The .beads directory (database, JSONL, config)
- Git hooks installed by bd
- Sync branch worktrees
By default, shows what would be deleted (dry-run mode).
Use --force to actually perform the reset.
Examples:
bd reset # Show what would be deleted
bd reset --force # Actually delete everything
bd admin reset [flags]Flags:
--force Actually perform the reset (required)File: docs/cli-reference/ado.md
title: "bd ado"
{/* AUTO-GENERATED: do not edit manually */}
Generated from bd help --doc ado.
Commands for syncing issues between beads and Azure DevOps.
Configuration can be set via 'bd config' or environment variables:
ado.org / AZURE_DEVOPS_ORG - Organization name
ado.project / AZURE_DEVOPS_PROJECT - Project name (single)
ado.projects / AZURE_DEVOPS_PROJECTS - Project names (comma-separated)
ado.pat / AZURE_DEVOPS_PAT - Personal access token
ado.url / AZURE_DEVOPS_URL - Custom base URL (on-prem)
bd ado [flags]bd ado projects
List Azure DevOps projects that the configured token has access to.
bd ado projects [flags]bd ado pull
Pull one or more items from Azure DevOps.
Accepts bead IDs or external references as positional arguments.
Equivalent to: bd ado sync --pull-only --issues <refs>
bd ado pull [refs...] [flags]Flags:
--dry-run Preview pull without making changesbd ado push
Push one or more beads issues to Azure DevOps.
Accepts bead IDs as positional arguments.
Equivalent to: bd ado sync --push-only --issues <ids>
bd ado push [bead-ids...] [flags]Flags:
--dry-run Preview push without making changesbd ado status
Display current Azure DevOps configuration and sync status.
bd ado status [flags]bd ado sync
Synchronize issues between beads and Azure DevOps.
By default, performs bidirectional sync:
- Pulls new/updated work items from Azure DevOps to beads
- Pushes local beads issues to Azure DevOps
Use --pull-only or --push-only to limit direction.
Filters (--area-path, --iteration-path, --types, --states) restrict
which work items are synced. On pull, they limit the WIQL query. On push,
--types and --states filter local beads before pushing to ADO. Use
--no-create with push to skip creating new ADO work items (only update
existing linked items). Filters can also be persisted via config:
ado.filter.area_path, ado.filter.iteration_path,
ado.filter.types, ado.filter.states
CLI flags override config values when both are set.
bd ado sync [flags]Flags:
--area-path string Filter to ADO area path (e.g., "Project\Team")
--bootstrap-match Enable heuristic matching for first sync
--dry-run Show what would be synced without making changes
--issues string Comma-separated bead IDs to sync selectively (e.g., bd-abc,bd-def). Mutually exclusive with --parent.
--iteration-path string Filter to ADO iteration path (e.g., "Project\Sprint 1")
--no-create Never create new items in either direction (pull or push)
--parent string Limit push to this bead and its descendants (push only). Mutually exclusive with --issues.
--prefer-ado On conflict, use Azure DevOps version
--prefer-local On conflict, keep local beads version
--prefer-newer On conflict, use most recent version (default)
--project strings Project name(s) to sync (overrides configured project/projects)
--pull-only Only pull issues from Azure DevOps
--push-only Only push issues to Azure DevOps
--reconcile Force reconciliation scan for deleted items
--states string Filter to ADO states, comma-separated (e.g., "New,Active,Resolved")
--types string Filter to work item types, comma-separated (e.g., "Bug,Task,User Story")File: docs/cli-reference/assign.md
title: "bd assign"
{/* AUTO-GENERATED: do not edit manually */}
Generated from bd help --doc assign.
Assign an issue to someone.
Shorthand for 'bd update <id> --assignee <name>'.
Examples:
bd assign bd-123 alice
bd assign bd-123 "" # unassign
bd assign <name> [flags]File: docs/cli-reference/audit.md
title: "bd audit"
{/* AUTO-GENERATED: do not edit manually */}
Generated from bd help --doc audit.
Audit log entries are appended to .beads/interactions.jsonl.
Each line is one event. This file is intended to be versioned in git and used for:
- auditing ("why did the agent do that?")
- dataset generation (SFT/RL fine-tuning)
Entries are append-only. Labeling creates a new "label" entry that references a parent entry.
bd audit [flags]bd audit label
Append a label entry referencing an existing interaction
bd audit label <entry-id> [flags]Flags:
--label string Label value (e.g. "good" or "bad")
--reason string Reason for labelbd audit record
Append an audit interaction entry
bd audit record [flags]Flags:
--error string Error string (llm_call/tool_call)
--exit-code int Exit code (tool_call) (default -1)
--issue-id string Related issue id (bd-...)
--kind string Entry kind (e.g. llm_call, tool_call, label)
--model string Model name (llm_call)
--prompt string Prompt text (llm_call)
--response string Response text (llm_call)
--stdin Read a JSON object from stdin (must match audit.Entry schema)
--tool-name string Tool name (tool_call)File: docs/cli-reference/backup.md
title: "bd backup"
{/* AUTO-GENERATED: do not edit manually */}
Generated from bd help --doc backup.
Back up your beads database for off-machine recovery.
This is a Dolt-native database backup. It preserves the database state,
including tables, branches, commit history, and working-set data. This is
different from 'bd export', which writes issue records to JSONL for migration
and interoperability.
Commands:
bd backup init <path> Set up a backup destination (filesystem or DoltHub)
bd backup sync Push to configured backup destination
bd backup restore [path] Restore from a backup directory
bd backup remove Remove backup destination
bd backup status Show backup status
DoltHub is recommended for cloud backup:
bd backup init https://doltremoteapi.dolthub.com/<user>/<repo>
Set DOLT_REMOTE_USER and DOLT_REMOTE_PASSWORD for authentication.
bd backup [flags]bd backup init
Configure a filesystem path or URL as a backup destination.
The path can be a local directory (external drive, NAS, Dropbox folder) or a
DoltHub remote URL. If the destination was previously configured, it is
updated to the new path.
Filesystem examples:
bd backup add /mnt/usb/beads-backup
bd backup add ~/Dropbox/beads-backup
DoltHub (recommended for cloud backup):
bd backup add https://doltremoteapi.dolthub.com/myuser/beads-backup
After adding, run 'bd backup sync' to push your data.
bd backup init [flags]Aliases: add
bd backup remove
Remove the configured backup destination.
This unregisters the backup remote from Dolt and removes the local
backup configuration. The backup data at the destination is not deleted.
bd backup remove [flags]Aliases: rm
bd backup restore
Restore the beads database from a Dolt-native backup.
By default, reads from .beads/backup/ (or the configured backup directory).
Optionally specify a path to a directory containing a Dolt backup.
This restores a full database backup created by 'bd backup sync' or an
equivalent Dolt backup. JSONL files produced by 'bd export' are issue exports,
not restore targets for this command.
Use --force to overwrite an existing database with the backup contents.
The database must already be initialized (run 'bd init' first if needed).
To initialize and restore in one step, use: bd init && bd backup restore
bd backup restore [path] [flags]Flags:
--force Overwrite existing database with backup contentsbd backup status
Show last backup status
bd backup status [flags]bd backup sync
Sync the current beads database to the configured Dolt backup destination.
This pushes the entire database state (all branches, full history) to the
backup location configured with 'bd backup init'.
The backup is atomic โ if the sync fails, the previous backup state is preserved.
Run 'bd backup init <path>' first to configure a destination.
bd backup sync [flags]File: docs/cli-reference/batch.md
title: "bd batch"
{/* AUTO-GENERATED: do not edit manually */}
Generated from bd help --doc batch.
Run multiple write operations in a single database transaction.
Commands are read from stdin (one per line) or from a file via -f/--file.
All operations execute inside a single dolt transaction: on any error the
whole batch is rolled back, otherwise it is committed with one DOLT_COMMIT.
This is intended for shell scripts that currently invoke 'bd' many times in
a loop, which causes severe write amplification on a dolt sql-server backed
by btrfs+compression. Batching collapses N invocations into one transaction
and one dolt commit.
Grammar (one command per line):
close <id> [reason...]
update <id> <key>=<value> [<key>=<value> ...]
create <type> <priority> <title...>
dep add <from-id> <to-id> [type]
dep remove <from-id> <to-id>
#comment (blank lines and '# ...' comments are ignored)
Supported 'update' keys: status, priority, title, assignee
Supported dependency types: see 'bd dep add --help' (default: blocks)
Tokens are whitespace-separated. Double-quoted strings ("like this") may
contain spaces; use " to embed a quote and \ for a backslash.
Examples:
From a pipe
bd list --status stale -q | awk '{print "close",$1," stale"}' | bd batch
From a file
bd batch -f operations.txt
Inline
printf 'close bd-1 done\nupdate bd-2 status=in_progress\n' | bd batch
On success, exits 0 and prints a summary (or JSON with --json). On any error,
rolls back the entire transaction and exits non-zero with the failing line.
NOTE: This is a narrow subset. Commands like 'show', 'list', 'ready', 'sync',
complex create flows, or any flag not listed above are NOT accepted. Use
normal 'bd' subcommands for interactive/read operations.
bd batch [flags]Flags:
--dry-run Parse input and echo commands without executing
-f, --file string Read commands from file instead of stdin
-m, --message string DOLT_COMMIT message (default: 'bd: batch N ops by <actor>')2. Official Technical Reference & Guides (gastownhall/docs)
Mintlify Starter Kit
Use the starter kit to get your docs deployed and ready to customize.
Click the green Use this template button at the top of this repo to copy the Mintlify starter kit. The starter kit contains examples with
- Guide pages
- Navigation
- Customizations
- API reference pages
- Use of popular components
Follow the full quickstart guide
AI-assisted writing
Set up your AI coding tool to work with Mintlify:
npx skills add https://mintlify.com/docsThis command installs Mintlify's documentation skill for your configured AI tools like Claude Code, Cursor, Windsurf, and others. The skill includes component reference, writing standards, and workflow guidance.
See the AI tools guides for tool-specific setup.
Development
Install the Mintlify CLI to preview your documentation changes locally. To install, use the following command:
npm i mintRun the following command at the root of your documentation, where your docs.json is located:
mint devView your local preview at http://localhost:3000.
Publishing changes
Install our GitHub app from your dashboard to propagate changes from your repo to your deployment. Changes are deployed to production automatically after pushing to the default branch.
Need help?
Troubleshooting
- If your dev environment isn't running: Run
mint updateto ensure you have the most recent version of the CLI. - If a page loads as a 404: Make sure you are running in a folder with a valid
docs.json.