bumblebee-cli 0.1.0 → 0.2.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/README.md +49 -47
- package/bin/bb.mjs +132 -102
- package/package.json +28 -28
- package/python/bb_cli/__main__.py +3 -0
- package/python/bb_cli/api_client.py +7 -0
- package/python/bb_cli/commands/agent.py +2287 -1030
- package/python/bb_cli/commands/auth.py +79 -79
- package/python/bb_cli/commands/board.py +47 -47
- package/python/bb_cli/commands/comment.py +34 -34
- package/python/bb_cli/commands/daemon.py +153 -0
- package/python/bb_cli/commands/init.py +83 -62
- package/python/bb_cli/commands/item.py +192 -192
- package/python/bb_cli/commands/project.py +175 -111
- package/python/bb_cli/config.py +136 -136
- package/python/bb_cli/main.py +44 -44
- package/python/bb_cli/progress.py +117 -0
- package/python/bb_cli/streaming.py +168 -0
- package/python/pyproject.toml +1 -1
- package/python/{bb_cli/bumblebee_cli.egg-info/requires.txt → requirements.txt} +4 -4
- package/scripts/build.sh +20 -20
- package/scripts/postinstall.mjs +146 -121
- package/python/bb_cli/bumblebee_cli.egg-info/PKG-INFO +0 -9
- package/python/bb_cli/bumblebee_cli.egg-info/SOURCES.txt +0 -21
- package/python/bb_cli/bumblebee_cli.egg-info/dependency_links.txt +0 -1
- package/python/bb_cli/bumblebee_cli.egg-info/entry_points.txt +0 -2
- package/python/bb_cli/bumblebee_cli.egg-info/top_level.txt +0 -5
- package/python/bb_cli/commands/__pycache__/__init__.cpython-313.pyc +0 -0
- package/python/bb_cli/commands/__pycache__/agent.cpython-313.pyc +0 -0
- package/python/bb_cli/commands/__pycache__/auth.cpython-313.pyc +0 -0
- package/python/bb_cli/commands/__pycache__/board.cpython-313.pyc +0 -0
- package/python/bb_cli/commands/__pycache__/comment.cpython-313.pyc +0 -0
- package/python/bb_cli/commands/__pycache__/init.cpython-313.pyc +0 -0
- package/python/bb_cli/commands/__pycache__/item.cpython-313.pyc +0 -0
- package/python/bb_cli/commands/__pycache__/label.cpython-313.pyc +0 -0
- package/python/bb_cli/commands/__pycache__/project.cpython-313.pyc +0 -0
- package/python/bb_cli/commands/__pycache__/sprint.cpython-313.pyc +0 -0
- package/python/bb_cli/commands/__pycache__/story.cpython-313.pyc +0 -0
- package/python/bb_cli/commands/__pycache__/task.cpython-313.pyc +0 -0
package/README.md
CHANGED
|
@@ -1,47 +1,49 @@
|
|
|
1
|
-
# bumblebee-cli
|
|
2
|
-
|
|
3
|
-
npm wrapper for the Bumblebee CLI — dev task management + Claude Code automation.
|
|
4
|
-
|
|
5
|
-
## Install
|
|
6
|
-
|
|
7
|
-
```bash
|
|
8
|
-
npm install -g bumblebee-cli
|
|
9
|
-
```
|
|
10
|
-
|
|
11
|
-
**Requires Python 3.12+**. The postinstall script will automatically set up a Python virtual environment if `bb` is not already installed.
|
|
12
|
-
|
|
13
|
-
## Usage
|
|
14
|
-
|
|
15
|
-
```bash
|
|
16
|
-
bb --help
|
|
17
|
-
bb login
|
|
18
|
-
bb item list
|
|
19
|
-
bb agent suggest BB-42
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
```
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
1
|
+
# bumblebee-cli
|
|
2
|
+
|
|
3
|
+
npm wrapper for the Bumblebee CLI — dev task management + Claude Code automation.
|
|
4
|
+
|
|
5
|
+
## Install
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
npm install -g bumblebee-cli
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
**Requires Python 3.12+**. The postinstall script will automatically set up a Python virtual environment if `bb` is not already installed.
|
|
12
|
+
|
|
13
|
+
## Usage
|
|
14
|
+
|
|
15
|
+
```bash
|
|
16
|
+
bb --help
|
|
17
|
+
bb login
|
|
18
|
+
bb item list
|
|
19
|
+
bb agent suggest BB-42
|
|
20
|
+
bb agent run BB-42 # Full cycle: verify → execute → test → merge
|
|
21
|
+
bb agent daemon start # Long-running daemon for web-initiated sessions
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
## How it works
|
|
25
|
+
|
|
26
|
+
This is a thin Node.js wrapper around the Python CLI. It resolves `bb` in this order:
|
|
27
|
+
|
|
28
|
+
1. System `bb` on PATH (if you installed via `pip install bumblebee-cli`)
|
|
29
|
+
2. Local `.venv` created by the npm postinstall script
|
|
30
|
+
3. `python -m bb_cli` as a fallback
|
|
31
|
+
|
|
32
|
+
## Manual Python install
|
|
33
|
+
|
|
34
|
+
If the automatic setup doesn't work, install the Python CLI directly:
|
|
35
|
+
|
|
36
|
+
```bash
|
|
37
|
+
pip install bumblebee-cli
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
## Project-local config
|
|
41
|
+
|
|
42
|
+
Initialize a project-local config:
|
|
43
|
+
|
|
44
|
+
```bash
|
|
45
|
+
cd your-project
|
|
46
|
+
bb init --project my-app
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
This creates `.bumblebee/config.toml` which overrides `~/.bumblebee/config.toml` settings (except credentials).
|
package/bin/bb.mjs
CHANGED
|
@@ -1,102 +1,132 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
|
|
3
|
-
import { execFileSync, execSync } from "node:child_process";
|
|
4
|
-
import { existsSync } from "node:fs";
|
|
5
|
-
import { dirname, join } from "node:path";
|
|
6
|
-
import { fileURLToPath } from "node:url";
|
|
7
|
-
|
|
8
|
-
const __dirname = dirname(fileURLToPath(import.meta.url));
|
|
9
|
-
const pkgRoot = join(__dirname, "..");
|
|
10
|
-
const args = process.argv.slice(2);
|
|
11
|
-
|
|
12
|
-
/**
|
|
13
|
-
* Thin Node.js wrapper for the Bumblebee Python CLI.
|
|
14
|
-
*
|
|
15
|
-
* Resolution order:
|
|
16
|
-
* 1. `bb` already on PATH (user installed via pip)
|
|
17
|
-
* 2. Local .venv created by postinstall
|
|
18
|
-
* 3. `python -m bb_cli` (fallback)
|
|
19
|
-
*/
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
const
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
);
|
|
102
|
-
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
import { execFileSync, execSync } from "node:child_process";
|
|
4
|
+
import { existsSync, readFileSync } from "node:fs";
|
|
5
|
+
import { dirname, join, resolve } from "node:path";
|
|
6
|
+
import { fileURLToPath } from "node:url";
|
|
7
|
+
|
|
8
|
+
const __dirname = dirname(fileURLToPath(import.meta.url));
|
|
9
|
+
const pkgRoot = join(__dirname, "..");
|
|
10
|
+
const args = process.argv.slice(2);
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* Thin Node.js wrapper for the Bumblebee Python CLI.
|
|
14
|
+
*
|
|
15
|
+
* Resolution order:
|
|
16
|
+
* 1. `bb` already on PATH (user installed via pip — not our own npm wrapper)
|
|
17
|
+
* 2. Local .venv created by postinstall
|
|
18
|
+
* 3. `python -m bb_cli` (fallback)
|
|
19
|
+
*/
|
|
20
|
+
|
|
21
|
+
function getNpmGlobalPrefix() {
|
|
22
|
+
try {
|
|
23
|
+
return execSync("npm prefix -g", { encoding: "utf8", stdio: "pipe" }).trim();
|
|
24
|
+
} catch {
|
|
25
|
+
return null;
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
function isOurOwnWrapper(bbPath) {
|
|
30
|
+
// Check if the found bb is inside our npm package or the npm global bin
|
|
31
|
+
const normalized = resolve(bbPath).toLowerCase();
|
|
32
|
+
if (normalized.includes("node_modules") && normalized.includes("bumblebee-cli")) {
|
|
33
|
+
return true;
|
|
34
|
+
}
|
|
35
|
+
// On Windows/Linux, npm global installs create shims in the npm prefix dir
|
|
36
|
+
const npmPrefix = getNpmGlobalPrefix();
|
|
37
|
+
if (npmPrefix && normalized.startsWith(resolve(npmPrefix).toLowerCase())) {
|
|
38
|
+
return true;
|
|
39
|
+
}
|
|
40
|
+
return false;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
// 1. Check if `bb` is already available on PATH (pip install)
|
|
44
|
+
function trySystemBb() {
|
|
45
|
+
try {
|
|
46
|
+
const which = process.platform === "win32" ? "where" : "which";
|
|
47
|
+
const result = execSync(`${which} bb`, { stdio: "pipe", encoding: "utf8" });
|
|
48
|
+
// On Windows, `where` may return multiple lines; check each
|
|
49
|
+
const paths = result.trim().split(/\r?\n/);
|
|
50
|
+
for (const bbPath of paths) {
|
|
51
|
+
const p = bbPath.trim();
|
|
52
|
+
if (p && !isOurOwnWrapper(p)) {
|
|
53
|
+
return p;
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
} catch {
|
|
57
|
+
// not found
|
|
58
|
+
}
|
|
59
|
+
return null;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
// 2. Check local .venv
|
|
63
|
+
function tryLocalVenv() {
|
|
64
|
+
const isWin = process.platform === "win32";
|
|
65
|
+
const venvBb = isWin
|
|
66
|
+
? join(pkgRoot, ".venv", "Scripts", "bb.exe")
|
|
67
|
+
: join(pkgRoot, ".venv", "bin", "bb");
|
|
68
|
+
if (existsSync(venvBb)) {
|
|
69
|
+
return venvBb;
|
|
70
|
+
}
|
|
71
|
+
return null;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
// 3. Fallback to python -m bb_cli
|
|
75
|
+
function tryPythonModule() {
|
|
76
|
+
const pythonCmds =
|
|
77
|
+
process.platform === "win32" ? ["python", "python3"] : ["python3", "python"];
|
|
78
|
+
for (const py of pythonCmds) {
|
|
79
|
+
try {
|
|
80
|
+
execSync(`${py} -c "import bb_cli"`, { stdio: "pipe" });
|
|
81
|
+
return { python: py, module: true };
|
|
82
|
+
} catch {
|
|
83
|
+
// try next
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
return null;
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
// --- Main ---
|
|
90
|
+
|
|
91
|
+
const systemBb = trySystemBb();
|
|
92
|
+
if (systemBb) {
|
|
93
|
+
try {
|
|
94
|
+
execFileSync(systemBb, args, { stdio: "inherit" });
|
|
95
|
+
process.exit(0);
|
|
96
|
+
} catch (e) {
|
|
97
|
+
process.exit(e.status ?? 1);
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
const venvBb = tryLocalVenv();
|
|
102
|
+
if (venvBb) {
|
|
103
|
+
try {
|
|
104
|
+
execFileSync(venvBb, args, { stdio: "inherit" });
|
|
105
|
+
process.exit(0);
|
|
106
|
+
} catch (e) {
|
|
107
|
+
process.exit(e.status ?? 1);
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
const pyFallback = tryPythonModule();
|
|
112
|
+
if (pyFallback) {
|
|
113
|
+
try {
|
|
114
|
+
execFileSync(pyFallback.python, ["-m", "bb_cli", ...args], {
|
|
115
|
+
stdio: "inherit",
|
|
116
|
+
});
|
|
117
|
+
process.exit(0);
|
|
118
|
+
} catch (e) {
|
|
119
|
+
process.exit(e.status ?? 1);
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
console.error(
|
|
124
|
+
"Error: Could not find the Bumblebee Python CLI.\n" +
|
|
125
|
+
"\n" +
|
|
126
|
+
"The npm package needs the Python CLI installed. Fix with ONE of:\n" +
|
|
127
|
+
" 1. pip install bumblebee-cli (install globally)\n" +
|
|
128
|
+
" 2. npm rebuild bumblebee-cli (retry postinstall setup)\n" +
|
|
129
|
+
"\n" +
|
|
130
|
+
"Requires Python 3.12+ — https://python.org"
|
|
131
|
+
);
|
|
132
|
+
process.exit(1);
|
package/package.json
CHANGED
|
@@ -1,28 +1,28 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "bumblebee-cli",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"description": "Bumblebee CLI — Dev task management + Claude Code automation",
|
|
5
|
-
"license": "MIT",
|
|
6
|
-
"bin": {
|
|
7
|
-
"bb": "./bin/bb.mjs"
|
|
8
|
-
},
|
|
9
|
-
"scripts": {
|
|
10
|
-
"postinstall": "node ./scripts/postinstall.mjs"
|
|
11
|
-
},
|
|
12
|
-
"files": [
|
|
13
|
-
"bin/",
|
|
14
|
-
"scripts/",
|
|
15
|
-
"python/"
|
|
16
|
-
],
|
|
17
|
-
"engines": {
|
|
18
|
-
"node": ">=18"
|
|
19
|
-
},
|
|
20
|
-
"keywords": [
|
|
21
|
-
"bumblebee",
|
|
22
|
-
"cli",
|
|
23
|
-
"task-management",
|
|
24
|
-
"claude",
|
|
25
|
-
"ai",
|
|
26
|
-
"automation"
|
|
27
|
-
]
|
|
28
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "bumblebee-cli",
|
|
3
|
+
"version": "0.2.0",
|
|
4
|
+
"description": "Bumblebee CLI — Dev task management + Claude Code automation",
|
|
5
|
+
"license": "MIT",
|
|
6
|
+
"bin": {
|
|
7
|
+
"bb": "./bin/bb.mjs"
|
|
8
|
+
},
|
|
9
|
+
"scripts": {
|
|
10
|
+
"postinstall": "node ./scripts/postinstall.mjs"
|
|
11
|
+
},
|
|
12
|
+
"files": [
|
|
13
|
+
"bin/",
|
|
14
|
+
"scripts/",
|
|
15
|
+
"python/"
|
|
16
|
+
],
|
|
17
|
+
"engines": {
|
|
18
|
+
"node": ">=18"
|
|
19
|
+
},
|
|
20
|
+
"keywords": [
|
|
21
|
+
"bumblebee",
|
|
22
|
+
"cli",
|
|
23
|
+
"task-management",
|
|
24
|
+
"claude",
|
|
25
|
+
"ai",
|
|
26
|
+
"automation"
|
|
27
|
+
]
|
|
28
|
+
}
|
|
@@ -32,6 +32,13 @@ def api_put(path: str, json: dict) -> dict:
|
|
|
32
32
|
return resp.json()
|
|
33
33
|
|
|
34
34
|
|
|
35
|
+
def api_patch(path: str, json: dict) -> dict:
|
|
36
|
+
with get_client() as client:
|
|
37
|
+
resp = client.patch(path, json=json)
|
|
38
|
+
resp.raise_for_status()
|
|
39
|
+
return resp.json()
|
|
40
|
+
|
|
41
|
+
|
|
35
42
|
def api_delete(path: str):
|
|
36
43
|
with get_client() as client:
|
|
37
44
|
resp = client.delete(path)
|