specrails-hub 1.1.1 → 1.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 +7 -7
- package/cli/dist/specrails-hub.js +18 -8
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -28,10 +28,10 @@ npm install -g specrails-hub
|
|
|
28
28
|
|
|
29
29
|
```bash
|
|
30
30
|
# Start the hub server
|
|
31
|
-
specrails-hub
|
|
31
|
+
specrails-hub start
|
|
32
32
|
|
|
33
33
|
# Register a project
|
|
34
|
-
specrails-hub
|
|
34
|
+
specrails-hub add /path/to/your/project
|
|
35
35
|
|
|
36
36
|
# Open in browser
|
|
37
37
|
open http://localhost:4200
|
|
@@ -96,12 +96,12 @@ A single Express process (port 4200) manages all projects. Each project gets its
|
|
|
96
96
|
|
|
97
97
|
| Command | Description |
|
|
98
98
|
|---------|-------------|
|
|
99
|
-
| `specrails-hub
|
|
100
|
-
| `specrails-hub
|
|
99
|
+
| `specrails-hub start [--port N]` | Start the hub server (default port 4200) |
|
|
100
|
+
| `specrails-hub stop` | Stop the hub server |
|
|
101
101
|
| `specrails-hub hub status` | Show hub state and registered projects |
|
|
102
|
-
| `specrails-hub
|
|
103
|
-
| `specrails-hub
|
|
104
|
-
| `specrails-hub
|
|
102
|
+
| `specrails-hub list` | List all registered projects |
|
|
103
|
+
| `specrails-hub add <path>` | Register a project |
|
|
104
|
+
| `specrails-hub remove <id>` | Unregister a project |
|
|
105
105
|
|
|
106
106
|
### Running commands
|
|
107
107
|
|
|
@@ -99,6 +99,15 @@ function parseArgs(argv) {
|
|
|
99
99
|
if (args[0] === 'hub') {
|
|
100
100
|
return { mode: 'hub', subArgs: args.slice(1), port };
|
|
101
101
|
}
|
|
102
|
+
// Allow hub subcommands directly without the 'hub' prefix:
|
|
103
|
+
// specrails-hub start → specrails-hub hub start
|
|
104
|
+
// specrails-hub stop → specrails-hub hub stop
|
|
105
|
+
// specrails-hub add → specrails-hub hub add
|
|
106
|
+
// etc.
|
|
107
|
+
const HUB_SUBCOMMANDS = new Set(['start', 'stop', 'add', 'remove', 'list']);
|
|
108
|
+
if (HUB_SUBCOMMANDS.has(args[0])) {
|
|
109
|
+
return { mode: 'hub', subArgs: args, port };
|
|
110
|
+
}
|
|
102
111
|
const first = args[0];
|
|
103
112
|
// Slash-prefixed command: pass through unchanged
|
|
104
113
|
if (first.startsWith('/')) {
|
|
@@ -124,7 +133,8 @@ ${bold('Usage:')}
|
|
|
124
133
|
specrails-hub "any raw prompt" Pass a raw prompt directly to claude
|
|
125
134
|
specrails-hub --status Print manager status and exit
|
|
126
135
|
specrails-hub --jobs Print recent job history and exit
|
|
127
|
-
specrails-hub
|
|
136
|
+
specrails-hub start|stop|add|list Manage the hub (shorthand, no 'hub' prefix needed)
|
|
137
|
+
specrails-hub hub <subcommand> Same, with explicit 'hub' prefix
|
|
128
138
|
specrails-hub --port <n> Override default port (${DEFAULT_PORT})
|
|
129
139
|
specrails-hub --help Show this help text
|
|
130
140
|
|
|
@@ -707,7 +717,7 @@ async function hubStatus(port) {
|
|
|
707
717
|
async function hubAdd(projectPath, port) {
|
|
708
718
|
const detection = await detectWebManager(port);
|
|
709
719
|
if (!detection.running) {
|
|
710
|
-
cliError('hub is not running. Start it first with: specrails-hub
|
|
720
|
+
cliError('hub is not running. Start it first with: specrails-hub start');
|
|
711
721
|
return 1;
|
|
712
722
|
}
|
|
713
723
|
try {
|
|
@@ -805,15 +815,15 @@ async function handleHub(subArgs, port) {
|
|
|
805
815
|
const sub = subArgs[0];
|
|
806
816
|
if (!sub || sub === 'help' || sub === '--help' || sub === '-h') {
|
|
807
817
|
process.stdout.write(`
|
|
808
|
-
${bold('specrails-hub
|
|
818
|
+
${bold('specrails-hub')} — hub management
|
|
809
819
|
|
|
810
820
|
${bold('Usage:')}
|
|
811
|
-
specrails-hub
|
|
812
|
-
specrails-hub
|
|
821
|
+
specrails-hub start Start the hub server
|
|
822
|
+
specrails-hub stop Stop the hub server
|
|
813
823
|
specrails-hub hub status Show hub status and registered projects
|
|
814
|
-
specrails-hub
|
|
815
|
-
specrails-hub
|
|
816
|
-
specrails-hub
|
|
824
|
+
specrails-hub add <path> Register a project by path
|
|
825
|
+
specrails-hub remove <id> Unregister a project by ID
|
|
826
|
+
specrails-hub list List all registered projects
|
|
817
827
|
`.trimStart());
|
|
818
828
|
return 0;
|
|
819
829
|
}
|