@gh-symphony/cli 0.0.3 → 0.0.4
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 +142 -0
- package/dist/index.js +2 -1
- package/package.json +1 -1
package/README.md
ADDED
|
@@ -0,0 +1,142 @@
|
|
|
1
|
+
# @gh-symphony/cli
|
|
2
|
+
|
|
3
|
+
Interactive CLI for GitHub Symphony — a multi-tenant AI coding agent orchestration platform.
|
|
4
|
+
|
|
5
|
+
## Requirements
|
|
6
|
+
|
|
7
|
+
The following tools must be installed before using the CLI:
|
|
8
|
+
|
|
9
|
+
- **[Node.js](https://nodejs.org/)** (v24+) with npm
|
|
10
|
+
- **[Git](https://git-scm.com/)**
|
|
11
|
+
- **[GitHub CLI (`gh`)](https://cli.github.com/)** — authenticated with required scopes:
|
|
12
|
+
```bash
|
|
13
|
+
gh auth login --scopes repo,read:org,project
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
## 1. Install Package
|
|
17
|
+
|
|
18
|
+
```bash
|
|
19
|
+
npm install -g @gh-symphony/cli
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
Verify the installation:
|
|
23
|
+
|
|
24
|
+
```bash
|
|
25
|
+
gh-symphony --version
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
## 2. Set Repository
|
|
29
|
+
|
|
30
|
+
Navigate to the repository you want to orchestrate, then run:
|
|
31
|
+
|
|
32
|
+
```bash
|
|
33
|
+
gh-symphony init
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
The interactive wizard will:
|
|
37
|
+
|
|
38
|
+
1. Authenticate via `gh` CLI
|
|
39
|
+
2. Let you select a **GitHub Project** to bind
|
|
40
|
+
3. Map project status columns to workflow phases (active / wait / terminal)
|
|
41
|
+
4. Generate `WORKFLOW.md` and supporting files in the repository
|
|
42
|
+
|
|
43
|
+
### Customizing Agent Behavior
|
|
44
|
+
|
|
45
|
+
`gh-symphony init` generates skill files under `.codex/skills/` (or `.claude/skills/` for Claude Code). These skills define how the AI agent handles commits, pushes, pulls, and project status transitions.
|
|
46
|
+
|
|
47
|
+
You can further customize the agent's behavior by editing `WORKFLOW.md` — this is the policy layer that controls what the agent does at each workflow phase.
|
|
48
|
+
|
|
49
|
+
> Currently supported runtimes: **Codex**, **Claude Code**
|
|
50
|
+
|
|
51
|
+
## 3. Set Orchestrator Runner (Tenant)
|
|
52
|
+
|
|
53
|
+
On the machine where you want the orchestrator to run, register a tenant:
|
|
54
|
+
|
|
55
|
+
```bash
|
|
56
|
+
gh-symphony tenant add
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
The interactive wizard will:
|
|
60
|
+
|
|
61
|
+
1. Authenticate via `gh` CLI
|
|
62
|
+
2. Let you select a **GitHub Project**
|
|
63
|
+
3. Select repositories to orchestrate
|
|
64
|
+
4. Auto-detect workflow column mappings
|
|
65
|
+
5. Choose an AI runtime (Codex / Claude Code / custom)
|
|
66
|
+
6. Write tenant configuration to `~/.gh-symphony/`
|
|
67
|
+
|
|
68
|
+
### Tenant Management
|
|
69
|
+
|
|
70
|
+
```bash
|
|
71
|
+
gh-symphony tenant list # List all configured tenants
|
|
72
|
+
gh-symphony tenant remove <id> # Remove a tenant
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
## 4. Run the Orchestrator
|
|
76
|
+
|
|
77
|
+
### Foreground
|
|
78
|
+
|
|
79
|
+
```bash
|
|
80
|
+
gh-symphony start
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
### Background (daemon)
|
|
84
|
+
|
|
85
|
+
```bash
|
|
86
|
+
gh-symphony start --daemon # Start in background
|
|
87
|
+
gh-symphony stop # Stop the daemon
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
### Monitor
|
|
91
|
+
|
|
92
|
+
```bash
|
|
93
|
+
gh-symphony status # Show current status
|
|
94
|
+
gh-symphony status --watch # Live dashboard
|
|
95
|
+
gh-symphony logs # View event logs
|
|
96
|
+
gh-symphony logs --follow # Stream logs in real-time
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
### Dispatch a Single Issue
|
|
100
|
+
|
|
101
|
+
```bash
|
|
102
|
+
gh-symphony run org/repo#123
|
|
103
|
+
```
|
|
104
|
+
|
|
105
|
+
### Recover Stalled Runs
|
|
106
|
+
|
|
107
|
+
```bash
|
|
108
|
+
gh-symphony recover # Recover stalled runs
|
|
109
|
+
gh-symphony recover --dry-run # Preview what would be recovered
|
|
110
|
+
```
|
|
111
|
+
|
|
112
|
+
## Command Reference
|
|
113
|
+
|
|
114
|
+
```
|
|
115
|
+
Setup:
|
|
116
|
+
init Interactive repository setup wizard
|
|
117
|
+
config show Show current configuration
|
|
118
|
+
config set Set a configuration value
|
|
119
|
+
config edit Open config in $EDITOR
|
|
120
|
+
|
|
121
|
+
Orchestration:
|
|
122
|
+
start Start the orchestrator (foreground)
|
|
123
|
+
start --daemon Start the orchestrator (background)
|
|
124
|
+
stop Stop the background orchestrator
|
|
125
|
+
status Show orchestrator status
|
|
126
|
+
run <issue> Dispatch a single issue
|
|
127
|
+
recover Recover stalled runs
|
|
128
|
+
logs View orchestrator logs
|
|
129
|
+
|
|
130
|
+
Tenant Management:
|
|
131
|
+
tenant add Add a new tenant (interactive wizard)
|
|
132
|
+
tenant list List all configured tenants
|
|
133
|
+
tenant remove Remove a tenant
|
|
134
|
+
|
|
135
|
+
Global Options:
|
|
136
|
+
--config <dir> Config directory (default: ~/.gh-symphony)
|
|
137
|
+
--verbose Enable verbose output
|
|
138
|
+
--json Output in JSON format
|
|
139
|
+
--no-color Disable color output
|
|
140
|
+
--help, -h Show help
|
|
141
|
+
--version, -V Show version
|
|
142
|
+
```
|
package/dist/index.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
+
import { realpathSync } from "node:fs";
|
|
2
3
|
import { pathToFileURL } from "node:url";
|
|
3
4
|
import { resolveConfigDir } from "./config.js";
|
|
4
5
|
export function parseGlobalOptions(argv) {
|
|
@@ -81,7 +82,7 @@ async function main() {
|
|
|
81
82
|
await runCli(process.argv.slice(2));
|
|
82
83
|
}
|
|
83
84
|
if (process.argv[1] &&
|
|
84
|
-
import.meta.url === pathToFileURL(process.argv[1]).href) {
|
|
85
|
+
import.meta.url === pathToFileURL(realpathSync(process.argv[1])).href) {
|
|
85
86
|
main().catch((error) => {
|
|
86
87
|
process.stderr.write(`${error instanceof Error ? error.message : "Unknown error"}\n`);
|
|
87
88
|
process.exitCode = 1;
|