A powerful terminal user interface for the beads issue tracker.
Note: This project showcases two things:
- Beads - An exceptional local-first issue tracker that uses SQLite + JSONL for storage. If you're tired of heavyweight issue trackers and want something fast, git-friendly, and developer-focused, check out beads!
- AI-Assisted Development - This TUI is developed primarily by guiding Claude Code, demonstrating how AI pair programming can build complex, maintainable software. The recent refactoring reduced main.go from 2687 to 905 lines (66%) through iterative collaboration.
- Live monitoring of
.beads/beads.dbSQLite database with automatic refresh - Dual view modes - List view (grouped by status) and Tree view (dependency hierarchy)
- Issue segregation - Separate views for ready, blocked, and in-progress issues
- Vim-style navigation - j/k for movement, gg/G for jumps, familiar keybindings
- Rich detail panel - Full issue metadata, dependencies, comments, and acceptance criteria
- Real-time updates - Automatically refreshes when database changes
- Full CRUD operations - Create, edit, close, and reopen issues without leaving the TUI
- Full-field editing - Edit title, description, design, acceptance criteria, and notes via modal dialog (
ekey) - Quick updates - Instant priority (0-4) and status (s) changes with single keypress
- Comment system - Add comments to issues directly from the TUI
- Dependency management - Add/remove blocks, parent-child, and related dependencies via dialog
- Label management - Add/remove labels through dedicated dialog interface
- Clipboard integration - Yank issue IDs (y) or IDs with titles (Y) to clipboard
- Statistics dashboard - Press S to view issue distribution, priority breakdown, and completion metrics
- Advanced filtering - Filter by priority (p0-p4), type (bug, feature, task, epic, chore), status, or labels
- Search functionality - Full-text search with n/N navigation through results
- Panel focus system - Tab between issue list and detail panel with keyboard scrolling support
- Mouse mode toggle - Enable/disable mouse interaction (m key) for terminal text selection
- Natural language detection - Automatically detects priority and type keywords when creating issues
- Color-coded priorities - Visual indicators for P0 (critical) through P4 (lowest)
- Status icons - β (ready), β (blocked), β (in-progress), Β· (closed)
- Type emoji - π (bug), β¨ (feature), π (task), π― (epic), π§ (chore)
- Syntax highlighting - Color-coded dependencies, labels, and metadata
- Responsive layout - Adapts to terminal size with graceful degradation
Build from source:
git clone https://github.com/andy/beads-tui # Update with actual repo URL
cd beads-tui
go build -o beads-tui ./cmd/beads-tuiOr run directly:
go run ./cmd/beads-tuiNote: This project is not yet published to a package registry. Install from source as shown above.
Navigate to a directory containing a .beads folder and run:
./beads-tuiThe TUI will automatically find the .beads/beads.db database in the current or parent directories.
Run with comprehensive diagnostic logging:
./beads-tui --debug
# Logs saved to: ~/.beads-tui/debug-YYYY-MM-DD-HH-MM-SS.logDebug logs include keyboard events, refresh operations, bd command executions, and timing information - useful for diagnosing hangs or performance issues.
j/β- Move downk/β- Move upgg- Jump to topG- Jump to bottomTab- Focus detail panel for scrollingEnter- Focus detail panel (when on issue)ESC- Return focus to issue list
/- Start search moden- Next search resultN- Previous search resultESC- Exit search mode
0-4- Set priority (P0=critical, P1=high, P2=normal, P3=low, P4=lowest)s- Cycle status (open β in_progress β blocked β closed β open)R- Rename issue (edit title)a- Create new issue (vim-style "add")c- Add comment to selected issuee- Edit issue (title, description, design, acceptance, notes, priority, type)x- Close issue with optional reasonX- Reopen closed issue with optional reasonD- Manage dependencies (add/remove blocks, parent-child, related)L- Manage labels (add/remove labels)y- Yank (copy) issue ID to clipboardY- Yank (copy) issue ID with title to clipboardB- Copy git branch name to clipboard
So- Set status to openSi- Set status to in_progressSb- Set status to blockedSc- Set status to closed
t- Toggle between list and tree viewC- Toggle showing closed issues in list viewf- Quick filter (type:p1 bug,feature, etc.)S- Show statistics dashboardm- Toggle mouse mode on/offr- Manual refresh
Ctrl-d- Scroll down half pageCtrl-u- Scroll up half pageCtrl-f- Scroll down full page (vim)Ctrl-b- Scroll up full page (vim)Ctrl-e- Scroll down one lineCtrl-y- Scroll up one linePageDown- Scroll down full pagePageUp- Scroll up full pageHome- Jump to top of detailsEnd- Jump to bottom of details
?- Show help screenq- Quit
The filter dialog (f key) supports natural language filtering:
p0-p4 Priority (e.g., 'p1' or 'p1,p2')
bug, feature, task, epic, chore Types
open, in_progress, blocked, closed Statuses
#label Label (e.g., '#ui' or '#bug,#urgent')
Examples:
p1 bug- P1 bugs onlyfeature,task- Features and tasksp0,p1 open- High priority open issues#ui #urgent- Issues with 'ui' or 'urgent' labels
Leave empty to clear all filters.
- β (green) - Ready to work on
- β (yellow) - Blocked by dependencies
- β (blue) - In progress
- Β· (gray) - Closed
[P0]- Critical (red)[P1]- High (orange)[P2]- Normal (light blue)[P3]- Low (gray)[P4]- Lowest (gray)
- π - Bug
- β¨ - Feature
- π - Task
- π― - Epic
- π§ - Chore
beads-tui/
βββ cmd/beads-tui/ # Main application and dialog components
β βββ main.go # TUI app, layout, keybindings, event loop
β βββ dialogs.go # Modal dialogs for create/edit/dependencies/labels
βββ internal/
β βββ app/ # Application context and initialization
β βββ formatting/ # Color schemes, status formatting, detail rendering
β βββ parser/ # JSONL parser for beads issues (legacy support)
β βββ state/ # Issue categorization and filtering logic
β βββ storage/ # SQLite database reader (primary data source)
β βββ ui/ # UI components and rendering helpers
β βββ watcher/ # Filesystem monitoring with debouncing
βββ beads/ # Vendored beads project (full)
βββ go.mod
- tview - Terminal UI framework
- tcell - Low-level terminal control
- fsnotify - Filesystem monitoring
- go-sqlite3 - SQLite database driver
- clipboard - Cross-platform clipboard access
The TUI reads directly from the SQLite database (.beads/beads.db). If no issues appear:
-
Check database exists:
ls -la .beads/beads.db
-
Verify issues exist:
bd list
-
Force a refresh:
- Press
rin the TUI for manual refresh - Check debug logs with
--debugflag
- Press
The TUI watches the SQLite database file for changes. Updates should appear within ~200ms.
If updates don't appear:
- Check file watcher is running (no errors on startup)
- Force manual refresh with
rkey - Run with
--debugto check watcher events
Ensure you're in a directory with a .beads folder:
bd init --quiet # Initialize beads if neededThe TUI uses built-in text areas for editing. Press e to open the edit dialog with fields for title, description, design, acceptance criteria, and notes.
Note: External
$EDITORintegration is planned but not yet implemented. Seetui-qxy.1in the issue tracker.
This project uses beads for its own issue tracking (dogfooding). View current work:
bd ready # Show ready issues
bd list # Show all issues
bd dep tree # Show dependency tree
bd show tui-xyz # Show issue details
bd comments tui-xyz # Show issue comments (separate from bd show!)IMPORTANT: bd show does NOT include comments. Always run bd comments separately when examining an issue.
go test ./... # All tests
go test -coverprofile=coverage.out ./... # With coverage
go tool cover -html=coverage.out # View coverage report# Build
go build -o beads-tui ./cmd/beads-tui
# Run with debug logging
./beads-tui --debug
# Create new issue
bd create "Issue title" -p 1 -t feature
# Update issue
bd update tui-xyz --status in_progress
# Add comment
bd comment tui-xyz "Your comment text"Startup:
- Find
.beadsdirectory (current dir or walk up parent dirs) - Open SQLite database at
.beads/beads.db - Load issues and categorize (ready/blocked/in-progress/closed)
- Build tview UI with populated lists
- Start fsnotify watcher on database file
- Display TUI
Live updates:
- User runs
bdcommand (e.g.,bd create,bd update) - bd writes to SQLite database
- fsnotify detects database write
- Watcher debounces (200ms) and triggers refresh
- Re-query database, update state, redraw UI
- TUI updates automatically
Issue categorization:
- Ready: Open issues with no open blocking dependencies
- Blocked: Open issues with unresolved blocking dependencies OR status="blocked"
- In Progress: Issues with status="in_progress"
- Closed: Issues with status="closed" (hidden by default, toggle with C)
cmd/beads-tui/ - Main application
main.go: TUI layout, keybindings, event loop, issue list renderingdialogs.go: Modal dialogs for create/edit/dependencies/labels/help
internal/app/ - Application context
- Initialization and application-wide state
internal/formatting/ - Presentation logic
- Color schemes for priority/status/type
- Detail panel formatting
- Status icon and emoji rendering
internal/parser/ - JSONL parsing (legacy)
- Domain types matching beads schema
- Line-by-line JSONL reader (kept for backward compatibility)
internal/state/ - Business logic
- Issue categorization (ready/blocked/in-progress/closed)
- Dependency graph building
- Filter and search logic
- Tree view structure building
internal/storage/ - Data access
- SQLite database reading (primary data source)
- Query construction for issues, dependencies, comments
internal/ui/ - UI helpers
- Component builders
- Rendering utilities
internal/watcher/ - File monitoring
- fsnotify wrapper with 200ms debouncing
- Triggers refresh callback on database writes
This TUI provides full CRUD operations for beads issues. All modifications use the bd command under the hood:
# All these work from within the TUI via dialogs/keybindings
bd create "New issue" -p 1
bd update bd-a1b2 --status in_progress
bd comment bd-a1b2 "Added comment"
bd dep add bd-a1b2 bd-xyz3 --type blocks
bd label bd-a1b2 urgent
bd close bd-a1b2
# Changes appear in TUI within ~200msThe TUI is both a viewer and a full-featured editor for beads issues.
MIT