@citadel-labs/beads-ui 2.0.0 → 2.0.2

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.
Files changed (35) hide show
  1. package/.claude/worktrees/agent-a6ab297c/LICENSE +21 -0
  2. package/.claude/worktrees/agent-a6ab297c/README.md +71 -0
  3. package/.claude/worktrees/agent-a6ab297c/bin/beads-board.js +183 -0
  4. package/.claude/worktrees/agent-a6ab297c/package.json +16 -0
  5. package/.claude/worktrees/agent-a6ab297c/server/dist/assets/index-B8Dp1QU-.js +53 -0
  6. package/.claude/worktrees/agent-a6ab297c/server/dist/assets/index-Cx3XpFYM.css +1 -0
  7. package/.claude/worktrees/agent-a6ab297c/server/dist/index.html +14 -0
  8. package/.claude/worktrees/agent-a6ab297c/server/dist/vite.svg +1 -0
  9. package/.claude/worktrees/agent-a6ab297c/server/index.js +242 -0
  10. package/.claude/worktrees/agent-a8b08b0a/LICENSE +21 -0
  11. package/.claude/worktrees/agent-a8b08b0a/README.md +71 -0
  12. package/.claude/worktrees/agent-a8b08b0a/bin/beads-board.js +183 -0
  13. package/.claude/worktrees/agent-a8b08b0a/package.json +16 -0
  14. package/.claude/worktrees/agent-a8b08b0a/server/dist/assets/index-CidSj3mC.css +1 -0
  15. package/.claude/worktrees/agent-a8b08b0a/server/dist/assets/index-tKlN_npR.js +53 -0
  16. package/.claude/worktrees/agent-a8b08b0a/server/dist/index.html +14 -0
  17. package/.claude/worktrees/agent-a8b08b0a/server/dist/vite.svg +1 -0
  18. package/.claude/worktrees/agent-a8b08b0a/server/index.js +242 -0
  19. package/bin/beads-board.js +1 -0
  20. package/package.json +1 -1
  21. package/screenshot-badge-error.png +0 -0
  22. package/screenshot-card-modal.png +0 -0
  23. package/screenshot-collapsed.png +0 -0
  24. package/screenshot-collapsed2.png +0 -0
  25. package/screenshot-hover-commit.png +0 -0
  26. package/screenshot-modal-from-badge.png +0 -0
  27. package/screenshot-overview.png +0 -0
  28. package/screenshot-polished-modal.png +0 -0
  29. package/screenshot-tooltip-hover.png +0 -0
  30. package/server/dist/assets/index-BaFX4Ey_.css +1 -0
  31. package/server/dist/assets/index-CkFv0lE0.js +57 -0
  32. package/server/dist/index.html +2 -2
  33. package/server/index.js +19 -8
  34. package/server/dist/assets/index-C62XoEh1.js +0 -49
  35. package/server/dist/assets/index-DXoLXViw.css +0 -1
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Stuart Rimel
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.
@@ -0,0 +1,71 @@
1
+ # beads-board
2
+
3
+ A minimal kanban dashboard and git log viewer for [Beads](https://github.com/steveyegge/beads). Works standalone as a CLI tool or as a Claude Code plugin.
4
+
5
+ ## Features
6
+
7
+ - **Kanban board** — Issues organized by status: Ready, In Progress, Blocked, Done
8
+ - **Git log** — Scrollable commit history with branch selector
9
+ - **Bead ID linking** — Bead IDs in commit messages are highlighted as badges
10
+ - **Dark/light theme** — Toggle between themes, dark by default
11
+ - **Auto-refresh** — Polls for updates every 5 seconds
12
+ - **Zero runtime dependencies** — Server uses only Node.js stdlib
13
+
14
+ ## Quick Start
15
+
16
+ ### Standalone CLI (works with any editor)
17
+
18
+ ```bash
19
+ # Install globally
20
+ npm install -g @citadel-labs/beads-ui
21
+
22
+ # Or run directly with npx (installs temporarily)
23
+ npx @citadel-labs/beads-ui
24
+ ```
25
+
26
+ Then from any project that uses [Beads](https://github.com/steveyegge/beads):
27
+
28
+ ```bash
29
+ cd /path/to/your/project
30
+ bdui # Start dashboard in background, prints URL
31
+ bdui /path/to/project # Specify a project directory
32
+ bdui --port 9000 # Custom port
33
+ bdui status # Check if dashboard is running
34
+ bdui stop # Stop the dashboard
35
+ ```
36
+
37
+ The server starts in the background and returns control to your terminal. Open the printed URL (default **http://localhost:8377**) in your browser. Port auto-increments if taken.
38
+
39
+ ### As a Claude Code Plugin
40
+
41
+ ```bash
42
+ # Install from local directory
43
+ claude --plugin-dir /path/to/beads-board
44
+
45
+ # Then in any project with .beads/
46
+ /beads-board:start # Start the dashboard server
47
+ /beads-board:stop # Stop it
48
+ ```
49
+
50
+ The plugin auto-detects `.beads/` in your project. If your project doesn't use Beads, it will let you know.
51
+
52
+ ## How It Works
53
+
54
+ The server shells out to `bd` and `git` CLI commands to fetch data, then serves a React dashboard that polls the API every 5 seconds. No direct database access — all data flows through the Beads CLI.
55
+
56
+ ```
57
+ Browser → GET /api/* → Node.js server → bd/git CLI → JSON response
58
+ ← React app ← server/dist/
59
+ ```
60
+
61
+ See [docs/architecture.md](docs/architecture.md) for details.
62
+
63
+ ## Documentation
64
+
65
+ - [Architecture](docs/architecture.md) — How the server, UI, and plugin fit together
66
+ - [API Reference](docs/api.md) — All API endpoints with examples
67
+ - [Contributing](docs/contributing.md) — How to set up a dev environment and make changes
68
+
69
+ ## License
70
+
71
+ [MIT](LICENSE)
@@ -0,0 +1,183 @@
1
+ #!/usr/bin/env node
2
+
3
+ const path = require('node:path');
4
+ const fs = require('node:fs');
5
+ const { spawn } = require('node:child_process');
6
+
7
+ const SERVER_SCRIPT = path.join(__dirname, '..', 'server', 'index.js');
8
+
9
+ // ---------------------------------------------------------------------------
10
+ // Argument parsing
11
+ // ---------------------------------------------------------------------------
12
+
13
+ const rawArgs = process.argv.slice(2);
14
+
15
+ // Extract subcommand (start, stop, status) — default to "start"
16
+ const SUBCOMMANDS = ['start', 'stop', 'status'];
17
+ let subcommand = 'start';
18
+ const args = [];
19
+ for (const arg of rawArgs) {
20
+ if (SUBCOMMANDS.includes(arg) && args.length === 0 && subcommand === 'start') {
21
+ subcommand = arg;
22
+ } else {
23
+ args.push(arg);
24
+ }
25
+ }
26
+
27
+ // --help
28
+ if (args.includes('--help') || args.includes('-h')) {
29
+ console.log(`bdui — Kanban dashboard and git log viewer for Beads
30
+
31
+ Usage:
32
+ bdui [project-dir] [options] Start the dashboard (default)
33
+ bdui start [project-dir] [options] Start the dashboard
34
+ bdui stop [project-dir] Stop a running dashboard
35
+ bdui status [project-dir] Show running dashboard info
36
+
37
+ Options:
38
+ --port <port> Port to listen on (default: 8377)
39
+ --foreground Run in foreground (don't daemonize)
40
+ --help, -h Show this help message
41
+ --version, -v Show version number
42
+
43
+ Examples:
44
+ bdui # Start dashboard for current directory
45
+ bdui /path/to/project # Specify project directory
46
+ bdui --port 9000 # Custom port
47
+ bdui stop # Stop the running dashboard
48
+ bdui status # Check if dashboard is running`);
49
+ process.exit(0);
50
+ }
51
+
52
+ // --version
53
+ if (args.includes('--version') || args.includes('-v')) {
54
+ const pkg = JSON.parse(fs.readFileSync(path.join(__dirname, '..', 'package.json'), 'utf8'));
55
+ console.log(pkg.version);
56
+ process.exit(0);
57
+ }
58
+
59
+ // --foreground
60
+ const foreground = args.includes('--foreground');
61
+ const filteredArgs = args.filter(a => a !== '--foreground');
62
+
63
+ // --port
64
+ let customPort = null;
65
+ const portIdx = filteredArgs.indexOf('--port');
66
+ if (portIdx !== -1) {
67
+ customPort = filteredArgs[portIdx + 1];
68
+ if (!customPort || isNaN(parseInt(customPort, 10))) {
69
+ console.error('Error: --port requires a numeric value');
70
+ process.exit(1);
71
+ }
72
+ filteredArgs.splice(portIdx, 2);
73
+ }
74
+
75
+ // Remaining arg is the project directory
76
+ const projectDir = filteredArgs[0] ? path.resolve(filteredArgs[0]) : process.cwd();
77
+
78
+ // ---------------------------------------------------------------------------
79
+ // Validation
80
+ // ---------------------------------------------------------------------------
81
+
82
+ if (!fs.existsSync(projectDir)) {
83
+ console.error(`Error: directory not found: ${projectDir}`);
84
+ process.exit(1);
85
+ }
86
+
87
+ if (!fs.existsSync(path.join(projectDir, '.beads'))) {
88
+ console.error(`Error: no .beads/ directory found in ${projectDir}`);
89
+ console.error('This project does not appear to use Beads issue tracking.');
90
+ console.error('See https://github.com/steveyegge/beads to get started.');
91
+ process.exit(1);
92
+ }
93
+
94
+ // ---------------------------------------------------------------------------
95
+ // Pidfile helpers
96
+ // ---------------------------------------------------------------------------
97
+
98
+ const PIDFILE = path.join(projectDir, '.beads-board.pid');
99
+
100
+ function getRunningInstance() {
101
+ try {
102
+ const data = JSON.parse(fs.readFileSync(PIDFILE, 'utf8'));
103
+ process.kill(data.pid, 0); // throws if not running
104
+ return data;
105
+ } catch {
106
+ // Clean up stale pidfile
107
+ try { fs.unlinkSync(PIDFILE); } catch {}
108
+ return null;
109
+ }
110
+ }
111
+
112
+ // ---------------------------------------------------------------------------
113
+ // Subcommands
114
+ // ---------------------------------------------------------------------------
115
+
116
+ if (subcommand === 'status') {
117
+ const instance = getRunningInstance();
118
+ if (instance) {
119
+ console.log(`beads-board running at http://localhost:${instance.port} (pid ${instance.pid})`);
120
+ } else {
121
+ console.log('beads-board is not running');
122
+ process.exit(1);
123
+ }
124
+ process.exit(0);
125
+ }
126
+
127
+ if (subcommand === 'stop') {
128
+ const instance = getRunningInstance();
129
+ if (!instance) {
130
+ console.log('beads-board is not running');
131
+ process.exit(0);
132
+ }
133
+ try {
134
+ process.kill(instance.pid, 'SIGTERM');
135
+ console.log(`beads-board stopped (was http://localhost:${instance.port}, pid ${instance.pid})`);
136
+ } catch (err) {
137
+ console.error(`Failed to stop beads-board (pid ${instance.pid}): ${err.message}`);
138
+ process.exit(1);
139
+ }
140
+ process.exit(0);
141
+ }
142
+
143
+ // subcommand === 'start'
144
+ const existing = getRunningInstance();
145
+ if (existing) {
146
+ console.log(`beads-board already running at http://localhost:${existing.port} (pid ${existing.pid})`);
147
+ process.exit(0);
148
+ }
149
+
150
+ if (foreground) {
151
+ // Run server in foreground (debugging)
152
+ if (customPort) process.env.PORT = customPort;
153
+ process.argv = [process.argv[0], __filename, projectDir];
154
+ require(SERVER_SCRIPT);
155
+ } else {
156
+ // Spawn detached server process
157
+ const env = { ...process.env };
158
+ if (customPort) env.PORT = customPort;
159
+
160
+ const child = spawn(process.execPath, [SERVER_SCRIPT, projectDir], {
161
+ detached: true,
162
+ stdio: 'ignore',
163
+ env,
164
+ windowsHide: true,
165
+ });
166
+ child.unref();
167
+
168
+ // Wait for pidfile to confirm startup (poll up to 3s)
169
+ const start = Date.now();
170
+ const poll = setInterval(() => {
171
+ const instance = getRunningInstance();
172
+ if (instance) {
173
+ clearInterval(poll);
174
+ console.log(`beads-board running at http://localhost:${instance.port}`);
175
+ process.exit(0);
176
+ }
177
+ if (Date.now() - start > 3000) {
178
+ clearInterval(poll);
179
+ console.error('Error: server failed to start within 3 seconds');
180
+ process.exit(1);
181
+ }
182
+ }, 100);
183
+ }
@@ -0,0 +1,16 @@
1
+ {
2
+ "name": "@citadel-labs/beads-ui",
3
+ "version": "2.0.1",
4
+ "description": "Kanban dashboard and git log viewer for Beads",
5
+ "bin": {
6
+ "bdui": "bin/beads-board.js"
7
+ },
8
+ "scripts": {
9
+ "build": "cd ui && npm run build",
10
+ "start": "node server/index.js",
11
+ "publish:patch": "npm version patch && git push && git push --tags && npm publish --access public",
12
+ "publish:minor": "npm version minor && git push && git push --tags && npm publish --access public",
13
+ "publish:major": "npm version major && git push && git push --tags && npm publish --access public"
14
+ },
15
+ "license": "MIT"
16
+ }