bumblebee-cli 0.1.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.
Files changed (38) hide show
  1. package/README.md +47 -0
  2. package/bin/bb.mjs +102 -0
  3. package/package.json +28 -0
  4. package/python/bb_cli/__init__.py +0 -0
  5. package/python/bb_cli/api_client.py +38 -0
  6. package/python/bb_cli/bumblebee_cli.egg-info/PKG-INFO +9 -0
  7. package/python/bb_cli/bumblebee_cli.egg-info/SOURCES.txt +21 -0
  8. package/python/bb_cli/bumblebee_cli.egg-info/dependency_links.txt +1 -0
  9. package/python/bb_cli/bumblebee_cli.egg-info/entry_points.txt +2 -0
  10. package/python/bb_cli/bumblebee_cli.egg-info/requires.txt +4 -0
  11. package/python/bb_cli/bumblebee_cli.egg-info/top_level.txt +5 -0
  12. package/python/bb_cli/commands/__init__.py +0 -0
  13. package/python/bb_cli/commands/__pycache__/__init__.cpython-313.pyc +0 -0
  14. package/python/bb_cli/commands/__pycache__/agent.cpython-313.pyc +0 -0
  15. package/python/bb_cli/commands/__pycache__/auth.cpython-313.pyc +0 -0
  16. package/python/bb_cli/commands/__pycache__/board.cpython-313.pyc +0 -0
  17. package/python/bb_cli/commands/__pycache__/comment.cpython-313.pyc +0 -0
  18. package/python/bb_cli/commands/__pycache__/init.cpython-313.pyc +0 -0
  19. package/python/bb_cli/commands/__pycache__/item.cpython-313.pyc +0 -0
  20. package/python/bb_cli/commands/__pycache__/label.cpython-313.pyc +0 -0
  21. package/python/bb_cli/commands/__pycache__/project.cpython-313.pyc +0 -0
  22. package/python/bb_cli/commands/__pycache__/sprint.cpython-313.pyc +0 -0
  23. package/python/bb_cli/commands/__pycache__/story.cpython-313.pyc +0 -0
  24. package/python/bb_cli/commands/__pycache__/task.cpython-313.pyc +0 -0
  25. package/python/bb_cli/commands/agent.py +1030 -0
  26. package/python/bb_cli/commands/auth.py +79 -0
  27. package/python/bb_cli/commands/board.py +47 -0
  28. package/python/bb_cli/commands/comment.py +34 -0
  29. package/python/bb_cli/commands/init.py +62 -0
  30. package/python/bb_cli/commands/item.py +192 -0
  31. package/python/bb_cli/commands/label.py +43 -0
  32. package/python/bb_cli/commands/project.py +111 -0
  33. package/python/bb_cli/commands/sprint.py +84 -0
  34. package/python/bb_cli/config.py +136 -0
  35. package/python/bb_cli/main.py +44 -0
  36. package/python/pyproject.toml +18 -0
  37. package/scripts/build.sh +20 -0
  38. package/scripts/postinstall.mjs +121 -0
package/README.md ADDED
@@ -0,0 +1,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
+ ```
21
+
22
+ ## How it works
23
+
24
+ This is a thin Node.js wrapper around the Python CLI. It resolves `bb` in this order:
25
+
26
+ 1. System `bb` on PATH (if you installed via `pip install bumblebee-cli`)
27
+ 2. Local `.venv` created by the npm postinstall script
28
+ 3. `python -m bb_cli` as a fallback
29
+
30
+ ## Manual Python install
31
+
32
+ If the automatic setup doesn't work, install the Python CLI directly:
33
+
34
+ ```bash
35
+ pip install bumblebee-cli
36
+ ```
37
+
38
+ ## Project-local config
39
+
40
+ Initialize a project-local config:
41
+
42
+ ```bash
43
+ cd your-project
44
+ bb init --project my-app
45
+ ```
46
+
47
+ This creates `.bumblebee/config.toml` which overrides `~/.bumblebee/config.toml` settings (except credentials).
package/bin/bb.mjs ADDED
@@ -0,0 +1,102 @@
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
+ // 1. Check if `bb` is already available on PATH (pip install)
22
+ function trySystemBb() {
23
+ try {
24
+ const which = process.platform === "win32" ? "where" : "which";
25
+ const result = execSync(`${which} bb`, { stdio: "pipe", encoding: "utf8" });
26
+ const bbPath = result.trim().split("\n")[0];
27
+ // Make sure it's not pointing back to ourselves
28
+ if (bbPath && !bbPath.includes("npm-cli")) {
29
+ return bbPath;
30
+ }
31
+ } catch {
32
+ // not found
33
+ }
34
+ return null;
35
+ }
36
+
37
+ // 2. Check local .venv
38
+ function tryLocalVenv() {
39
+ const isWin = process.platform === "win32";
40
+ const venvBb = isWin
41
+ ? join(pkgRoot, ".venv", "Scripts", "bb.exe")
42
+ : join(pkgRoot, ".venv", "bin", "bb");
43
+ if (existsSync(venvBb)) {
44
+ return venvBb;
45
+ }
46
+ return null;
47
+ }
48
+
49
+ // 3. Fallback to python -m bb_cli
50
+ function tryPythonModule() {
51
+ const pythonCmds = ["python3", "python"];
52
+ for (const py of pythonCmds) {
53
+ try {
54
+ execSync(`${py} --version`, { stdio: "pipe" });
55
+ return { python: py, module: true };
56
+ } catch {
57
+ // try next
58
+ }
59
+ }
60
+ return null;
61
+ }
62
+
63
+ // --- Main ---
64
+
65
+ const systemBb = trySystemBb();
66
+ if (systemBb) {
67
+ try {
68
+ execFileSync(systemBb, args, { stdio: "inherit" });
69
+ process.exit(0);
70
+ } catch (e) {
71
+ process.exit(e.status ?? 1);
72
+ }
73
+ }
74
+
75
+ const venvBb = tryLocalVenv();
76
+ if (venvBb) {
77
+ try {
78
+ execFileSync(venvBb, args, { stdio: "inherit" });
79
+ process.exit(0);
80
+ } catch (e) {
81
+ process.exit(e.status ?? 1);
82
+ }
83
+ }
84
+
85
+ const pyFallback = tryPythonModule();
86
+ if (pyFallback) {
87
+ try {
88
+ execFileSync(pyFallback.python, ["-m", "bb_cli", ...args], {
89
+ stdio: "inherit",
90
+ });
91
+ process.exit(0);
92
+ } catch (e) {
93
+ process.exit(e.status ?? 1);
94
+ }
95
+ }
96
+
97
+ console.error(
98
+ "Error: Could not find Python or the Bumblebee CLI.\n" +
99
+ "Install Python 3.12+ and run: pip install bumblebee-cli\n" +
100
+ "Or reinstall this package: npm install -g bumblebee-cli"
101
+ );
102
+ process.exit(1);
package/package.json ADDED
@@ -0,0 +1,28 @@
1
+ {
2
+ "name": "bumblebee-cli",
3
+ "version": "0.1.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
+ }
File without changes
@@ -0,0 +1,38 @@
1
+ import httpx
2
+
3
+ from .config import get_api_url, get_token
4
+
5
+
6
+ def get_client() -> httpx.Client:
7
+ headers = {}
8
+ token = get_token()
9
+ if token:
10
+ headers["Authorization"] = f"Bearer {token}"
11
+ return httpx.Client(base_url=get_api_url(), headers=headers, timeout=30)
12
+
13
+
14
+ def api_get(path: str, params: dict | None = None) -> dict | list:
15
+ with get_client() as client:
16
+ resp = client.get(path, params=params)
17
+ resp.raise_for_status()
18
+ return resp.json()
19
+
20
+
21
+ def api_post(path: str, json: dict | None = None, params: dict | None = None) -> dict:
22
+ with get_client() as client:
23
+ resp = client.post(path, json=json, params=params)
24
+ resp.raise_for_status()
25
+ return resp.json()
26
+
27
+
28
+ def api_put(path: str, json: dict) -> dict:
29
+ with get_client() as client:
30
+ resp = client.put(path, json=json)
31
+ resp.raise_for_status()
32
+ return resp.json()
33
+
34
+
35
+ def api_delete(path: str):
36
+ with get_client() as client:
37
+ resp = client.delete(path)
38
+ resp.raise_for_status()
@@ -0,0 +1,9 @@
1
+ Metadata-Version: 2.4
2
+ Name: bumblebee-cli
3
+ Version: 0.1.0
4
+ Summary: Bumblebee CLI — bb command for dev task management
5
+ Requires-Python: >=3.12
6
+ Requires-Dist: typer>=0.15.0
7
+ Requires-Dist: httpx>=0.28.0
8
+ Requires-Dist: rich>=13.9.0
9
+ Requires-Dist: toml>=0.10.2
@@ -0,0 +1,21 @@
1
+ pyproject.toml
2
+ src/__init__.py
3
+ src/api_client.py
4
+ src/config.py
5
+ src/main.py
6
+ src/bumblebee_cli.egg-info/PKG-INFO
7
+ src/bumblebee_cli.egg-info/SOURCES.txt
8
+ src/bumblebee_cli.egg-info/dependency_links.txt
9
+ src/bumblebee_cli.egg-info/entry_points.txt
10
+ src/bumblebee_cli.egg-info/requires.txt
11
+ src/bumblebee_cli.egg-info/top_level.txt
12
+ src/commands/__init__.py
13
+ src/commands/agent.py
14
+ src/commands/auth.py
15
+ src/commands/board.py
16
+ src/commands/comment.py
17
+ src/commands/label.py
18
+ src/commands/project.py
19
+ src/commands/sprint.py
20
+ src/commands/story.py
21
+ src/commands/task.py
@@ -0,0 +1,2 @@
1
+ [console_scripts]
2
+ bb = src.main:app
@@ -0,0 +1,4 @@
1
+ typer>=0.15.0
2
+ httpx>=0.28.0
3
+ rich>=13.9.0
4
+ toml>=0.10.2
@@ -0,0 +1,5 @@
1
+ __init__
2
+ api_client
3
+ commands
4
+ config
5
+ main
File without changes