@beads/bd 0.24.3 → 0.25.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/bin/README.md DELETED
@@ -1,814 +0,0 @@
1
- # bd - Beads Issue Tracker 🔗
2
-
3
- [![Go Version](https://img.shields.io/github/go-mod/go-version/steveyegge/beads)](https://go.dev/)
4
- [![Release](https://img.shields.io/github/v/release/steveyegge/beads)](https://github.com/steveyegge/beads/releases)
5
- [![npm version](https://img.shields.io/npm/v/@beads/bd)](https://www.npmjs.com/package/@beads/bd)
6
- [![CI](https://img.shields.io/github/actions/workflow/status/steveyegge/beads/ci.yml?branch=main&label=tests)](https://github.com/steveyegge/beads/actions/workflows/ci.yml)
7
- [![Go Report Card](https://goreportcard.com/badge/github.com/steveyegge/beads)](https://goreportcard.com/report/github.com/steveyegge/beads)
8
- [![License](https://img.shields.io/github/license/steveyegge/beads)](LICENSE)
9
- [![PyPI](https://img.shields.io/pypi/v/beads-mcp)](https://pypi.org/project/beads-mcp/)
10
-
11
- **Give your coding agent a memory upgrade**
12
-
13
- > ## 🎉 **v0.20.1: Multi-Worker Support Unlocked!** 🎉
14
- >
15
- > **Hash-based IDs eliminate merge conflicts and collision issues!**
16
- >
17
- > Previous versions used sequential IDs (bd-1, bd-2, bd-3...) which caused frequent collisions when multiple agents or branches created issues concurrently. Version 0.20.1 switches to **hash-based IDs** (bd-a1b2, bd-f14c, bd-3e7a...) that are collision-resistant and merge-friendly.
18
- >
19
- > **What's new:** ✅ Multi-clone, multi-branch, multi-agent workflows now work reliably
20
- > **What changed:** Issue IDs are now short hashes instead of sequential numbers
21
- > **Migration:** Run `bd migrate` to upgrade existing databases (optional - old DBs still work)
22
- >
23
- > Hash IDs use progressive length scaling (4/5/6 characters) with birthday paradox math to keep collisions extremely rare while maintaining human readability. See "Hash-Based Issue IDs" section below for details.
24
-
25
- > **⚠️ Alpha Status**: This project is in active development. The core features work well, but expect API changes before 1.0. Use for development/internal projects first.
26
-
27
- Beads is a lightweight memory system for coding agents, using a graph-based issue tracker. Four kinds of dependencies work to chain your issues together like beads, making them easy for agents to follow for long distances, and reliably perform complex task streams in the right order.
28
-
29
- Drop Beads into any project where you're using a coding agent, and you'll enjoy an instant upgrade in organization, focus, and your agent's ability to handle long-horizon tasks over multiple compaction sessions. Your agents will use issue tracking with proper epics, rather than creating a swamp of rotten half-implemented markdown plans.
30
-
31
- Instant start:
32
-
33
- ```bash
34
- curl -fsSL https://raw.githubusercontent.com/steveyegge/beads/main/scripts/install.sh | bash
35
- ```
36
-
37
- Then tell your coding agent to start using the `bd` tool instead of markdown for all new work, somewhere in your `AGENTS.md` or `CLAUDE.md`. That's all there is to it!
38
-
39
- You don't use Beads directly as a human. Your coding agent will file and manage issues on your behalf. They'll file things they notice automatically, and you can ask them at any time to add or update issues for you.
40
-
41
- Beads gives agents unprecedented long-term planning capability, solving their amnesia when dealing with complex nested plans. They can trivially query the ready work, orient themselves, and land on their feet as soon as they boot up.
42
-
43
- Agents using Beads will no longer silently pass over problems they notice due to lack of context space -- instead, they will automatically file issues for newly-discovered work as they go. No more lost work, ever.
44
-
45
- Beads issues are backed by git, but through a clever design it manages to act like a managed, centrally hosted SQL database shared by all of the agents working on a project (repo), even across machines.
46
-
47
- Beads even improves work auditability. The issue tracker has a sophisticated audit trail, which agents can use to reconstruct complex operations that may have spanned multiple sessions.
48
-
49
- Agents report that they enjoy working with Beads, and they will use it spontaneously for both recording new work and reasoning about your project in novel ways. Whether you are a human or an AI, Beads lets you have more fun and less stress with agentic coding.
50
-
51
- ![AI Agent using Beads](https://raw.githubusercontent.com/steveyegge/beads/main/.github/images/agent-using-beads.jpg)
52
-
53
- ## Features
54
-
55
- - ✨ **Zero setup** - `bd init` creates project-local database (and your agent will do it)
56
- - 🔗 **Dependency tracking** - Four dependency types (blocks, related, parent-child, discovered-from)
57
- - 📋 **Ready work detection** - Automatically finds issues with no open blockers
58
- - 🤖 **Agent-friendly** - `--json` flags for programmatic integration
59
- - 📦 **Git-versioned** - JSONL records stored in git, synced across machines
60
- - 🌍 **Distributed by design** - Agents on multiple machines share one logical database via git
61
- - 🚀 **Optional Agent Mail** - Real-time multi-agent coordination (<100ms vs 2-5s git sync, 98.5% reduction in git traffic)
62
- - 🔐 **Protected branch support** - Works with GitHub/GitLab protected branches via separate sync branch
63
- - 🏗️ **Extensible** - Add your own tables to the SQLite database
64
- - 🔍 **Multi-project isolation** - Each project gets its own database, auto-discovered by directory
65
- - 🌲 **Dependency trees** - Visualize full dependency graphs
66
- - 🎨 **Beautiful CLI** - Colored output for humans, JSON for bots
67
- - 💾 **Full audit trail** - Every change is logged
68
- - ⚡ **High performance** - Batch operations for bulk imports (1000 issues in ~950ms)
69
- - 🗜️ **Memory decay** - Semantic compaction gracefully reduces old closed issues
70
-
71
- ## Requirements
72
-
73
- **Linux users:** Beads requires **glibc 2.32+** (Ubuntu 22.04+, Debian 11+, RHEL 9+, or equivalent).
74
-
75
- - ✅ **Supported:** Ubuntu 22.04+ (Jammy), Debian 11+ (Bullseye), Fedora 34+, RHEL 9+
76
- - ❌ **Not supported:** Ubuntu 20.04 (glibc 2.31), Debian 10 (glibc 2.28), CentOS 7, RHEL 8
77
-
78
- **Ubuntu 20.04 users:** Standard support ended April 2025. Please upgrade to Ubuntu 22.04+ or build from source:
79
- ```bash
80
- git clone https://github.com/steveyegge/beads.git
81
- cd beads
82
- go build -o bd ./cmd/bd
83
- ```
84
-
85
- **macOS/Windows:** No special requirements.
86
-
87
- ## Installation
88
-
89
- **npm (Node.js environments, Claude Code for Web):**
90
- ```bash
91
- npm install -g @beads/bd
92
- ```
93
-
94
- **Quick install (macOS / Linux):**
95
- ```bash
96
- curl -fsSL https://raw.githubusercontent.com/steveyegge/beads/main/scripts/install.sh | bash
97
- ```
98
-
99
- **Quick install (Windows - PowerShell):**
100
- ```powershell
101
- irm https://raw.githubusercontent.com/steveyegge/beads/main/install.ps1 | iex
102
- ```
103
-
104
- **Homebrew (macOS/Linux):**
105
- ```bash
106
- brew tap steveyegge/beads
107
- brew install bd
108
- ```
109
-
110
- For full, platform-specific instructions (Windows, Arch Linux, manual builds, IDE integrations, etc.) see the canonical guide in [docs/INSTALLING.md](docs/INSTALLING.md).
111
-
112
- **Claude Code for Web:** See [npm-package/CLAUDE_CODE_WEB.md](npm-package/CLAUDE_CODE_WEB.md) for SessionStart hook setup.
113
-
114
- ## Quick Start
115
-
116
- ### For Humans
117
-
118
- Beads is designed for **AI coding agents** to use on your behalf. Setup takes 30 seconds:
119
-
120
- **You run this once (humans only):**
121
- ```bash
122
- # In your project root:
123
- bd init
124
-
125
- # For OSS contributors (fork workflow):
126
- bd init --contributor
127
-
128
- # For team members (branch workflow):
129
- bd init --team
130
-
131
- # For protected branches (GitHub/GitLab):
132
- bd init --branch beads-metadata
133
-
134
- # bd will:
135
- # - Create .beads/ directory with database
136
- # - Import existing issues from git (if any)
137
- # - Prompt to install git hooks (recommended: say yes)
138
- # - Prompt to configure git merge driver (recommended: say yes)
139
- # - Auto-start daemon for sync
140
-
141
- # Then tell your agent about bd:
142
- echo "BEFORE ANYTHING ELSE: run 'bd onboard' and follow the instructions" >> AGENTS.md
143
- ```
144
-
145
- **Protected branches?** If your `main` branch is protected, use `bd init --branch beads-metadata` to commit issue updates to a separate branch. See [docs/PROTECTED_BRANCHES.md](docs/PROTECTED_BRANCHES.md) for details.
146
-
147
- **Your agent does the rest:** Next time your agent starts, it will:
148
- 1. Run `bd onboard` and receive integration instructions
149
- 2. Add bd workflow documentation to AGENTS.md
150
- 3. Update CLAUDE.md with a note (if present)
151
- 4. Remove the bootstrap instruction
152
-
153
- **For agents setting up repos:** Use `bd init --quiet` for non-interactive setup (auto-installs git hooks and merge driver, no prompts).
154
-
155
- **For new repo clones:** Run `bd init` (or `bd init --quiet` for agents) to import existing issues from `.beads/issues.jsonl` automatically.
156
-
157
- **Git merge driver:** During `bd init`, beads configures git to use `bd merge` for intelligent JSONL merging. This prevents conflicts when multiple branches modify issues. Skip with `--skip-merge-driver` if needed. To configure manually later:
158
- ```bash
159
- git config merge.beads.driver "bd merge %A %O %A %B"
160
- git config merge.beads.name "bd JSONL merge driver"
161
- echo ".beads/beads.jsonl merge=beads" >> .gitattributes
162
- ```
163
-
164
- ### Files Created by `bd init`
165
-
166
- **`bd init` creates these files in your repository:**
167
-
168
- **Should be committed to git:**
169
- - `.gitattributes` - Configures git merge driver for intelligent JSONL merging (critical for team collaboration)
170
- - `.beads/beads.jsonl` - Issue data in JSONL format (source of truth, synced via git)
171
- - `.beads/config.yaml` - Repository configuration template
172
- - `.beads/README.md` - Documentation about beads for repository visitors
173
- - `.beads/metadata.json` - Database metadata
174
-
175
- **Should be in `.gitignore` (local-only):**
176
- - `.beads/beads.db` - SQLite cache (auto-synced with JSONL)
177
- - `.beads/beads.db-*` - SQLite journal files
178
- - `.beads/bd.sock` / `.beads/bd.pipe` - Daemon communication socket
179
- - `.beads/.exclusive-lock` - Daemon lock file
180
- - `.git/beads-worktrees/` - Git worktrees (only created when using protected branch workflows)
181
-
182
- The `.gitignore` entries are automatically created inside `.beads/.gitignore` by `bd init`, but your project's root `.gitignore` should also exclude the database and daemon files if you want to keep your git status clean.
183
-
184
- **Using devcontainers?** Open the repository in a devcontainer (GitHub Codespaces or VS Code Remote Containers) and bd will be automatically installed with git hooks configured. See [.devcontainer/README.md](.devcontainer/README.md) for details.
185
-
186
- Most tasks will be created and managed by agents during conversations. You can check on things with:
187
-
188
- ```bash
189
- bd list # See what's being tracked
190
- bd show <issue-id> # Review a specific issue
191
- bd ready # See what's ready to work on
192
- bd dep tree <issue-id> # Visualize dependencies
193
- ```
194
-
195
- ### For AI Agents
196
-
197
- Run the interactive guide to learn the full workflow:
198
-
199
- ```bash
200
- bd quickstart
201
- ```
202
-
203
- Quick reference for agent workflows:
204
-
205
- ```bash
206
- # Find ready work
207
- bd ready --json | jq '.[0]'
208
-
209
- # Create issues during work
210
- bd create "Discovered bug" -t bug -p 0 --json
211
-
212
- # Link discovered work back to parent
213
- bd dep add <new-id> <parent-id> --type discovered-from
214
-
215
- # Update status
216
- bd update <issue-id> --status in_progress --json
217
-
218
- # Complete work
219
- bd close <issue-id> --reason "Implemented" --json
220
- ```
221
-
222
- ## Configuring Your Own AGENTS.md
223
-
224
- **Recommendation for project maintainers:** Add a session-ending protocol to your project's `AGENTS.md` file to ensure agents properly manage issue tracking and sync the database before finishing work.
225
-
226
- This pattern has proven invaluable for maintaining database hygiene and preventing lost work. Here's what to include (adapt for your workflow):
227
-
228
- **1. File/update issues for remaining work**
229
- - Agents should proactively create issues for discovered bugs, TODOs, and follow-up tasks
230
- - Close completed issues and update status for in-progress work
231
-
232
- **2. Run quality gates (if applicable)**
233
- - Tests, linters, builds - only if code changes were made
234
- - File P0 issues if builds are broken
235
-
236
- **3. Sync the issue tracker carefully**
237
- - Work methodically to ensure local and remote issues merge safely
238
- - Handle git conflicts thoughtfully (sometimes accepting remote and re-importing)
239
- - Goal: clean reconciliation where no issues are lost
240
-
241
- **4. Verify clean state**
242
- - All changes committed and pushed
243
- - No untracked files remain
244
-
245
- **5. Choose next work**
246
- - Provide a formatted prompt for the next session with context
247
-
248
- See the ["Landing the Plane"](AGENT_INSTRUCTIONS.md#landing-the-plane) section in this project's documentation for a complete example you can adapt. The key insight: explicitly reminding agents to maintain issue tracker hygiene prevents the common problem of agents creating issues during work but forgetting to sync them at session end.
249
-
250
- ## The Magic: Distributed Database via Git
251
-
252
- Here's the crazy part: **bd acts like a centralized database, but it's actually distributed via git.**
253
-
254
- When you install bd on any machine with your project repo, you get:
255
- - ✅ Full query capabilities (dependencies, ready work, etc.)
256
- - ✅ Fast local operations (<100ms via SQLite)
257
- - ✅ Shared state across all machines (via git)
258
- - ✅ No server, no daemon required, no configuration
259
- - ✅ AI-assisted merge conflict resolution
260
-
261
- **How it works:** Each machine has a local SQLite cache (`.beads/*.db`, gitignored). Source of truth is JSONL (`.beads/issues.jsonl`, committed to git). Auto-sync keeps them in sync: SQLite → JSONL after CRUD operations (5-second debounce), JSONL → SQLite when JSONL is newer (e.g., after `git pull`).
262
-
263
- **The result:** Agents on your laptop, your desktop, and your coworker's machine all query and update what *feels* like a single shared database, but it's really just git doing what git does best - syncing text files across machines.
264
-
265
- No PostgreSQL instance. No MySQL server. No hosted service. Just install bd, clone the repo, and you're connected to the "database."
266
-
267
- ### Git Workflow & Auto-Sync
268
-
269
- bd automatically syncs your local database with git:
270
-
271
- **Making changes (auto-export):**
272
- ```bash
273
- bd create "Fix bug" -p 1
274
- bd update bd-a1b2 --status in_progress
275
- # bd automatically exports to .beads/issues.jsonl after 5 seconds
276
-
277
- git add .beads/issues.jsonl
278
- git commit -m "Working on bd-a1b2"
279
- git push
280
- ```
281
-
282
- **Pulling changes (auto-import):**
283
- ```bash
284
- git pull
285
- # bd automatically detects JSONL is newer and imports on next command
286
-
287
- bd ready # Fresh data from git!
288
- bd list # Shows issues from other machines
289
- ```
290
-
291
- **Manual sync (optional):**
292
- ```bash
293
- bd sync # Immediately flush pending changes and import latest JSONL
294
- ```
295
-
296
- **For zero-lag sync**, install the git hooks:
297
- ```bash
298
- cd examples/git-hooks && ./install.sh
299
- ```
300
-
301
- This adds:
302
- - **pre-commit** - Immediate flush before commit (no 5-second wait)
303
- - **post-merge** - Guaranteed import after `git pull` or `git merge`
304
-
305
- **Disable auto-sync** if needed:
306
- ```bash
307
- bd --no-auto-flush create "Issue" # Skip auto-export
308
- bd --no-auto-import list # Skip auto-import check
309
- ```
310
-
311
- ## Hash-Based Issue IDs
312
-
313
- **Version 0.20.1 introduces collision-resistant hash-based IDs** to enable reliable multi-worker and multi-branch workflows.
314
-
315
- ### ID Format
316
-
317
- Issue IDs now use short hexadecimal hashes instead of sequential numbers:
318
-
319
- - **Before (v0.20.0):** `bd-1`, `bd-2`, `bd-152` (sequential numbers)
320
- - **After (v0.20.1):** `bd-a1b2`, `bd-f14c`, `bd-3e7a` (4-6 character hashes)
321
-
322
- Hash IDs use **progressive length scaling** based on database size:
323
- - **0-500 issues:** 4-character hashes (e.g., `bd-a1b2`)
324
- - **500-1,500 issues:** 5-character hashes (e.g., `bd-f14c3`)
325
- - **1,500-10,000 issues:** 6-character hashes (e.g., `bd-3e7a5b`)
326
-
327
- ### Why Hash IDs?
328
-
329
- **The problem with sequential IDs:**
330
- When multiple agents or branches create issues concurrently, sequential IDs collide:
331
- - Agent A creates `bd-10` on branch `feature-auth`
332
- - Agent B creates `bd-10` on branch `feature-payments`
333
- - Git merge creates duplicate IDs → collision resolution required
334
-
335
- **How hash IDs solve this:**
336
- Hash IDs are generated from random data, making concurrent creation collision-free:
337
- - Agent A creates `bd-a1b2` (hash of random UUID)
338
- - Agent B creates `bd-f14c` (different hash, different UUID)
339
- - Git merge succeeds cleanly → no collision resolution needed
340
-
341
- ### Birthday Paradox Math
342
-
343
- Hash IDs use **birthday paradox probability** to determine length:
344
-
345
- | Hash Length | Total Space | 50% Collision at N Issues | 1% Collision at N Issues |
346
- |-------------|-------------|---------------------------|--------------------------|
347
- | 4 chars | 65,536 | ~304 issues | ~38 issues |
348
- | 5 chars | 1,048,576 | ~1,217 issues | ~153 issues |
349
- | 6 chars | 16,777,216 | ~4,869 issues | ~612 issues |
350
-
351
- **Our thresholds are conservative:** We switch from 4→5 chars at 500 issues (way before the 1% collision point at ~1,217) and from 5→6 chars at 1,500 issues.
352
-
353
- **Progressive extension on collision:** If a hash collision does occur, bd automatically extends the hash to 7 or 8 characters instead of remapping to a new ID.
354
-
355
- ### Migration
356
-
357
- **Existing databases continue to work** - no forced migration. Run `bd migrate` when ready:
358
-
359
- ```bash
360
- # Inspect migration plan (for AI agents)
361
- bd migrate --inspect --json
362
-
363
- # Check schema and config state
364
- bd info --schema --json
365
-
366
- # Preview migration
367
- bd migrate --dry-run
368
-
369
- # Migrate database schema (removes obsolete issue_counters table)
370
- bd migrate
371
-
372
- # Show current database info
373
- bd info
374
- ```
375
-
376
- **AI-supervised migrations:** The `--inspect` flag provides migration plan analysis for AI agents. The system verifies data integrity invariants (required config keys, foreign key constraints, issue counts) before committing migrations.
377
-
378
- **Note:** Hash IDs require schema version 9+. The `bd migrate` command detects old schemas and upgrades automatically.
379
-
380
- ### Hierarchical Child IDs
381
-
382
- Hash IDs support **hierarchical children** for natural work breakdown structures. Child IDs use dot notation:
383
-
384
- ```
385
- bd-a3f8e9 [epic] Auth System
386
- bd-a3f8e9.1 [task] Design login UI
387
- bd-a3f8e9.2 [task] Backend validation
388
- bd-a3f8e9.3 [epic] Password Reset
389
- bd-a3f8e9.3.1 [task] Email templates
390
- bd-a3f8e9.3.2 [task] Reset flow tests
391
- ```
392
-
393
- **Benefits:**
394
- - **Collision-free**: Parent hash ensures unique namespace
395
- - **Human-readable**: Clear parent-child relationships
396
- - **Flexible depth**: Up to 3 levels of nesting
397
- - **No coordination needed**: Each epic owns its child ID space
398
-
399
- **Common patterns:**
400
- - 1 level: Epic → tasks (most projects)
401
- - 2 levels: Epic → features → tasks (large projects)
402
- - 3 levels: Epic → features → stories → tasks (complex projects)
403
-
404
- **Example workflow:**
405
- ```bash
406
- # Create parent epic (generates hash ID automatically)
407
- bd create "Auth System" -t epic -p 1
408
- # Returns: bd-a3f8e9
409
-
410
- # Create child tasks
411
- bd create "Design login UI" -p 1 # Auto-assigned: bd-a3f8e9.1
412
- bd create "Backend validation" -p 1 # Auto-assigned: bd-a3f8e9.2
413
-
414
- # Create nested epic with its own children
415
- bd create "Password Reset" -t epic -p 1 # Auto-assigned: bd-a3f8e9.3
416
- bd create "Email templates" -p 1 # Auto-assigned: bd-a3f8e9.3.1
417
- ```
418
-
419
- **Note:** Child IDs are automatically assigned sequentially within each parent's namespace. No need to specify parent manually - bd tracks context from git branch/working directory.
420
-
421
- ## Usage
422
-
423
- ### Health Check
424
-
425
- Check installation health: `bd doctor` validates your `.beads/` setup, database version, ID format, and CLI version. Provides actionable fixes for any issues found.
426
-
427
- ### Creating Issues
428
-
429
- ```bash
430
- bd create "Fix bug" -d "Description" -p 1 -t bug
431
- bd create "Add feature" --description "Long description" --priority 2 --type feature
432
- bd create "Task" -l "backend,urgent" --assignee alice
433
-
434
- # Get JSON output for programmatic use
435
- bd create "Fix bug" -d "Description" --json
436
-
437
- # Create from templates (built-in: epic, bug, feature)
438
- bd create --from-template epic "Q4 Platform Improvements"
439
- bd create --from-template bug "Auth token validation fails"
440
- bd create --from-template feature "Add OAuth support"
441
-
442
- # Override template defaults
443
- bd create --from-template bug "Critical issue" -p 0 # Override priority
444
-
445
- # Create multiple issues from a markdown file
446
- bd create -f feature-plan.md
447
- ```
448
-
449
- Options:
450
- - `-f, --file` - Create multiple issues from markdown file
451
- - `--from-template` - Use template (epic, bug, feature, or custom)
452
- - `-d, --description` - Issue description
453
- - `-p, --priority` - Priority (0-4, 0=highest, default=2)
454
- - `-t, --type` - Type (bug|feature|task|epic|chore, default=task)
455
- - `-a, --assignee` - Assign to user
456
- - `-l, --labels` - Comma-separated labels
457
- - `--id` - Explicit issue ID (e.g., `worker1-100` for ID space partitioning)
458
- - `--json` - Output in JSON format
459
-
460
- See `bd template list` for available templates and `bd help template` for managing custom templates.
461
-
462
- ### Viewing Issues
463
-
464
- ```bash
465
- bd info # Show database path and daemon status
466
- bd show bd-a1b2 # Show full details
467
- bd list # List all issues
468
- bd list --status open # Filter by status
469
- bd list --priority 1 # Filter by priority
470
- bd list --assignee alice # Filter by assignee
471
- bd list --label=backend,urgent # Filter by labels (AND)
472
- bd list --label-any=frontend,backend # Filter by labels (OR)
473
-
474
- # Advanced filters
475
- bd list --title-contains "auth" # Search title
476
- bd list --desc-contains "implement" # Search description
477
- bd list --notes-contains "TODO" # Search notes
478
- bd list --id bd-123,bd-456 # Specific IDs (comma-separated)
479
-
480
- # Date range filters (YYYY-MM-DD or RFC3339)
481
- bd list --created-after 2024-01-01 # Created after date
482
- bd list --created-before 2024-12-31 # Created before date
483
- bd list --updated-after 2024-06-01 # Updated after date
484
- bd list --updated-before 2024-12-31 # Updated before date
485
- bd list --closed-after 2024-01-01 # Closed after date
486
- bd list --closed-before 2024-12-31 # Closed before date
487
-
488
- # Empty/null checks
489
- bd list --empty-description # Issues with no description
490
- bd list --no-assignee # Unassigned issues
491
- bd list --no-labels # Issues with no labels
492
-
493
- # Priority ranges
494
- bd list --priority-min 0 --priority-max 1 # P0 and P1 only
495
- bd list --priority-min 2 # P2 and below
496
-
497
- # Combine multiple filters
498
- bd list --status open --priority 1 --label-any urgent,critical --no-assignee
499
-
500
- # JSON output for agents
501
- bd info --json
502
- bd list --json
503
- bd show bd-a1b2 --json
504
- ```
505
-
506
- ### Updating Issues
507
-
508
- ```bash
509
- bd update bd-a1b2 --status in_progress
510
- bd update bd-a1b2 --priority 2
511
- bd update bd-a1b2 --assignee bob
512
- bd close bd-a1b2 --reason "Completed"
513
- bd close bd-a1b2 bd-f14c bd-3e7a # Close multiple
514
-
515
- # JSON output
516
- bd update bd-a1b2 --status in_progress --json
517
- ```
518
-
519
- ### Dependencies
520
-
521
- ```bash
522
- # Add dependency (bd-f14c depends on bd-a1b2)
523
- bd dep add bd-f14c bd-a1b2
524
- bd dep add bd-3e7a bd-a1b2 --type blocks
525
-
526
- # Remove dependency
527
- bd dep remove bd-f14c bd-a1b2
528
-
529
- # Show dependency tree
530
- bd dep tree bd-f14c
531
-
532
- # Detect cycles
533
- bd dep cycles
534
- ```
535
-
536
- #### Dependency Types
537
-
538
- - **blocks**: Hard blocker (default) - issue cannot start until blocker is resolved
539
- - **related**: Soft relationship - issues are connected but not blocking
540
- - **parent-child**: Hierarchical relationship (child depends on parent)
541
- - **discovered-from**: Issue discovered during work on another issue (automatically inherits parent's `source_repo`)
542
-
543
- Only `blocks` dependencies affect ready work detection.
544
-
545
- > **Note:** Issues created with `discovered-from` dependencies automatically inherit the parent's `source_repo` field, ensuring discovered work stays in the same repository as the parent task.
546
-
547
- ### Finding Work
548
-
549
- ```bash
550
- # Show ready work (no blockers)
551
- bd ready
552
- bd ready --limit 20
553
- bd ready --priority 1
554
- bd ready --assignee alice
555
-
556
- # Sort policies (hybrid is default)
557
- bd ready --sort priority # Strict priority order (P0, P1, P2, P3)
558
- bd ready --sort oldest # Oldest issues first (backlog clearing)
559
- bd ready --sort hybrid # Recent by priority, old by age (default)
560
-
561
- # Show blocked issues
562
- bd blocked
563
-
564
- # Statistics
565
- bd stats
566
-
567
- # JSON output for agents
568
- bd ready --json
569
- ```
570
-
571
- ### Labels
572
-
573
- Add flexible metadata to issues for filtering and organization:
574
-
575
- ```bash
576
- # Add labels during creation
577
- bd create "Fix auth bug" -t bug -p 1 -l auth,backend,urgent
578
-
579
- # Add/remove labels
580
- bd label add bd-a1b2 security
581
- bd label remove bd-a1b2 urgent
582
-
583
- # List labels
584
- bd label list bd-a1b2 # Labels on one issue
585
- bd label list-all # All labels with counts
586
-
587
- # Filter by labels
588
- bd list --label backend,auth # AND: must have ALL labels
589
- bd list --label-any frontend,ui # OR: must have AT LEAST ONE
590
- ```
591
-
592
- **See [docs/LABELS.md](docs/LABELS.md) for complete label documentation and best practices.**
593
-
594
- ### Deleting Issues
595
-
596
- ```bash
597
- # Single issue deletion (preview mode)
598
- bd delete bd-a1b2
599
-
600
- # Force single deletion
601
- bd delete bd-a1b2 --force
602
-
603
- # Batch deletion
604
- bd delete bd-a1b2 bd-f14c bd-3e7a --force
605
-
606
- # Delete from file (one ID per line)
607
- bd delete --from-file deletions.txt --force
608
-
609
- # Cascade deletion (recursively delete dependents)
610
- bd delete bd-a1b2 --cascade --force
611
- ```
612
-
613
- The delete operation removes all dependency links, updates text references to `[deleted:ID]`, and removes the issue from database and JSONL.
614
-
615
- ### Configuration
616
-
617
- Manage per-project configuration for external integrations:
618
-
619
- ```bash
620
- # Set configuration
621
- bd config set jira.url "https://company.atlassian.net"
622
- bd config set jira.project "PROJ"
623
-
624
- # Get configuration
625
- bd config get jira.url
626
-
627
- # List all configuration
628
- bd config list --json
629
-
630
- # Unset configuration
631
- bd config unset jira.url
632
- ```
633
-
634
- **See [docs/CONFIG.md](docs/CONFIG.md) for complete configuration documentation.**
635
-
636
- ### Compaction (Memory Decay)
637
-
638
- Beads provides **agent-driven compaction** - your AI agent decides what to compress, no API keys required:
639
-
640
- ```bash
641
- # Agent-driven workflow (recommended)
642
- bd compact --analyze --json # Get candidates with full content
643
- bd compact --apply --id bd-42 --summary summary.txt
644
-
645
- # Legacy AI-powered workflow (requires ANTHROPIC_API_KEY)
646
- bd compact --auto --dry-run --all # Preview candidates
647
- bd compact --auto --all # Auto-compact all eligible issues
648
- ```
649
-
650
- **How it works:**
651
- 1. Use `--analyze` to export candidates (closed 30+ days) with full content
652
- 2. Summarize the content using any LLM (Claude, GPT, local model, etc.)
653
- 3. Use `--apply` to persist the summary and mark as compacted
654
-
655
- This is agentic memory decay - your database naturally forgets fine-grained details while preserving essential context. The agent has full control over compression quality.
656
-
657
- ### Export/Import
658
-
659
- ```bash
660
- # Export to JSONL (automatic by default)
661
- bd export -o issues.jsonl
662
-
663
- # Import from JSONL (automatic when JSONL is newer)
664
- bd import -i issues.jsonl
665
-
666
- # Manual sync
667
- bd sync
668
- ```
669
-
670
- **Note:** Auto-sync is enabled by default. Manual export/import is rarely needed.
671
-
672
- ### Managing Daemons
673
-
674
- bd runs a background daemon per workspace for auto-sync and RPC operations. Use `bd daemons` to manage multiple daemons:
675
-
676
- ```bash
677
- # List all running daemons
678
- bd daemons list
679
-
680
- # Check health (version mismatches, stale sockets)
681
- bd daemons health
682
-
683
- # Stop a specific daemon
684
- bd daemons stop /path/to/workspace
685
- bd daemons stop 12345 # By PID
686
-
687
- # Restart a specific daemon
688
- bd daemons restart /path/to/workspace
689
- bd daemons restart 12345 # By PID
690
-
691
- # View daemon logs
692
- bd daemons logs /path/to/workspace -n 100
693
- bd daemons logs 12345 -f # Follow mode
694
-
695
- # Stop all daemons
696
- bd daemons killall
697
- bd daemons killall --force # Force kill if graceful fails
698
- ```
699
-
700
- **Common use cases:**
701
- - **After upgrading bd**: Run `bd daemons health` to check for version mismatches, then `bd daemons killall` to restart all daemons with the new version
702
- - **Debugging**: Use `bd daemons logs <workspace>` to view daemon logs
703
- - **Cleanup**: `bd daemons list` auto-removes stale sockets
704
-
705
- See [commands/daemons.md](commands/daemons.md) for complete documentation.
706
-
707
- ### Web Interface
708
-
709
- A standalone web interface for real-time issue monitoring is available as an example:
710
-
711
- ```bash
712
- # Build the monitor-webui
713
- cd examples/monitor-webui
714
- go build
715
-
716
- # Start web UI on localhost:8080
717
- ./monitor-webui
718
-
719
- # Custom port and host
720
- ./monitor-webui -port 3000
721
- ./monitor-webui -host 0.0.0.0 -port 8080 # Listen on all interfaces
722
- ```
723
-
724
- The monitor provides:
725
- - **Real-time table view** of all issues with filtering by status and priority
726
- - **Click-through details** - Click any issue to view full details in a modal
727
- - **Live updates** - WebSocket connection for real-time changes via daemon RPC
728
- - **Responsive design** - Mobile-friendly card view on small screens
729
- - **Statistics dashboard** - Quick overview of issue counts and ready work
730
- - **Clean UI** - Simple, fast interface styled with milligram.css
731
-
732
- The monitor is particularly useful for:
733
- - **Team visibility** - Share a dashboard view of project status
734
- - **AI agent supervision** - Watch your coding agent create and update issues in real-time
735
- - **Quick browsing** - Faster than CLI for exploring issue details
736
- - **Mobile access** - Check project status from your phone
737
-
738
- See [examples/monitor-webui/](examples/monitor-webui/) for complete documentation.
739
-
740
- ## Examples
741
-
742
- Check out the **[examples/](examples/)** directory for:
743
- - **[Python agent](examples/python-agent/)** - Full agent implementation in Python
744
- - **[Bash agent](examples/bash-agent/)** - Shell script agent example
745
- - **[Git hooks](examples/git-hooks/)** - Automatic export/import on git operations
746
- - **[Branch merge workflow](examples/branch-merge/)** - Handle ID collisions when merging branches
747
- - **[Claude Desktop MCP](examples/claude-desktop-mcp/)** - MCP server for Claude Desktop
748
- - **[Claude Code Plugin](PLUGIN.md)** - One-command installation with slash commands
749
-
750
- ## Advanced Features
751
-
752
- For advanced usage, see:
753
-
754
- - **[docs/ADVANCED.md](docs/ADVANCED.md)** - Prefix renaming, merging duplicates, daemon configuration
755
- - **[docs/CONFIG.md](docs/CONFIG.md)** - Configuration system for integrations
756
- - **[docs/EXTENDING.md](docs/EXTENDING.md)** - Database extension patterns
757
- - **[docs/ADVANCED.md](docs/ADVANCED.md)** - JSONL format and merge strategies
758
-
759
- ## Documentation
760
-
761
- - **[README.md](README.md)** - You are here! Core features and quick start
762
- - **[docs/INSTALLING.md](docs/INSTALLING.md)** - Complete installation guide for all platforms
763
- - **[docs/QUICKSTART.md](docs/QUICKSTART.md)** - Interactive tutorial (`bd quickstart`)
764
- - **[docs/AGENT_MAIL_QUICKSTART.md](docs/AGENT_MAIL_QUICKSTART.md)** - 5-minute Agent Mail setup guide
765
- - **[docs/AGENT_MAIL.md](docs/AGENT_MAIL.md)** - Complete Agent Mail integration guide
766
- - **[docs/MULTI_REPO_MIGRATION.md](docs/MULTI_REPO_MIGRATION.md)** - Multi-repo workflow guide (OSS, teams, multi-phase)
767
- - **[docs/MULTI_REPO_AGENTS.md](docs/MULTI_REPO_AGENTS.md)** - Multi-repo patterns for AI agents
768
- - **[docs/FAQ.md](docs/FAQ.md)** - Frequently asked questions
769
- - **[docs/TROUBLESHOOTING.md](docs/TROUBLESHOOTING.md)** - Common issues and solutions
770
- - **[docs/ADVANCED.md](docs/ADVANCED.md)** - Advanced features and use cases
771
- - **[docs/LABELS.md](docs/LABELS.md)** - Complete label system guide
772
- - **[docs/CONFIG.md](docs/CONFIG.md)** - Configuration system
773
- - **[docs/EXTENDING.md](docs/EXTENDING.md)** - Database extension patterns
774
- - **[docs/ADVANCED.md](docs/ADVANCED.md)** - JSONL format analysis
775
- - **[docs/PLUGIN.md](docs/PLUGIN.md)** - Claude Code plugin documentation
776
- - **[CONTRIBUTING.md](CONTRIBUTING.md)** - Contribution guidelines
777
- - **[SECURITY.md](SECURITY.md)** - Security policy
778
-
779
- ## Community & Ecosystem
780
-
781
- ### Third-Party Tools
782
-
783
- - **[beads-ui](https://github.com/mantoni/beads-ui)** - Local web interface with live updates, kanban board, and keyboard navigation. Zero-setup launch with `npx beads-ui start`. Built by [@mantoni](https://github.com/mantoni).
784
-
785
- Have you built something cool with bd? [Open an issue](https://github.com/steveyegge/beads/issues) to get it featured here!
786
-
787
- ## Development
788
-
789
- ```bash
790
- # Run tests
791
- go test ./...
792
-
793
- # Build
794
- go build -o bd ./cmd/bd
795
-
796
- # Run
797
- ./bd create "Test issue"
798
-
799
- # Bump version
800
- ./scripts/bump-version.sh 0.9.3 # Update all versions, show diff
801
- ./scripts/bump-version.sh 0.9.3 --commit # Update and auto-commit
802
- ```
803
-
804
- See [scripts/README.md](scripts/README.md) for more development scripts.
805
-
806
- ## License
807
-
808
- MIT
809
-
810
- ## Credits
811
-
812
- Built with ❤️ by developers who love tracking dependencies and finding ready work.
813
-
814
- Inspired by the need for a simpler, dependency-aware issue tracker.