@cluesmith/codev 2.0.0-rc.1 → 2.0.0-rc.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.
- package/bin/porch.js +38 -4
- package/package.json +1 -1
package/bin/porch.js
CHANGED
|
@@ -1,7 +1,41 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
3
|
+
/**
|
|
4
|
+
* Porch CLI - Protocol Orchestrator (standalone entry point)
|
|
5
|
+
*/
|
|
5
6
|
|
|
6
|
-
|
|
7
|
-
|
|
7
|
+
import { Command } from 'commander';
|
|
8
|
+
import { porch } from '../dist/commands/porch/index.js';
|
|
9
|
+
import { version } from '../dist/version.js';
|
|
10
|
+
|
|
11
|
+
const program = new Command();
|
|
12
|
+
|
|
13
|
+
program
|
|
14
|
+
.name('porch')
|
|
15
|
+
.description('Protocol orchestrator - run development protocols')
|
|
16
|
+
.version(version)
|
|
17
|
+
.argument('<subcommand>', 'Subcommand: run, init, approve, status, pending, list, show')
|
|
18
|
+
.argument('[args...]', 'Arguments for the subcommand')
|
|
19
|
+
.option('-n, --dry-run', 'Show what would execute without running')
|
|
20
|
+
.option('--no-claude', 'Skip Claude invocations (for testing)')
|
|
21
|
+
.option('-p, --poll-interval <seconds>', 'Override poll interval for gate checks')
|
|
22
|
+
.option('-d, --description <text>', 'Project description (for init)')
|
|
23
|
+
.option('-w, --worktree <path>', 'Worktree path (for init)')
|
|
24
|
+
.action(async (subcommand, args, options) => {
|
|
25
|
+
try {
|
|
26
|
+
await porch({
|
|
27
|
+
subcommand,
|
|
28
|
+
args,
|
|
29
|
+
dryRun: options.dryRun,
|
|
30
|
+
noClaude: !options.claude,
|
|
31
|
+
pollInterval: options.pollInterval ? parseInt(options.pollInterval, 10) : undefined,
|
|
32
|
+
description: options.description,
|
|
33
|
+
worktree: options.worktree,
|
|
34
|
+
});
|
|
35
|
+
} catch (error) {
|
|
36
|
+
console.error(error instanceof Error ? error.message : String(error));
|
|
37
|
+
process.exit(1);
|
|
38
|
+
}
|
|
39
|
+
});
|
|
40
|
+
|
|
41
|
+
program.parse();
|