beads

package module
v0.30.6 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 19, 2025 License: MIT Imports: 3 Imported by: 3

README

bd - Beads

Distributed, git-backed graph issue tracker for AI agents.

License Go Report Card Release npm version PyPI

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.

⚡ Quick Start

# Install (macOS/Linux)
curl -fsSL https://raw.githubusercontent.com/steveyegge/beads/main/scripts/install.sh | bash

# Initialize (Humans run this once)
bd init

# Tell your agent
echo "Use 'bd' for task tracking" >> AGENTS.md

🛠 Features

  • Git as Database: Issues stored as JSONL in .beads/. Versioned, branched, and merged like code.
  • 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.
  • Invisible Infrastructure: SQLite local cache for speed; background daemon for auto-sync.
  • Compaction: Semantic "memory decay" summarizes old closed tasks to save context window.

📖 Essential Commands

Command Action
bd ready List tasks with no open blockers.
bd create "Title" -p 0 Create a P0 task.
bd dep add <child> <parent> Link tasks (blocks, related, parent-child).
bd show <id> View task details and audit trail.
bd quickstart Interactive guide for AI agents.

🔗 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.

📦 Installation

  • npm: npm install -g @beads/bd
  • Homebrew: brew install steveyegge/beads/bd
  • Go: go install github.com/steveyegge/beads/cmd/bd@latest

Requirements: Linux (glibc 2.32+), macOS, or Windows.

🌐 Community Tools

  • beads_viewer - Keyboard-driven terminal UI with kanban board, insights panel, and graph view. Built by @Dicklesworthstone.
  • beads.el - Emacs UI to browse, edit, and manage beads. Built by @ctietze.
  • beads-ui - Local web interface with live updates and kanban board. npx beads-ui start. Built by @mantoni.
  • bdui - Real-time terminal UI with tree view, dependency graph, and vim-style navigation. Built by @assimelha.
  • perles - Terminal UI with BQL (Beads Query Language) and multi-view kanban. Built by @zjrosen.
  • vscode-beads - VS Code extension with issues panel and daemon management. Built by @jdillon.

📝 Documentation

Documentation

Overview

Package beads provides a minimal public API for extending bd with custom orchestration.

Most extensions should use direct SQL queries against bd's database. This package exports only the essential types and functions needed for Go-based extensions that want to use bd's storage layer programmatically.

For detailed guidance on extending bd, see docs/EXTENDING.md.

Index

Constants

View Source
const (
	StatusOpen       = types.StatusOpen
	StatusInProgress = types.StatusInProgress
	StatusBlocked    = types.StatusBlocked
	StatusClosed     = types.StatusClosed
)

Status constants

View Source
const (
	TypeBug     = types.TypeBug
	TypeFeature = types.TypeFeature
	TypeTask    = types.TypeTask
	TypeEpic    = types.TypeEpic
	TypeChore   = types.TypeChore
)

IssueType constants

View Source
const (
	DepBlocks         = types.DepBlocks
	DepRelated        = types.DepRelated
	DepParentChild    = types.DepParentChild
	DepDiscoveredFrom = types.DepDiscoveredFrom
)

DependencyType constants

View Source
const (
	SortPolicyHybrid   = types.SortPolicyHybrid
	SortPolicyPriority = types.SortPolicyPriority
	SortPolicyOldest   = types.SortPolicyOldest
)

SortPolicy constants

View Source
const (
	EventCreated           = types.EventCreated
	EventUpdated           = types.EventUpdated
	EventStatusChanged     = types.EventStatusChanged
	EventCommented         = types.EventCommented
	EventClosed            = types.EventClosed
	EventReopened          = types.EventReopened
	EventDependencyAdded   = types.EventDependencyAdded
	EventDependencyRemoved = types.EventDependencyRemoved
	EventLabelAdded        = types.EventLabelAdded
	EventLabelRemoved      = types.EventLabelRemoved
	EventCompacted         = types.EventCompacted
)

EventType constants

Variables

This section is empty.

Functions

func FindBeadsDir added in v0.24.0

func FindBeadsDir() string

FindBeadsDir finds the .beads/ directory in the current directory tree Returns empty string if not found. Supports both database and JSONL-only mode.

func FindDatabasePath

func FindDatabasePath() string

FindDatabasePath finds the beads database in the current directory tree

func FindJSONLPath

func FindJSONLPath(dbPath string) string

FindJSONLPath finds the JSONL file corresponding to a database path

Types

type BlockedIssue added in v0.12.0

type BlockedIssue = types.BlockedIssue

Core types from internal/types

type Comment added in v0.12.0

type Comment = types.Comment

Core types from internal/types

type DatabaseInfo added in v0.17.0

type DatabaseInfo = beads.DatabaseInfo

DatabaseInfo contains information about a beads database

func FindAllDatabases added in v0.17.0

func FindAllDatabases() []DatabaseInfo

FindAllDatabases finds all beads databases in the system

type Dependency added in v0.12.0

type Dependency = types.Dependency

Core types from internal/types

type DependencyCounts added in v0.22.1

type DependencyCounts = types.DependencyCounts

Core types from internal/types

type DependencyType added in v0.12.0

type DependencyType = types.DependencyType

Core types from internal/types

type EpicStatus added in v0.12.0

type EpicStatus = types.EpicStatus

Core types from internal/types

type Event added in v0.12.0

type Event = types.Event

Core types from internal/types

type EventType added in v0.12.0

type EventType = types.EventType

Core types from internal/types

type Issue

type Issue = types.Issue

Core types from internal/types

type IssueFilter added in v0.12.0

type IssueFilter = types.IssueFilter

Core types from internal/types

type IssueType

type IssueType = types.IssueType

Core types from internal/types

type IssueWithCounts added in v0.22.1

type IssueWithCounts = types.IssueWithCounts

Core types from internal/types

type Label added in v0.12.0

type Label = types.Label

Core types from internal/types

type SortPolicy added in v0.17.7

type SortPolicy = types.SortPolicy

Core types from internal/types

type StaleFilter added in v0.22.1

type StaleFilter = types.StaleFilter

Core types from internal/types

type Status

type Status = types.Status

Core types from internal/types

type Storage

type Storage = beads.Storage

Storage is the interface for beads storage operations

func NewSQLiteStorage

func NewSQLiteStorage(ctx context.Context, dbPath string) (Storage, error)

NewSQLiteStorage creates a new SQLite storage instance at the given path

type Transaction added in v0.24.5

type Transaction = beads.Transaction

Transaction provides atomic multi-operation support within a database transaction. Use Storage.RunInTransaction() to obtain a Transaction instance.

type TreeNode added in v0.12.0

type TreeNode = types.TreeNode

Core types from internal/types

type WorkFilter

type WorkFilter = types.WorkFilter

Core types from internal/types

Directories

Path Synopsis
cmd
bd command
Package main implements the bd CLI dependency management commands.
Package main implements the bd CLI dependency management commands.
examples
go-agent module
monitor-webui module
internal
beads
Package beads provides a minimal public API for extending bd with custom orchestration.
Package beads provides a minimal public API for extending bd with custom orchestration.
compact
Package compact provides AI-powered issue compaction using Claude Haiku.
Package compact provides AI-powered issue compaction using Claude Haiku.
git
hooks
Package hooks provides a hook system for extensibility.
Package hooks provides a hook system for extensibility.
rpc
storage
Package storage defines the interface for issue storage backends.
Package storage defines the interface for issue storage backends.
storage/memory
Package memory implements the storage interface using in-memory data structures.
Package memory implements the storage interface using in-memory data structures.
storage/sqlite
Package sqlite provides the blocked_issues_cache optimization for GetReadyWork performance.
Package sqlite provides the blocked_issues_cache optimization for GetReadyWork performance.
testutil/fixtures
Package fixtures provides realistic test data generation for benchmarks and tests.
Package fixtures provides realistic test data generation for benchmarks and tests.
types
Package types defines core data structures for the bd issue tracker.
Package types defines core data structures for the bd issue tracker.
utils
Package utils provides utility functions for issue ID parsing and resolution.
Package utils provides utility functions for issue ID parsing and resolution.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL