@beads/bd 0.21.5

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/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2025 Beads Contributors
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/bin/README.md ADDED
@@ -0,0 +1,632 @@
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
+ [![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)
6
+ [![Go Report Card](https://goreportcard.com/badge/github.com/steveyegge/beads)](https://goreportcard.com/report/github.com/steveyegge/beads)
7
+ [![License](https://img.shields.io/github/license/steveyegge/beads)](LICENSE)
8
+ [![PyPI](https://img.shields.io/pypi/v/beads-mcp)](https://pypi.org/project/beads-mcp/)
9
+
10
+ **Give your coding agent a memory upgrade**
11
+
12
+ > ## 🎉 **v0.20.1: Multi-Worker Support Unlocked!** 🎉
13
+ >
14
+ > **Hash-based IDs eliminate merge conflicts and collision issues!**
15
+ >
16
+ > 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.
17
+ >
18
+ > **What's new:** ✅ Multi-clone, multi-branch, multi-agent workflows now work reliably
19
+ > **What changed:** Issue IDs are now short hashes instead of sequential numbers
20
+ > **Migration:** Run `bd migrate` to upgrade existing databases (optional - old DBs still work)
21
+ >
22
+ > 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.
23
+
24
+ > **⚠️ 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.
25
+
26
+ 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.
27
+
28
+ 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.
29
+
30
+ Instant start:
31
+
32
+ ```bash
33
+ curl -fsSL https://raw.githubusercontent.com/steveyegge/beads/main/scripts/install.sh | bash
34
+ ```
35
+
36
+ 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!
37
+
38
+ 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.
39
+
40
+ 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.
41
+
42
+ 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.
43
+
44
+ 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.
45
+
46
+ 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.
47
+
48
+ 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.
49
+
50
+ ![AI Agent using Beads](https://raw.githubusercontent.com/steveyegge/beads/main/.github/images/agent-using-beads.jpg)
51
+
52
+ ## Features
53
+
54
+ - ✨ **Zero setup** - `bd init` creates project-local database (and your agent will do it)
55
+ - 🔗 **Dependency tracking** - Four dependency types (blocks, related, parent-child, discovered-from)
56
+ - 📋 **Ready work detection** - Automatically finds issues with no open blockers
57
+ - 🤖 **Agent-friendly** - `--json` flags for programmatic integration
58
+ - 📦 **Git-versioned** - JSONL records stored in git, synced across machines
59
+ - 🌍 **Distributed by design** - Agents on multiple machines share one logical database via git
60
+ - 🔐 **Protected branch support** - Works with GitHub/GitLab protected branches via separate sync branch
61
+ - 🏗️ **Extensible** - Add your own tables to the SQLite database
62
+ - 🔍 **Multi-project isolation** - Each project gets its own database, auto-discovered by directory
63
+ - 🌲 **Dependency trees** - Visualize full dependency graphs
64
+ - 🎨 **Beautiful CLI** - Colored output for humans, JSON for bots
65
+ - 💾 **Full audit trail** - Every change is logged
66
+ - ⚡ **High performance** - Batch operations for bulk imports (1000 issues in ~950ms)
67
+ - 🗜️ **Memory decay** - Semantic compaction gracefully reduces old closed issues
68
+
69
+ ## Installation
70
+
71
+ **Quick install (all platforms):**
72
+ ```bash
73
+ curl -fsSL https://raw.githubusercontent.com/steveyegge/beads/main/scripts/install.sh | bash
74
+ ```
75
+
76
+ **Homebrew (macOS/Linux):**
77
+ ```bash
78
+ brew tap steveyegge/beads
79
+ brew install bd
80
+ ```
81
+
82
+ **Other platforms and methods:** See [INSTALLING.md](INSTALLING.md) for Windows, Arch Linux, and manual installation.
83
+
84
+ **IDE Integration:** See [INSTALLING.md](INSTALLING.md) for Claude Code plugin and MCP server setup.
85
+
86
+ ## Quick Start
87
+
88
+ ### For Humans
89
+
90
+ Beads is designed for **AI coding agents** to use on your behalf. Setup takes 30 seconds:
91
+
92
+ **You run this once (humans only):**
93
+ ```bash
94
+ # In your project root:
95
+ bd init
96
+
97
+ # For protected branches (GitHub/GitLab):
98
+ bd init --branch beads-metadata
99
+
100
+ # bd will:
101
+ # - Create .beads/ directory with database
102
+ # - Import existing issues from git (if any)
103
+ # - Prompt to install git hooks (recommended: say yes)
104
+ # - Auto-start daemon for sync
105
+
106
+ # Then tell your agent about bd:
107
+ echo "BEFORE ANYTHING ELSE: run 'bd onboard' and follow the instructions" >> AGENTS.md
108
+ ```
109
+
110
+ **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.
111
+
112
+ **Your agent does the rest:** Next time your agent starts, it will:
113
+ 1. Run `bd onboard` and receive integration instructions
114
+ 2. Add bd workflow documentation to AGENTS.md
115
+ 3. Update CLAUDE.md with a note (if present)
116
+ 4. Remove the bootstrap instruction
117
+
118
+ **For agents setting up repos:** Use `bd init --quiet` for non-interactive setup (auto-installs git hooks, no prompts).
119
+
120
+ **For new repo clones:** Run `bd init` (or `bd init --quiet` for agents) to import existing issues from `.beads/issues.jsonl` automatically.
121
+
122
+ Most tasks will be created and managed by agents during conversations. You can check on things with:
123
+
124
+ ```bash
125
+ bd list # See what's being tracked
126
+ bd show <issue-id> # Review a specific issue
127
+ bd ready # See what's ready to work on
128
+ bd dep tree <issue-id> # Visualize dependencies
129
+ ```
130
+
131
+ ### For AI Agents
132
+
133
+ Run the interactive guide to learn the full workflow:
134
+
135
+ ```bash
136
+ bd quickstart
137
+ ```
138
+
139
+ Quick reference for agent workflows:
140
+
141
+ ```bash
142
+ # Find ready work
143
+ bd ready --json | jq '.[0]'
144
+
145
+ # Create issues during work
146
+ bd create "Discovered bug" -t bug -p 0 --json
147
+
148
+ # Link discovered work back to parent
149
+ bd dep add <new-id> <parent-id> --type discovered-from
150
+
151
+ # Update status
152
+ bd update <issue-id> --status in_progress --json
153
+
154
+ # Complete work
155
+ bd close <issue-id> --reason "Implemented" --json
156
+ ```
157
+
158
+ ## The Magic: Distributed Database via Git
159
+
160
+ Here's the crazy part: **bd acts like a centralized database, but it's actually distributed via git.**
161
+
162
+ When you install bd on any machine with your project repo, you get:
163
+ - ✅ Full query capabilities (dependencies, ready work, etc.)
164
+ - ✅ Fast local operations (<100ms via SQLite)
165
+ - ✅ Shared state across all machines (via git)
166
+ - ✅ No server, no daemon required, no configuration
167
+ - ✅ AI-assisted merge conflict resolution
168
+
169
+ **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`).
170
+
171
+ **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.
172
+
173
+ No PostgreSQL instance. No MySQL server. No hosted service. Just install bd, clone the repo, and you're connected to the "database."
174
+
175
+ ### Git Workflow & Auto-Sync
176
+
177
+ bd automatically syncs your local database with git:
178
+
179
+ **Making changes (auto-export):**
180
+ ```bash
181
+ bd create "Fix bug" -p 1
182
+ bd update bd-a1b2 --status in_progress
183
+ # bd automatically exports to .beads/issues.jsonl after 5 seconds
184
+
185
+ git add .beads/issues.jsonl
186
+ git commit -m "Working on bd-a1b2"
187
+ git push
188
+ ```
189
+
190
+ **Pulling changes (auto-import):**
191
+ ```bash
192
+ git pull
193
+ # bd automatically detects JSONL is newer and imports on next command
194
+
195
+ bd ready # Fresh data from git!
196
+ bd list # Shows issues from other machines
197
+ ```
198
+
199
+ **Manual sync (optional):**
200
+ ```bash
201
+ bd sync # Immediately flush pending changes and import latest JSONL
202
+ ```
203
+
204
+ **For zero-lag sync**, install the git hooks:
205
+ ```bash
206
+ cd examples/git-hooks && ./install.sh
207
+ ```
208
+
209
+ This adds:
210
+ - **pre-commit** - Immediate flush before commit (no 5-second wait)
211
+ - **post-merge** - Guaranteed import after `git pull` or `git merge`
212
+
213
+ **Disable auto-sync** if needed:
214
+ ```bash
215
+ bd --no-auto-flush create "Issue" # Skip auto-export
216
+ bd --no-auto-import list # Skip auto-import check
217
+ ```
218
+
219
+ ## Hash-Based Issue IDs
220
+
221
+ **Version 0.20.1 introduces collision-resistant hash-based IDs** to enable reliable multi-worker and multi-branch workflows.
222
+
223
+ ### ID Format
224
+
225
+ Issue IDs now use short hexadecimal hashes instead of sequential numbers:
226
+
227
+ - **Before (v0.20.0):** `bd-1`, `bd-2`, `bd-152` (sequential numbers)
228
+ - **After (v0.20.1):** `bd-a1b2`, `bd-f14c`, `bd-3e7a` (4-6 character hashes)
229
+
230
+ Hash IDs use **progressive length scaling** based on database size:
231
+ - **0-500 issues:** 4-character hashes (e.g., `bd-a1b2`)
232
+ - **500-1,500 issues:** 5-character hashes (e.g., `bd-f14c3`)
233
+ - **1,500-10,000 issues:** 6-character hashes (e.g., `bd-3e7a5b`)
234
+
235
+ ### Why Hash IDs?
236
+
237
+ **The problem with sequential IDs:**
238
+ When multiple agents or branches create issues concurrently, sequential IDs collide:
239
+ - Agent A creates `bd-10` on branch `feature-auth`
240
+ - Agent B creates `bd-10` on branch `feature-payments`
241
+ - Git merge creates duplicate IDs → collision resolution required
242
+
243
+ **How hash IDs solve this:**
244
+ Hash IDs are generated from random data, making concurrent creation collision-free:
245
+ - Agent A creates `bd-a1b2` (hash of random UUID)
246
+ - Agent B creates `bd-f14c` (different hash, different UUID)
247
+ - Git merge succeeds cleanly → no collision resolution needed
248
+
249
+ ### Birthday Paradox Math
250
+
251
+ Hash IDs use **birthday paradox probability** to determine length:
252
+
253
+ | Hash Length | Total Space | 50% Collision at N Issues | 1% Collision at N Issues |
254
+ |-------------|-------------|---------------------------|--------------------------|
255
+ | 4 chars | 65,536 | ~304 issues | ~38 issues |
256
+ | 5 chars | 1,048,576 | ~1,217 issues | ~153 issues |
257
+ | 6 chars | 16,777,216 | ~4,869 issues | ~612 issues |
258
+
259
+ **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.
260
+
261
+ **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.
262
+
263
+ ### Migration
264
+
265
+ **Existing databases continue to work** - no forced migration. Run `bd migrate` when ready:
266
+
267
+ ```bash
268
+ # Inspect migration plan (for AI agents)
269
+ bd migrate --inspect --json
270
+
271
+ # Check schema and config state
272
+ bd info --schema --json
273
+
274
+ # Preview migration
275
+ bd migrate --dry-run
276
+
277
+ # Migrate database schema (removes obsolete issue_counters table)
278
+ bd migrate
279
+
280
+ # Show current database info
281
+ bd info
282
+ ```
283
+
284
+ **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.
285
+
286
+ **Note:** Hash IDs require schema version 9+. The `bd migrate` command detects old schemas and upgrades automatically.
287
+
288
+ ### Hierarchical Child IDs
289
+
290
+ Hash IDs support **hierarchical children** for natural work breakdown structures. Child IDs use dot notation:
291
+
292
+ ```
293
+ bd-a3f8e9 [epic] Auth System
294
+ bd-a3f8e9.1 [task] Design login UI
295
+ bd-a3f8e9.2 [task] Backend validation
296
+ bd-a3f8e9.3 [epic] Password Reset
297
+ bd-a3f8e9.3.1 [task] Email templates
298
+ bd-a3f8e9.3.2 [task] Reset flow tests
299
+ ```
300
+
301
+ **Benefits:**
302
+ - **Collision-free**: Parent hash ensures unique namespace
303
+ - **Human-readable**: Clear parent-child relationships
304
+ - **Flexible depth**: Up to 3 levels of nesting
305
+ - **No coordination needed**: Each epic owns its child ID space
306
+
307
+ **Common patterns:**
308
+ - 1 level: Epic → tasks (most projects)
309
+ - 2 levels: Epic → features → tasks (large projects)
310
+ - 3 levels: Epic → features → stories → tasks (complex projects)
311
+
312
+ **Example workflow:**
313
+ ```bash
314
+ # Create parent epic (generates hash ID automatically)
315
+ bd create "Auth System" -t epic -p 1
316
+ # Returns: bd-a3f8e9
317
+
318
+ # Create child tasks
319
+ bd create "Design login UI" -p 1 # Auto-assigned: bd-a3f8e9.1
320
+ bd create "Backend validation" -p 1 # Auto-assigned: bd-a3f8e9.2
321
+
322
+ # Create nested epic with its own children
323
+ bd create "Password Reset" -t epic -p 1 # Auto-assigned: bd-a3f8e9.3
324
+ bd create "Email templates" -p 1 # Auto-assigned: bd-a3f8e9.3.1
325
+ ```
326
+
327
+ **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.
328
+
329
+ ## Usage
330
+
331
+ ### Health Check
332
+
333
+ Check installation health: `bd doctor` validates your `.beads/` setup, database version, ID format, and CLI version. Provides actionable fixes for any issues found.
334
+
335
+ ### Creating Issues
336
+
337
+ ```bash
338
+ bd create "Fix bug" -d "Description" -p 1 -t bug
339
+ bd create "Add feature" --description "Long description" --priority 2 --type feature
340
+ bd create "Task" -l "backend,urgent" --assignee alice
341
+
342
+ # Get JSON output for programmatic use
343
+ bd create "Fix bug" -d "Description" --json
344
+
345
+ # Create multiple issues from a markdown file
346
+ bd create -f feature-plan.md
347
+ ```
348
+
349
+ Options:
350
+ - `-f, --file` - Create multiple issues from markdown file
351
+ - `-d, --description` - Issue description
352
+ - `-p, --priority` - Priority (0-4, 0=highest, default=2)
353
+ - `-t, --type` - Type (bug|feature|task|epic|chore, default=task)
354
+ - `-a, --assignee` - Assign to user
355
+ - `-l, --labels` - Comma-separated labels
356
+ - `--id` - Explicit issue ID (e.g., `worker1-100` for ID space partitioning)
357
+ - `--json` - Output in JSON format
358
+
359
+ ### Viewing Issues
360
+
361
+ ```bash
362
+ bd info # Show database path and daemon status
363
+ bd show bd-a1b2 # Show full details
364
+ bd list # List all issues
365
+ bd list --status open # Filter by status
366
+ bd list --priority 1 # Filter by priority
367
+ bd list --assignee alice # Filter by assignee
368
+ bd list --label=backend,urgent # Filter by labels (AND)
369
+ bd list --label-any=frontend,backend # Filter by labels (OR)
370
+
371
+ # JSON output for agents
372
+ bd info --json
373
+ bd list --json
374
+ bd show bd-a1b2 --json
375
+ ```
376
+
377
+ ### Updating Issues
378
+
379
+ ```bash
380
+ bd update bd-a1b2 --status in_progress
381
+ bd update bd-a1b2 --priority 2
382
+ bd update bd-a1b2 --assignee bob
383
+ bd close bd-a1b2 --reason "Completed"
384
+ bd close bd-a1b2 bd-f14c bd-3e7a # Close multiple
385
+
386
+ # JSON output
387
+ bd update bd-a1b2 --status in_progress --json
388
+ ```
389
+
390
+ ### Dependencies
391
+
392
+ ```bash
393
+ # Add dependency (bd-f14c depends on bd-a1b2)
394
+ bd dep add bd-f14c bd-a1b2
395
+ bd dep add bd-3e7a bd-a1b2 --type blocks
396
+
397
+ # Remove dependency
398
+ bd dep remove bd-f14c bd-a1b2
399
+
400
+ # Show dependency tree
401
+ bd dep tree bd-f14c
402
+
403
+ # Detect cycles
404
+ bd dep cycles
405
+ ```
406
+
407
+ #### Dependency Types
408
+
409
+ - **blocks**: Hard blocker (default) - issue cannot start until blocker is resolved
410
+ - **related**: Soft relationship - issues are connected but not blocking
411
+ - **parent-child**: Hierarchical relationship (child depends on parent)
412
+ - **discovered-from**: Issue discovered during work on another issue
413
+
414
+ Only `blocks` dependencies affect ready work detection.
415
+
416
+ ### Finding Work
417
+
418
+ ```bash
419
+ # Show ready work (no blockers)
420
+ bd ready
421
+ bd ready --limit 20
422
+ bd ready --priority 1
423
+ bd ready --assignee alice
424
+
425
+ # Sort policies (hybrid is default)
426
+ bd ready --sort priority # Strict priority order (P0, P1, P2, P3)
427
+ bd ready --sort oldest # Oldest issues first (backlog clearing)
428
+ bd ready --sort hybrid # Recent by priority, old by age (default)
429
+
430
+ # Show blocked issues
431
+ bd blocked
432
+
433
+ # Statistics
434
+ bd stats
435
+
436
+ # JSON output for agents
437
+ bd ready --json
438
+ ```
439
+
440
+ ### Labels
441
+
442
+ Add flexible metadata to issues for filtering and organization:
443
+
444
+ ```bash
445
+ # Add labels during creation
446
+ bd create "Fix auth bug" -t bug -p 1 -l auth,backend,urgent
447
+
448
+ # Add/remove labels
449
+ bd label add bd-a1b2 security
450
+ bd label remove bd-a1b2 urgent
451
+
452
+ # List labels
453
+ bd label list bd-a1b2 # Labels on one issue
454
+ bd label list-all # All labels with counts
455
+
456
+ # Filter by labels
457
+ bd list --label backend,auth # AND: must have ALL labels
458
+ bd list --label-any frontend,ui # OR: must have AT LEAST ONE
459
+ ```
460
+
461
+ **See [LABELS.md](LABELS.md) for complete label documentation and best practices.**
462
+
463
+ ### Deleting Issues
464
+
465
+ ```bash
466
+ # Single issue deletion (preview mode)
467
+ bd delete bd-a1b2
468
+
469
+ # Force single deletion
470
+ bd delete bd-a1b2 --force
471
+
472
+ # Batch deletion
473
+ bd delete bd-a1b2 bd-f14c bd-3e7a --force
474
+
475
+ # Delete from file (one ID per line)
476
+ bd delete --from-file deletions.txt --force
477
+
478
+ # Cascade deletion (recursively delete dependents)
479
+ bd delete bd-a1b2 --cascade --force
480
+ ```
481
+
482
+ The delete operation removes all dependency links, updates text references to `[deleted:ID]`, and removes the issue from database and JSONL.
483
+
484
+ ### Configuration
485
+
486
+ Manage per-project configuration for external integrations:
487
+
488
+ ```bash
489
+ # Set configuration
490
+ bd config set jira.url "https://company.atlassian.net"
491
+ bd config set jira.project "PROJ"
492
+
493
+ # Get configuration
494
+ bd config get jira.url
495
+
496
+ # List all configuration
497
+ bd config list --json
498
+
499
+ # Unset configuration
500
+ bd config unset jira.url
501
+ ```
502
+
503
+ **See [CONFIG.md](CONFIG.md) for complete configuration documentation.**
504
+
505
+ ### Compaction (Memory Decay)
506
+
507
+ Beads uses AI to compress old closed issues, keeping databases lightweight as they age:
508
+
509
+ ```bash
510
+ bd compact --dry-run --all # Preview candidates
511
+ bd compact --days 90 # Compact closed issues older than 90 days
512
+ ```
513
+
514
+ This is agentic memory decay - your database naturally forgets fine-grained details while preserving essential context.
515
+
516
+ ### Export/Import
517
+
518
+ ```bash
519
+ # Export to JSONL (automatic by default)
520
+ bd export -o issues.jsonl
521
+
522
+ # Import from JSONL (automatic when JSONL is newer)
523
+ bd import -i issues.jsonl
524
+
525
+ # Manual sync
526
+ bd sync
527
+ ```
528
+
529
+ **Note:** Auto-sync is enabled by default. Manual export/import is rarely needed.
530
+
531
+ ### Managing Daemons
532
+
533
+ bd runs a background daemon per workspace for auto-sync and RPC operations. Use `bd daemons` to manage multiple daemons:
534
+
535
+ ```bash
536
+ # List all running daemons
537
+ bd daemons list
538
+
539
+ # Check health (version mismatches, stale sockets)
540
+ bd daemons health
541
+
542
+ # Stop a specific daemon
543
+ bd daemons stop /path/to/workspace
544
+ bd daemons stop 12345 # By PID
545
+
546
+ # View daemon logs
547
+ bd daemons logs /path/to/workspace -n 100
548
+ bd daemons logs 12345 -f # Follow mode
549
+
550
+ # Stop all daemons
551
+ bd daemons killall
552
+ bd daemons killall --force # Force kill if graceful fails
553
+ ```
554
+
555
+ **Common use cases:**
556
+ - **After upgrading bd**: Run `bd daemons health` to check for version mismatches, then `bd daemons killall` to restart all daemons with the new version
557
+ - **Debugging**: Use `bd daemons logs <workspace>` to view daemon logs
558
+ - **Cleanup**: `bd daemons list` auto-removes stale sockets
559
+
560
+ See [commands/daemons.md](commands/daemons.md) for complete documentation.
561
+
562
+ ## Examples
563
+
564
+ Check out the **[examples/](examples/)** directory for:
565
+ - **[Python agent](examples/python-agent/)** - Full agent implementation in Python
566
+ - **[Bash agent](examples/bash-agent/)** - Shell script agent example
567
+ - **[Git hooks](examples/git-hooks/)** - Automatic export/import on git operations
568
+ - **[Branch merge workflow](examples/branch-merge/)** - Handle ID collisions when merging branches
569
+ - **[Claude Desktop MCP](examples/claude-desktop-mcp/)** - MCP server for Claude Desktop
570
+ - **[Claude Code Plugin](PLUGIN.md)** - One-command installation with slash commands
571
+
572
+ ## Advanced Features
573
+
574
+ For advanced usage, see:
575
+
576
+ - **[ADVANCED.md](ADVANCED.md)** - Prefix renaming, merging duplicates, daemon configuration
577
+ - **[CONFIG.md](CONFIG.md)** - Configuration system for integrations
578
+ - **[EXTENDING.md](EXTENDING.md)** - Database extension patterns
579
+ - **[ADVANCED.md](ADVANCED.md)** - JSONL format and merge strategies
580
+
581
+ ## Documentation
582
+
583
+ - **[README.md](README.md)** - You are here! Core features and quick start
584
+ - **[INSTALLING.md](INSTALLING.md)** - Complete installation guide for all platforms
585
+ - **[QUICKSTART.md](QUICKSTART.md)** - Interactive tutorial (`bd quickstart`)
586
+ - **[FAQ.md](FAQ.md)** - Frequently asked questions
587
+ - **[TROUBLESHOOTING.md](TROUBLESHOOTING.md)** - Common issues and solutions
588
+ - **[ADVANCED.md](ADVANCED.md)** - Advanced features and use cases
589
+ - **[LABELS.md](LABELS.md)** - Complete label system guide
590
+ - **[CONFIG.md](CONFIG.md)** - Configuration system
591
+ - **[EXTENDING.md](EXTENDING.md)** - Database extension patterns
592
+ - **[ADVANCED.md](ADVANCED.md)** - JSONL format analysis
593
+ - **[PLUGIN.md](PLUGIN.md)** - Claude Code plugin documentation
594
+ - **[CONTRIBUTING.md](CONTRIBUTING.md)** - Contribution guidelines
595
+ - **[SECURITY.md](SECURITY.md)** - Security policy
596
+
597
+ ## Community & Ecosystem
598
+
599
+ ### Third-Party Tools
600
+
601
+ - **[Beadster](https://apps.apple.com/us/app/beadster-issue-tracking/id6754286462)** - Native macOS app for viewing and managing bd issues across multiple projects. Features a compact, always-on-top window for quick reference during development. Built by [@podviaznikov](https://github.com/podviaznikov).
602
+
603
+ Have you built something cool with bd? [Open an issue](https://github.com/steveyegge/beads/issues) to get it featured here!
604
+
605
+ ## Development
606
+
607
+ ```bash
608
+ # Run tests
609
+ go test ./...
610
+
611
+ # Build
612
+ go build -o bd ./cmd/bd
613
+
614
+ # Run
615
+ ./bd create "Test issue"
616
+
617
+ # Bump version
618
+ ./scripts/bump-version.sh 0.9.3 # Update all versions, show diff
619
+ ./scripts/bump-version.sh 0.9.3 --commit # Update and auto-commit
620
+ ```
621
+
622
+ See [scripts/README.md](scripts/README.md) for more development scripts.
623
+
624
+ ## License
625
+
626
+ MIT
627
+
628
+ ## Credits
629
+
630
+ Built with ❤️ by developers who love tracking dependencies and finding ready work.
631
+
632
+ Inspired by the need for a simpler, dependency-aware issue tracker.
package/bin/bd ADDED
Binary file