claude-code-hub 0.3.0 → 0.5.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 +28 -20
- package/package.json +1 -1
- package/server.js +5 -1
package/README.md
CHANGED
|
@@ -1,6 +1,20 @@
|
|
|
1
1
|
# Claude Code Hub
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
[](https://www.npmjs.com/package/claude-code-hub)
|
|
4
|
+
[](LICENSE)
|
|
5
|
+
[](https://www.npmjs.com/package/claude-code-hub)
|
|
6
|
+
|
|
7
|
+
Unified launcher for Claude Code tools — browse plugins in **Marketplace**, track tasks in **Kanban**, and monitor costs in **Cost**, all from a single chromeless PWA.
|
|
8
|
+
|
|
9
|
+
## Kanban:
|
|
10
|
+
|
|
11
|
+

|
|
12
|
+
|
|
13
|
+
## Marketplace:
|
|
14
|
+

|
|
15
|
+
|
|
16
|
+
## Cost:
|
|
17
|
+

|
|
4
18
|
|
|
5
19
|
## Quick Start
|
|
6
20
|
|
|
@@ -19,32 +33,25 @@ npm start # http://localhost:3455
|
|
|
19
33
|
|
|
20
34
|
## Keyboard Shortcuts
|
|
21
35
|
|
|
22
|
-
| Shortcut
|
|
23
|
-
|
|
24
|
-
| `Alt+1`
|
|
25
|
-
| `Alt+2`
|
|
26
|
-
| `
|
|
27
|
-
| `Ctrl+Alt+
|
|
36
|
+
| Shortcut | Action |
|
|
37
|
+
| ---------------- | ----------------------- |
|
|
38
|
+
| `Alt+1` | Switch to Kanban |
|
|
39
|
+
| `Alt+2` | Switch to Marketplace |
|
|
40
|
+
| `Alt+3` | Switch to Cost |
|
|
41
|
+
| `Ctrl+Alt+Right` | Switch to next tool |
|
|
42
|
+
| `Ctrl+Alt+Left` | Switch to previous tool |
|
|
28
43
|
|
|
29
44
|
## How It Works
|
|
30
45
|
|
|
31
46
|
The hub server spawns both sub-apps as child processes, each on its own port. A minimal shell page embeds them in iframes and switches visibility on tab change — zero UI chrome, just keyboard shortcuts.
|
|
32
47
|
|
|
33
|
-
Sub-apps communicate with the hub via `postMessage`:
|
|
34
|
-
|
|
35
|
-
```js
|
|
36
|
-
// From inside a sub-app, trigger cross-app navigation:
|
|
37
|
-
hubNavigate('marketplace', '?project=/path/to/project');
|
|
38
|
-
```
|
|
39
|
-
|
|
40
|
-
The Kanban sidebar shows a marketplace button on session cards — click it to jump to the Marketplace pre-filtered to that project.
|
|
41
|
-
|
|
42
48
|
## Included Tools
|
|
43
49
|
|
|
44
|
-
| Tool
|
|
45
|
-
|
|
46
|
-
| [Marketplace](https://github.com/NikiforovAll/claude-code-marketplace) | `marketplace/` | 3457
|
|
47
|
-
| [Kanban](https://github.com/NikiforovAll/claude-task-viewer)
|
|
50
|
+
| Tool | Submodule | Default Port |
|
|
51
|
+
| ---------------------------------------------------------------------- | -------------- | ------------ |
|
|
52
|
+
| [Marketplace](https://github.com/NikiforovAll/claude-code-marketplace) | `marketplace/` | 3457 |
|
|
53
|
+
| [Kanban](https://github.com/NikiforovAll/claude-task-viewer) | `cck/` | 3456 |
|
|
54
|
+
| [Cost](https://github.com/NikiforovAll/claude-code-cost) | `cost/` | 3458 |
|
|
48
55
|
|
|
49
56
|
## CLI Flags
|
|
50
57
|
|
|
@@ -52,6 +59,7 @@ The Kanban sidebar shows a marketplace button on session cards — click it to j
|
|
|
52
59
|
--port <n> Hub port (default: 3455)
|
|
53
60
|
--marketplace-port <n> Marketplace port (default: 3457)
|
|
54
61
|
--kanban-port <n> Kanban port (default: 3456)
|
|
62
|
+
--cost-port <n> Cost port (default: 3458)
|
|
55
63
|
--open Auto-open browser
|
|
56
64
|
```
|
|
57
65
|
|
package/package.json
CHANGED
package/server.js
CHANGED
|
@@ -15,9 +15,10 @@ function getArg(name) {
|
|
|
15
15
|
const HUB_PORT = parseInt(getArg('port') || process.env.PORT || '3455', 10);
|
|
16
16
|
const MARKETPLACE_PORT = parseInt(getArg('marketplace-port') || '3457', 10);
|
|
17
17
|
const KANBAN_PORT = parseInt(getArg('kanban-port') || '3456', 10);
|
|
18
|
+
const COST_PORT = parseInt(getArg('cost-port') || '3458', 10);
|
|
18
19
|
|
|
19
20
|
const children = [];
|
|
20
|
-
const actualPorts = { marketplace: MARKETPLACE_PORT, kanban: KANBAN_PORT };
|
|
21
|
+
const actualPorts = { marketplace: MARKETPLACE_PORT, kanban: KANBAN_PORT, cost: COST_PORT };
|
|
21
22
|
|
|
22
23
|
function spawnApp(name, cmd, args, envPort) {
|
|
23
24
|
const child = spawn(cmd, args, {
|
|
@@ -76,9 +77,11 @@ function resolveApp(submoduleDir, npmPackage) {
|
|
|
76
77
|
|
|
77
78
|
const marketplacePath = resolveApp('marketplace', 'claude-code-marketplace');
|
|
78
79
|
const kanbanPath = resolveApp('cck', 'claude-code-kanban');
|
|
80
|
+
const costPath = resolveApp('cost', 'claude-code-cost');
|
|
79
81
|
|
|
80
82
|
spawnApp('marketplace', process.execPath, [marketplacePath, `--port=${MARKETPLACE_PORT}`], MARKETPLACE_PORT);
|
|
81
83
|
spawnApp('kanban', process.execPath, [kanbanPath], KANBAN_PORT);
|
|
84
|
+
spawnApp('cost', process.execPath, [costPath, `--port=${COST_PORT}`], COST_PORT);
|
|
82
85
|
|
|
83
86
|
const app = express();
|
|
84
87
|
|
|
@@ -87,6 +90,7 @@ app.get('/api/config', (_req, res) => {
|
|
|
87
90
|
apps: {
|
|
88
91
|
kanban: { name: 'Kanban', url: `http://localhost:${actualPorts.kanban}`, icon: 'columns' },
|
|
89
92
|
marketplace: { name: 'Marketplace', url: `http://localhost:${actualPorts.marketplace}`, icon: 'store' },
|
|
93
|
+
cost: { name: 'Cost', url: `http://localhost:${actualPorts.cost}`, icon: 'dollar-sign' },
|
|
90
94
|
},
|
|
91
95
|
});
|
|
92
96
|
});
|