ghcralph 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 (160) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +327 -0
  3. package/bin/ghcralph.js +2 -0
  4. package/dist/cli.d.ts +12 -0
  5. package/dist/cli.d.ts.map +1 -0
  6. package/dist/cli.js +92 -0
  7. package/dist/cli.js.map +1 -0
  8. package/dist/commands/config.d.ts +8 -0
  9. package/dist/commands/config.d.ts.map +1 -0
  10. package/dist/commands/config.js +118 -0
  11. package/dist/commands/config.js.map +1 -0
  12. package/dist/commands/index.d.ts +11 -0
  13. package/dist/commands/index.d.ts.map +1 -0
  14. package/dist/commands/index.js +11 -0
  15. package/dist/commands/index.js.map +1 -0
  16. package/dist/commands/init.d.ts +15 -0
  17. package/dist/commands/init.d.ts.map +1 -0
  18. package/dist/commands/init.js +116 -0
  19. package/dist/commands/init.js.map +1 -0
  20. package/dist/commands/rollback.d.ts +8 -0
  21. package/dist/commands/rollback.d.ts.map +1 -0
  22. package/dist/commands/rollback.js +238 -0
  23. package/dist/commands/rollback.js.map +1 -0
  24. package/dist/commands/run.d.ts +28 -0
  25. package/dist/commands/run.d.ts.map +1 -0
  26. package/dist/commands/run.js +407 -0
  27. package/dist/commands/run.js.map +1 -0
  28. package/dist/commands/status.d.ts +8 -0
  29. package/dist/commands/status.d.ts.map +1 -0
  30. package/dist/commands/status.js +399 -0
  31. package/dist/commands/status.js.map +1 -0
  32. package/dist/core/action-executor.d.ts +96 -0
  33. package/dist/core/action-executor.d.ts.map +1 -0
  34. package/dist/core/action-executor.js +289 -0
  35. package/dist/core/action-executor.js.map +1 -0
  36. package/dist/core/checkpoint-manager.d.ts +94 -0
  37. package/dist/core/checkpoint-manager.d.ts.map +1 -0
  38. package/dist/core/checkpoint-manager.js +236 -0
  39. package/dist/core/checkpoint-manager.js.map +1 -0
  40. package/dist/core/config-manager.d.ts +62 -0
  41. package/dist/core/config-manager.d.ts.map +1 -0
  42. package/dist/core/config-manager.js +184 -0
  43. package/dist/core/config-manager.js.map +1 -0
  44. package/dist/core/config-schema.d.ts +74 -0
  45. package/dist/core/config-schema.d.ts.map +1 -0
  46. package/dist/core/config-schema.js +84 -0
  47. package/dist/core/config-schema.js.map +1 -0
  48. package/dist/core/context-builder.d.ts +116 -0
  49. package/dist/core/context-builder.d.ts.map +1 -0
  50. package/dist/core/context-builder.js +388 -0
  51. package/dist/core/context-builder.js.map +1 -0
  52. package/dist/core/feedback-builder.d.ts +94 -0
  53. package/dist/core/feedback-builder.d.ts.map +1 -0
  54. package/dist/core/feedback-builder.js +226 -0
  55. package/dist/core/feedback-builder.js.map +1 -0
  56. package/dist/core/file-safeguard.d.ts +109 -0
  57. package/dist/core/file-safeguard.d.ts.map +1 -0
  58. package/dist/core/file-safeguard.js +200 -0
  59. package/dist/core/file-safeguard.js.map +1 -0
  60. package/dist/core/git-branch-manager.d.ts +122 -0
  61. package/dist/core/git-branch-manager.d.ts.map +1 -0
  62. package/dist/core/git-branch-manager.js +302 -0
  63. package/dist/core/git-branch-manager.js.map +1 -0
  64. package/dist/core/github-plan.d.ts +86 -0
  65. package/dist/core/github-plan.d.ts.map +1 -0
  66. package/dist/core/github-plan.js +333 -0
  67. package/dist/core/github-plan.js.map +1 -0
  68. package/dist/core/index.d.ts +43 -0
  69. package/dist/core/index.d.ts.map +1 -0
  70. package/dist/core/index.js +26 -0
  71. package/dist/core/index.js.map +1 -0
  72. package/dist/core/local-markdown-plan.d.ts +65 -0
  73. package/dist/core/local-markdown-plan.d.ts.map +1 -0
  74. package/dist/core/local-markdown-plan.js +154 -0
  75. package/dist/core/local-markdown-plan.js.map +1 -0
  76. package/dist/core/loop-engine.d.ts +133 -0
  77. package/dist/core/loop-engine.d.ts.map +1 -0
  78. package/dist/core/loop-engine.js +420 -0
  79. package/dist/core/loop-engine.js.map +1 -0
  80. package/dist/core/loop-events.d.ts +48 -0
  81. package/dist/core/loop-events.d.ts.map +1 -0
  82. package/dist/core/loop-events.js +24 -0
  83. package/dist/core/loop-events.js.map +1 -0
  84. package/dist/core/loop-state.d.ts +51 -0
  85. package/dist/core/loop-state.d.ts.map +1 -0
  86. package/dist/core/loop-state.js +48 -0
  87. package/dist/core/loop-state.js.map +1 -0
  88. package/dist/core/markdown-parser.d.ts +51 -0
  89. package/dist/core/markdown-parser.d.ts.map +1 -0
  90. package/dist/core/markdown-parser.js +122 -0
  91. package/dist/core/markdown-parser.js.map +1 -0
  92. package/dist/core/plan-manager.d.ts +61 -0
  93. package/dist/core/plan-manager.d.ts.map +1 -0
  94. package/dist/core/plan-manager.js +7 -0
  95. package/dist/core/plan-manager.js.map +1 -0
  96. package/dist/core/progress-tracker.d.ts +74 -0
  97. package/dist/core/progress-tracker.d.ts.map +1 -0
  98. package/dist/core/progress-tracker.js +198 -0
  99. package/dist/core/progress-tracker.js.map +1 -0
  100. package/dist/core/prompt-examples.d.ts +52 -0
  101. package/dist/core/prompt-examples.d.ts.map +1 -0
  102. package/dist/core/prompt-examples.js +194 -0
  103. package/dist/core/prompt-examples.js.map +1 -0
  104. package/dist/core/response-parser.d.ts +90 -0
  105. package/dist/core/response-parser.d.ts.map +1 -0
  106. package/dist/core/response-parser.js +209 -0
  107. package/dist/core/response-parser.js.map +1 -0
  108. package/dist/core/verification-hooks.d.ts +103 -0
  109. package/dist/core/verification-hooks.d.ts.map +1 -0
  110. package/dist/core/verification-hooks.js +268 -0
  111. package/dist/core/verification-hooks.js.map +1 -0
  112. package/dist/index.d.ts +13 -0
  113. package/dist/index.d.ts.map +1 -0
  114. package/dist/index.js +17 -0
  115. package/dist/index.js.map +1 -0
  116. package/dist/integrations/auth.d.ts +28 -0
  117. package/dist/integrations/auth.d.ts.map +1 -0
  118. package/dist/integrations/auth.js +76 -0
  119. package/dist/integrations/auth.js.map +1 -0
  120. package/dist/integrations/copilot-agent.d.ts +104 -0
  121. package/dist/integrations/copilot-agent.d.ts.map +1 -0
  122. package/dist/integrations/copilot-agent.js +235 -0
  123. package/dist/integrations/copilot-agent.js.map +1 -0
  124. package/dist/integrations/index.d.ts +18 -0
  125. package/dist/integrations/index.d.ts.map +1 -0
  126. package/dist/integrations/index.js +14 -0
  127. package/dist/integrations/index.js.map +1 -0
  128. package/dist/integrations/mcp-tools.d.ts +129 -0
  129. package/dist/integrations/mcp-tools.d.ts.map +1 -0
  130. package/dist/integrations/mcp-tools.js +272 -0
  131. package/dist/integrations/mcp-tools.js.map +1 -0
  132. package/dist/integrations/tokens.d.ts +45 -0
  133. package/dist/integrations/tokens.d.ts.map +1 -0
  134. package/dist/integrations/tokens.js +50 -0
  135. package/dist/integrations/tokens.js.map +1 -0
  136. package/dist/types/index.d.ts +53 -0
  137. package/dist/types/index.d.ts.map +1 -0
  138. package/dist/types/index.js +7 -0
  139. package/dist/types/index.js.map +1 -0
  140. package/dist/utils/index.d.ts +23 -0
  141. package/dist/utils/index.d.ts.map +1 -0
  142. package/dist/utils/index.js +37 -0
  143. package/dist/utils/index.js.map +1 -0
  144. package/dist/utils/output.d.ts +59 -0
  145. package/dist/utils/output.d.ts.map +1 -0
  146. package/dist/utils/output.js +96 -0
  147. package/dist/utils/output.js.map +1 -0
  148. package/dist/utils/paths.d.ts +34 -0
  149. package/dist/utils/paths.d.ts.map +1 -0
  150. package/dist/utils/paths.js +67 -0
  151. package/dist/utils/paths.js.map +1 -0
  152. package/dist/utils/shell.d.ts +26 -0
  153. package/dist/utils/shell.d.ts.map +1 -0
  154. package/dist/utils/shell.js +65 -0
  155. package/dist/utils/shell.js.map +1 -0
  156. package/dist/utils/validation.d.ts +27 -0
  157. package/dist/utils/validation.d.ts.map +1 -0
  158. package/dist/utils/validation.js +43 -0
  159. package/dist/utils/validation.js.map +1 -0
  160. package/package.json +86 -0
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Raphael Pothin
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,327 @@
1
+ # GitHub Copilot Ralph CLI (`ghcralph`)
2
+
3
+ [![CI](https://github.com/rpothin/ghc-ralph-cli/actions/workflows/ci.yml/badge.svg?branch=main&event=push)](https://github.com/rpothin/ghc-ralph-cli/actions/workflows/ci.yml)
4
+ [![npm version](https://img.shields.io/npm/v/ghcralph.svg)](https://www.npmjs.com/package/ghcralph)
5
+ [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
6
+ [![Node.js](https://img.shields.io/badge/node-%3E%3D18.0.0-brightgreen.svg)](https://nodejs.org/)
7
+
8
+ Run **autonomous, checkpointed coding loops** with GitHub Copilot—designed to be **safe, reversible, and budget-controlled**.
9
+
10
+ ## What you get
11
+
12
+ - 🌿 **Branch isolation**: works on a `ghcralph/*` branch (never modifies `main`/`master` directly)
13
+ - 💾 **Automatic checkpoints**: commits after each iteration for easy rollback
14
+ - 🛡️ **Guardrails**: iteration limits, token budgets, timeouts, circuit breaker on repeated failures
15
+ - 📋 **Flexible plan sources**: GitHub Issues or local Markdown task lists
16
+ - 💻 **Cross-platform**: Windows, macOS, Linux
17
+
18
+ ## 60-second quick start
19
+
20
+ ### Prerequisites (required)
21
+ - **Node.js** >= 18
22
+ - **git**
23
+ - **GitHub CLI (`gh`)** authenticated
24
+ - **GitHub Copilot CLI extension**:
25
+ ```bash
26
+ gh extension install github/gh-copilot
27
+ ```
28
+ - An active **GitHub Copilot** subscription / access
29
+
30
+ ### Install
31
+ ```bash
32
+ npm install -g ghcralph
33
+ ```
34
+
35
+ ### Initialize in your project
36
+ ```bash
37
+ cd your-project
38
+ ghcralph init
39
+ ```
40
+
41
+ ### Run your first task
42
+ ```bash
43
+ ghcralph run --task "Add a README badge showing the build status"
44
+ ```
45
+
46
+ ### Rollback if needed
47
+ ```bash
48
+ ghcralph rollback --iterations 1
49
+ ```
50
+
51
+ ## Safety model (read this first)
52
+
53
+ - **No direct main changes**: the tool creates an isolated branch and works there.
54
+ - **Reversible by design**: each iteration is checkpointed in git; rollback is a first-class command.
55
+ - **Deletion protection**: existing files are protected from deletion by default (override only if you explicitly allow it).
56
+ - **Budgets and limits**: iteration/token/time limits prevent runaway sessions.
57
+
58
+ ---
59
+
60
+ ## What is GitHub Copilot Ralph?
61
+
62
+ GitHub Copilot Ralph implements the **Ralph Wiggum agentic coding pattern**—a simple, safe, and well-documented approach to running autonomous AI coding loops powered by GitHub Copilot.
63
+
64
+ ### The Ralph Wiggum Pattern
65
+
66
+ Named after the delightfully simple character, the pattern is straightforward:
67
+
68
+ ```
69
+ 1. Give the agent a task
70
+ 2. Let it work in small, checkpointed iterations
71
+ 3. Review progress and rollback if needed
72
+ 4. Repeat until done
73
+ ```
74
+
75
+ This approach prioritizes **safety** (automatic checkpoints, git isolation) and **control** (iteration limits, easy rollback) over speed.
76
+
77
+ ## Key Features
78
+
79
+ - 🔄 **Autonomous Loop**: Repeatedly invokes AI agent until task completion
80
+ - 📋 **Flexible Plan Sources**: GitHub Issues or local Markdown task lists
81
+ - 🛡️ **Safety First**: Git branch isolation, file deletion safeguards
82
+ - 💾 **Automatic Checkpoints**: Git commits after each iteration for easy rollback
83
+ - 📊 **Progress Tracking**: Real-time status, token usage, and session logs
84
+ - ⚡ **Guardrails**: Iteration limits, token budgets, timeout controls
85
+ - 🔧 **Highly Configurable**: Customize behavior via CLI, env vars, or config files
86
+ - 💻 **Cross-Platform**: Works on Windows, macOS, and Linux
87
+
88
+ ## Commands
89
+
90
+ | Command | Description |
91
+ | ------------------- | ----------------------------------------------- |
92
+ | `ghcralph init` | Initialize GitHub Copilot Ralph in a repository |
93
+ | `ghcralph run` | Execute an agentic coding loop |
94
+ | `ghcralph status` | Check current session status |
95
+ | `ghcralph rollback` | Revert to a previous checkpoint |
96
+ | `ghcralph config` | View or modify configuration |
97
+ | `ghcralph help` | Get help for any command |
98
+
99
+ Use `ghcralph <command> --help` for detailed options.
100
+
101
+ ## Common workflows
102
+
103
+ ### One-off task (fastest)
104
+ ```bash
105
+ ghcralph run --task "Refactor auth middleware to reduce duplication"
106
+ ```
107
+
108
+ ### Run from a local Markdown plan
109
+ ```bash
110
+ ghcralph run --plan TODO.md
111
+ ```
112
+
113
+ ### Run tasks from GitHub Issues
114
+ ```bash
115
+ ghcralph init --github
116
+ ghcralph run --github owner/repo --label "ready"
117
+ ```
118
+
119
+ ## Usage
120
+
121
+ ### Initialize a Project
122
+
123
+ ```bash
124
+ # Default initialization (local plan source)
125
+ ghcralph init
126
+
127
+ # Use GitHub Issues as plan source
128
+ ghcralph init --github
129
+
130
+ # Use local Markdown files as plan source
131
+ ghcralph init --local
132
+
133
+ # Reinitialize existing configuration
134
+ ghcralph init --force
135
+ ```
136
+
137
+ ### Run Tasks
138
+
139
+ ```bash
140
+ # Inline task
141
+ ghcralph run --task "Add input validation to the login form"
142
+
143
+ # Task from file
144
+ ghcralph run --file tasks/add-validation.md
145
+
146
+ # Tasks from a Markdown plan file
147
+ ghcralph run --plan TODO.md
148
+
149
+ # Tasks from GitHub Issues
150
+ ghcralph run --github owner/repo --label "ready"
151
+ ```
152
+
153
+ ### Advanced Run Options
154
+
155
+ ```bash
156
+ # Control iterations and tokens
157
+ ghcralph run --task "Refactor auth" --max-iterations 20 --max-tokens 50000
158
+
159
+ # Specify context files
160
+ ghcralph run --task "Fix tests" --context "src/**/*.test.ts"
161
+
162
+ # Use a specific branch
163
+ ghcralph run --task "Add feature" --branch feature/my-feature
164
+
165
+ # Preview without executing
166
+ ghcralph run --task "Big change" --dry-run
167
+
168
+ # Long-running task with timeout
169
+ ghcralph run --task "Large refactor" --unlimited --timeout 60
170
+
171
+ # Skip confirmation prompts
172
+ ghcralph run --task "Quick fix" --force
173
+ ```
174
+
175
+ ## Configuration
176
+
177
+ GitHub Copilot Ralph uses a hierarchical configuration system:
178
+
179
+ 1. **CLI flags** (highest priority)
180
+ 2. **Environment variables** (`GHCRALPH_*`)
181
+ 3. **Local config** (`.ghcralph/config.json`)
182
+ 4. **Global config** (`~/.config/ghcralph/config.json`)
183
+
184
+ ### Configuration Options
185
+
186
+ | Option | Default | Description |
187
+ | --------------- | ----------- | ----------------------------------------------------- |
188
+ | `planSource` | `local` | Plan source: `github` or `local` |
189
+ | `maxIterations` | `10` | Maximum loop iterations |
190
+ | `maxTokens` | `100000` | Token budget |
191
+ | `defaultModel` | `gpt-4.1` | Copilot model to use |
192
+ | `autoCommit` | `true` | Auto-commit after iterations |
193
+ | `branchPrefix` | `ghcralph/` | Prefix for GitHub Copilot Ralph branches |
194
+ | `githubRepo` | - | GitHub repository (owner/repo) for GitHub plan source |
195
+ | `localPlanFile` | - | Path to local plan file |
196
+
197
+ ### Environment Variables
198
+
199
+ All configuration options can be set via environment variables with the `GHCRALPH_` prefix:
200
+
201
+ ```bash
202
+ export GHCRALPH_MAX_ITERATIONS=20
203
+ export GHCRALPH_MAX_TOKENS=50000
204
+ export GHCRALPH_DEFAULT_MODEL=gpt-4.1
205
+ export GHCRALPH_AUTO_COMMIT=true
206
+ export GHCRALPH_BRANCH_PREFIX=ghcralph/
207
+ export GHCRALPH_PLAN_SOURCE=local
208
+ ```
209
+
210
+ ### Example Configuration File
211
+
212
+ ```json
213
+ {
214
+ "planSource": "github",
215
+ "maxIterations": 15,
216
+ "maxTokens": 50000,
217
+ "defaultModel": "gpt-4.1",
218
+ "autoCommit": true,
219
+ "branchPrefix": "ghcralph/",
220
+ "githubRepo": "owner/repo"
221
+ }
222
+ ```
223
+
224
+ ## Safety Features (details)
225
+
226
+ ### 🌿 Git Branch Isolation
227
+ - Automatically creates `ghcralph/` prefixed branches
228
+ - Never modifies `main` or `master` directly
229
+ - Easy to discard unsuccessful attempts
230
+
231
+ ### 💾 Automatic Checkpoints
232
+ - Commits after each successful iteration
233
+ - Message format: `ghcralph: iteration N - summary`
234
+ - Easy rollback with `ghcralph rollback`
235
+
236
+ ### 🛡️ File Deletion Safeguards
237
+ - Tracks files that existed before session
238
+ - Blocks deletion of pre-existing files
239
+ - Override with `--allow-delete` if needed
240
+
241
+ ### ⏱️ Resource Limits
242
+ - Configurable iteration limits
243
+ - Token budget controls
244
+ - Optional timeout (`--timeout`)
245
+ - Requires `--unlimited` flag for >50 iterations
246
+
247
+ ### 🔌 Circuit Breaker
248
+ - Pauses after 3 consecutive failures
249
+ - Warns at 80% of resource limits
250
+ - Graceful shutdown on Ctrl+C
251
+
252
+ ## Authentication
253
+
254
+ GitHub Copilot Ralph uses GitHub for AI access:
255
+
256
+ 1. **GitHub CLI** (recommended): `gh auth login`
257
+ 2. **GitHub Copilot CLI**: Ensure it's installed: `gh extension install github/gh-copilot`
258
+ 3. **Environment variable** (alternative): `GITHUB_TOKEN` or `GH_TOKEN`
259
+
260
+ ## Installation
261
+
262
+ ### npm (Recommended)
263
+
264
+ ```bash
265
+ npm install -g ghcralph
266
+ ```
267
+
268
+ ### From source
269
+
270
+ ```bash
271
+ git clone https://github.com/rpothin/ghc-ralph-cli.git
272
+ cd ghc-ralph-cli
273
+ npm install
274
+ npm run build
275
+ npm link
276
+ ```
277
+
278
+ ## Troubleshooting
279
+
280
+ ### "Not in a git repository"
281
+ Run `git init` first, or navigate to an existing git repository.
282
+
283
+ ### "Failed to initialize Copilot agent"
284
+ Ensure you have GitHub Copilot CLI installed and are authenticated:
285
+ ```bash
286
+ gh extension install github/gh-copilot
287
+ gh auth login
288
+ ```
289
+
290
+ ### "Maximum iterations reached"
291
+ Increase the limit: `--max-iterations 20`
292
+ Or for very long tasks: `--unlimited`
293
+
294
+ ### Progress seems stuck
295
+ Check status: `ghcralph status`
296
+ View checkpoints: `ghcralph rollback --list`
297
+ Rollback if needed: `ghcralph rollback`
298
+
299
+ ## Credits & Attribution
300
+
301
+ **GitHub Copilot Ralph** is an opinionated interpretation of the **Ralph Wiggum loop** approach, originally proposed by **[Geoffrey Huntley](https://ghuntley.com/)**.
302
+
303
+ This CLI implementation was created by **[Raphael Pothin](https://github.com/rpothin)** to make the Ralph Wiggum approach:
304
+
305
+ - 📐 **More structured** - with clear phases and checkpoints
306
+ - 🛡️ **Safer** - with git isolation, file safeguards, and resource limits
307
+ - 🎯 **More accessible** - for developers new to agentic coding patterns
308
+ - 🏢 **Enterprise-ready** - with configuration, audit trails, and controls
309
+ - 🔗 **GitHub ecosystem integrated** - leveraging GitHub Copilot SDK and optionally GitHub Issues
310
+
311
+ ## Philosophy
312
+
313
+ GitHub Copilot Ralph is built on these principles:
314
+
315
+ 1. **Simplicity first**: Mirror the elegant simplicity of Geoffrey Huntley's original Ralph loop
316
+ 2. **Safety by design**: Git isolation, automatic checkpoints, cost controls
317
+ 3. **Human-friendly**: Markdown progress, clear documentation, easy rollback
318
+ 4. **Cross-platform**: Works seamlessly on Windows, macOS, and Linux
319
+ 5. **Transparent**: You can always see what GitHub Copilot Ralph is doing and undo it
320
+
321
+ ## Contributing
322
+
323
+ We welcome contributions! Please see [CONTRIBUTING.md](CONTRIBUTING.md) for guidelines.
324
+
325
+ ## License
326
+
327
+ MIT © [Raphael Pothin](https://github.com/rpothin)
@@ -0,0 +1,2 @@
1
+ #!/usr/bin/env node
2
+ import '../dist/cli.js';
package/dist/cli.d.ts ADDED
@@ -0,0 +1,12 @@
1
+ #!/usr/bin/env node
2
+ /**
3
+ * GitHub Copilot Ralph CLI - Main Entry Point
4
+ *
5
+ * A cross-platform CLI for running autonomous agentic coding loops
6
+ * using the Ralph Wiggum pattern with GitHub Copilot.
7
+ *
8
+ * This is an opinionated interpretation of Geoffrey Huntley's Ralph Wiggum loop
9
+ * (https://ghuntley.com/ralph/) created by Raphael Pothin.
10
+ */
11
+ export {};
12
+ //# sourceMappingURL=cli.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cli.d.ts","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":";AACA;;;;;;;;GAQG"}
package/dist/cli.js ADDED
@@ -0,0 +1,92 @@
1
+ #!/usr/bin/env node
2
+ /**
3
+ * GitHub Copilot Ralph CLI - Main Entry Point
4
+ *
5
+ * A cross-platform CLI for running autonomous agentic coding loops
6
+ * using the Ralph Wiggum pattern with GitHub Copilot.
7
+ *
8
+ * This is an opinionated interpretation of Geoffrey Huntley's Ralph Wiggum loop
9
+ * (https://ghuntley.com/ralph/) created by Raphael Pothin.
10
+ */
11
+ import { Command } from 'commander';
12
+ import { VERSION, NAME } from './index.js';
13
+ import { registerInitCommand, registerRunCommand, registerStatusCommand, registerRollbackCommand, registerConfigCommand, } from './commands/index.js';
14
+ import { setVerbosity, banner, debug, detectShell, dim, code } from './utils/index.js';
15
+ const program = new Command();
16
+ // Configure program metadata
17
+ program
18
+ .name(NAME)
19
+ .description('GitHub Copilot Ralph - Autonomous agentic coding loops with GitHub Copilot')
20
+ .version(VERSION, '-v, --version', 'Show version number')
21
+ .option('--verbose', 'Enable verbose logging')
22
+ .option('--quiet', 'Suppress non-essential output')
23
+ .addHelpText('after', `
24
+ ${dim('Examples:')}
25
+ $ ghcralph init # Initialize GitHub Copilot Ralph in your project
26
+ $ ghcralph run --task "Add tests" # Run a coding loop for a task
27
+ $ ghcralph run --plan TODO.md # Execute tasks from a plan file
28
+ $ ghcralph run --github owner/repo # Work through GitHub Issues
29
+ $ ghcralph status # Check current session status
30
+ $ ghcralph rollback --iterations 2 # Undo last 2 iterations
31
+ $ ghcralph config list # View current configuration
32
+
33
+ ${dim('Quick Start:')}
34
+ 1. Ensure GitHub Copilot CLI is installed: ${code('gh extension install github/gh-copilot')}
35
+ 2. Run ${code('ghcralph init')} in your project
36
+ 3. Run ${code('ghcralph run --task "your task"')} to start coding
37
+ 4. GitHub Copilot Ralph will create a branch, make changes, and checkpoint automatically
38
+
39
+ ${dim('Tips:')}
40
+ - Use --dry-run to preview what GitHub Copilot Ralph would do
41
+ - Use --verbose for detailed logging
42
+ - Use --force to skip confirmation prompts
43
+ - Checkpoints are auto-committed; use 'ghcralph rollback' to undo
44
+
45
+ ${dim('Documentation:')} https://github.com/rpothin/ghc-ralph-cli
46
+ ${dim('Original concept:')} https://ghuntley.com/ralph/
47
+ `)
48
+ .hook('preAction', (thisCommand) => {
49
+ const opts = thisCommand.opts();
50
+ // Set verbosity level
51
+ if (opts.quiet) {
52
+ setVerbosity('quiet');
53
+ }
54
+ else if (opts.verbose) {
55
+ setVerbosity('verbose');
56
+ }
57
+ // Show banner in verbose mode
58
+ if (opts.verbose) {
59
+ banner();
60
+ const shell = detectShell();
61
+ debug(`Shell detected: ${shell.type} (${shell.path ?? 'unknown path'})`);
62
+ debug(`Platform: ${shell.isWindows ? 'Windows' : 'Unix-like'}`);
63
+ }
64
+ });
65
+ // Register all commands
66
+ registerInitCommand(program);
67
+ registerRunCommand(program);
68
+ registerStatusCommand(program);
69
+ registerRollbackCommand(program);
70
+ registerConfigCommand(program);
71
+ // Add help command as alias
72
+ program
73
+ .command('help [command]')
74
+ .description('Display help for a command')
75
+ .action((commandName) => {
76
+ if (commandName) {
77
+ const cmd = program.commands.find(c => c.name() === commandName);
78
+ if (cmd) {
79
+ cmd.outputHelp();
80
+ }
81
+ else {
82
+ console.log(`Unknown command: ${commandName}`);
83
+ console.log(`Run ${code('ghcralph --help')} to see available commands.`);
84
+ }
85
+ }
86
+ else {
87
+ program.outputHelp();
88
+ }
89
+ });
90
+ // Parse command line arguments
91
+ program.parse();
92
+ //# sourceMappingURL=cli.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cli.js","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":";AACA;;;;;;;;GAQG;AAEH,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,YAAY,CAAC;AAC3C,OAAO,EACL,mBAAmB,EACnB,kBAAkB,EAClB,qBAAqB,EACrB,uBAAuB,EACvB,qBAAqB,GACtB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,YAAY,EAAE,MAAM,EAAE,KAAK,EAAE,WAAW,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAC;AAEvF,MAAM,OAAO,GAAG,IAAI,OAAO,EAAE,CAAC;AAE9B,6BAA6B;AAC7B,OAAO;KACJ,IAAI,CAAC,IAAI,CAAC;KACV,WAAW,CAAC,4EAA4E,CAAC;KACzF,OAAO,CAAC,OAAO,EAAE,eAAe,EAAE,qBAAqB,CAAC;KACxD,MAAM,CAAC,WAAW,EAAE,wBAAwB,CAAC;KAC7C,MAAM,CAAC,SAAS,EAAE,+BAA+B,CAAC;KAClD,WAAW,CAAC,OAAO,EAAE;EACtB,GAAG,CAAC,WAAW,CAAC;;;;;;;;;EAShB,GAAG,CAAC,cAAc,CAAC;+CAC0B,IAAI,CAAC,wCAAwC,CAAC;WAClF,IAAI,CAAC,eAAe,CAAC;WACrB,IAAI,CAAC,iCAAiC,CAAC;;;EAGhD,GAAG,CAAC,OAAO,CAAC;;;;;;EAMZ,GAAG,CAAC,gBAAgB,CAAC;EACrB,GAAG,CAAC,mBAAmB,CAAC;CACzB,CAAC;KACC,IAAI,CAAC,WAAW,EAAE,CAA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CAAC;YACN,OAAO,CAAC,GAAG,CAAC,oBAAoB,WAAW,EAAE,CAAC,CAAC;YAC/C,OAAO,CAAC,GAAG,CAAC,OAAO,IAAI,CAAC,iBAAiB,CAAC,6BAA6B,CAAC,CAAC;QAC3E,CAAC;IACH,CAAC;SAAM,CAAC;QACN,OAAO,CAAC,UAAU,EAAE,CAAC;IACvB,CAAC;AACH,CAAC,CAAC,CAAC;AAEL,+BAA+B;AAC/B,OAAO,CAAC,KAAK,EAAE,CAAC"}
@@ -0,0 +1,8 @@
1
+ /**
2
+ * Config Command
3
+ *
4
+ * View or modify Ralph configuration
5
+ */
6
+ import type { Command } from 'commander';
7
+ export declare function registerConfigCommand(program: Command): void;
8
+ //# sourceMappingURL=config.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../src/commands/config.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAYzC,wBAAgB,qBAAqB,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,CA6H5D"}
@@ -0,0 +1,118 @@
1
+ /**
2
+ * Config Command
3
+ *
4
+ * View or modify Ralph configuration
5
+ */
6
+ import { info, success, error, code, dim, heading } from '../utils/index.js';
7
+ import { ConfigManager, isValidConfigKey, parseConfigValue, validateConfigValue, getGlobalConfigPath, getLocalConfigPath, } from '../core/config-manager.js';
8
+ export function registerConfigCommand(program) {
9
+ const configCmd = program.command('config').description('View or modify configuration');
10
+ configCmd
11
+ .command('get [key]')
12
+ .description('Get configuration value(s)')
13
+ .option('--global', 'Show global configuration')
14
+ .action(async (key, _options) => {
15
+ const configManager = new ConfigManager();
16
+ await configManager.load();
17
+ const config = configManager.getConfig();
18
+ if (key) {
19
+ if (!isValidConfigKey(key)) {
20
+ error(`Unknown configuration key: ${key}`);
21
+ process.exit(1);
22
+ }
23
+ const value = config[key];
24
+ console.log(value);
25
+ }
26
+ else {
27
+ console.log('');
28
+ console.log(heading('📋 Ralph Configuration'));
29
+ console.log('');
30
+ for (const [k, v] of Object.entries(config)) {
31
+ const displayValue = typeof v === 'string' ? code(v) : String(v);
32
+ console.log(` ${dim(k + ':')} ${displayValue}`);
33
+ }
34
+ console.log('');
35
+ console.log(dim('Config files:'));
36
+ console.log(` ${dim('Global:')} ${getGlobalConfigPath()}`);
37
+ console.log(` ${dim('Local:')} ${getLocalConfigPath()}`);
38
+ console.log('');
39
+ }
40
+ });
41
+ configCmd
42
+ .command('set <key> <value>')
43
+ .description('Set a configuration value')
44
+ .option('--global', 'Set in global configuration')
45
+ .action(async (key, value, options) => {
46
+ if (!isValidConfigKey(key)) {
47
+ error(`Unknown configuration key: ${key}`);
48
+ info(`Valid keys: ${code('planSource, maxIterations, maxTokens, defaultModel, autoCommit, branchPrefix, githubRepo, localPlanFile')}`);
49
+ process.exit(1);
50
+ }
51
+ const parsedValue = parseConfigValue(key, value);
52
+ const validation = validateConfigValue(key, parsedValue);
53
+ if (!validation.valid) {
54
+ error(validation.error ?? 'Invalid value');
55
+ process.exit(1);
56
+ }
57
+ const configManager = new ConfigManager();
58
+ await configManager.load();
59
+ configManager.set(key, parsedValue);
60
+ if (options?.global) {
61
+ await configManager.saveGlobal();
62
+ success(`Set ${code(key)} = ${code(String(parsedValue))} (global)`);
63
+ }
64
+ else {
65
+ await configManager.saveLocal();
66
+ success(`Set ${code(key)} = ${code(String(parsedValue))} (local)`);
67
+ }
68
+ });
69
+ configCmd
70
+ .command('list')
71
+ .description('List all configuration')
72
+ .action(async () => {
73
+ const configManager = new ConfigManager();
74
+ await configManager.load();
75
+ const config = configManager.getConfig();
76
+ console.log('');
77
+ console.log(heading('📋 Ralph Configuration'));
78
+ console.log('');
79
+ for (const [key, value] of Object.entries(config)) {
80
+ const displayValue = typeof value === 'string' ? code(value) : String(value);
81
+ console.log(` ${dim(key + ':')} ${displayValue}`);
82
+ }
83
+ console.log('');
84
+ });
85
+ configCmd
86
+ .command('reset')
87
+ .description('Reset configuration to defaults')
88
+ .option('--force', 'Skip confirmation')
89
+ .option('--global', 'Reset global configuration')
90
+ .action(async (options) => {
91
+ if (!options.force) {
92
+ error('Use --force to confirm reset');
93
+ return;
94
+ }
95
+ const configManager = new ConfigManager();
96
+ configManager.reset();
97
+ if (options.global) {
98
+ await configManager.saveGlobal();
99
+ success('Global configuration reset to defaults');
100
+ }
101
+ else {
102
+ await configManager.saveLocal();
103
+ success('Local configuration reset to defaults');
104
+ }
105
+ });
106
+ configCmd
107
+ .command('path')
108
+ .description('Show configuration file paths')
109
+ .action(() => {
110
+ console.log('');
111
+ console.log(heading('📁 Configuration Paths'));
112
+ console.log('');
113
+ console.log(` ${dim('Global:')} ${getGlobalConfigPath()}`);
114
+ console.log(` ${dim('Local:')} ${getLocalConfigPath()}`);
115
+ console.log('');
116
+ });
117
+ }
118
+ //# sourceMappingURL=config.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"config.js","sourceRoot":"","sources":["../../src/commands/config.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAGH,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,KAAK,EAAE,IAAI,EAAE,GAAG,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAC7E,OAAO,EACL,aAAa,EACb,gBAAgB,EAChB,gBAAgB,EAChB,mBAAmB,EACnB,mBAAmB,EACnB,kBAAkB,GAEnB,MAAM,2BAA2B,CAAC;AAEnC,MAAM,UAAU,qBAAqB,CAAC,OAAgB;IACpD,MAAM,SAAS,GAAG,OAAO,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC,WAAW,CAAC,8BAA8B,CAAC,CAAC;IAExF,SAAS;SACN,OAAO,CAAC,WAAW,CAAC;SACpB,WAAW,CAAC,4BAA4B,CAAC;SACzC,MAAM,CAAC,UAAU,EAAE,2BAA2B,CAAC;SAC/C,MAAM,CAAC,KAAK,EAAE,GAAY,EAAE,QAA+B,EAAE,EAAE;QAC9D,MAAM,aAAa,GAA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CAAC;SAChD,MAAM,CAAC,KAAK,EAAE,OAA8C,EAAE,EAAE;QAC/D,IAAI,CAAC,OAAO,CAAC,KAAK,EAAE,CAAC;YACnB,KAAK,CAAC,8BAA8B,CAAC,CAAC;YACtC,OAAO;QACT,CAAC;QAED,MAAM,aAAa,GAAG,IAAI,aAAa,EAAE,CAAC;QAC1C,aAAa,CAAC,KAAK,EAAE,CAAC;QAEtB,IAAI,OAAO,CAAC,MAAM,EAAE,CAAC;YACnB,MAAM,aAAa,CAAC,UAAU,EAAE,CAAC;YACjC,OAAO,CAAC,wCAAwC,CAAC,CAAC;QACpD,CAAC;aAAM,CAAC;YACN,MAAM,aAAa,CAAC,SAAS,EAAE,CAAC;YAChC,OAAO,CAAC,uCAAuC,CAAC,CAAC;QACnD,CAAC;IACH,CAAC,CAAC,CAAC;IAEL,SAAS;SACN,OAAO,CAAC,MAAM,CAAC;SACf,WAAW,CAAC,+BAA+B,CAAC;SAC5C,MAAM,CAAC,GAAG,EAAE;QACX,OAAO,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;QAChB,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,wBAAwB,CAAC,CAAC,CAAC;QAC/C,OAAO,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;QAChB,OAAO,CAAC,GAAG,CAAC,KAAK,GAAG,CAAC,SAAS,CAAC,IAAI,mBAAmB,EAAE,EAAE,CAAC,CAAC;QAC5D,OAAO,CAAC,GAAG,CAAC,KAAK,GAAG,CAAC,QAAQ,CAAC,IAAI,kBAAkB,EAAE,EAAE,CAAC,CAAC;QAC1D,OAAO,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;IAClB,CAAC,CAAC,CAAC;AACP,CAAC"}
@@ -0,0 +1,11 @@
1
+ /**
2
+ * CLI Commands
3
+ *
4
+ * This module exports all CLI command registration functions
5
+ */
6
+ export { registerInitCommand } from './init.js';
7
+ export { registerRunCommand } from './run.js';
8
+ export { registerStatusCommand } from './status.js';
9
+ export { registerRollbackCommand } from './rollback.js';
10
+ export { registerConfigCommand } from './config.js';
11
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/commands/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,mBAAmB,EAAE,MAAM,WAAW,CAAC;AAChD,OAAO,EAAE,kBAAkB,EAAE,MAAM,UAAU,CAAC;AAC9C,OAAO,EAAE,qBAAqB,EAAE,MAAM,aAAa,CAAC;AACpD,OAAO,EAAE,uBAAuB,EAAE,MAAM,eAAe,CAAC;AACxD,OAAO,EAAE,qBAAqB,EAAE,MAAM,aAAa,CAAC"}
@@ -0,0 +1,11 @@
1
+ /**
2
+ * CLI Commands
3
+ *
4
+ * This module exports all CLI command registration functions
5
+ */
6
+ export { registerInitCommand } from './init.js';
7
+ export { registerRunCommand } from './run.js';
8
+ export { registerStatusCommand } from './status.js';
9
+ export { registerRollbackCommand } from './rollback.js';
10
+ export { registerConfigCommand } from './config.js';
11
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/commands/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,mBAAmB,EAAE,MAAM,WAAW,CAAC;AAChD,OAAO,EAAE,kBAAkB,EAAE,MAAM,UAAU,CAAC;AAC9C,OAAO,EAAE,qBAAqB,EAAE,MAAM,aAAa,CAAC;AACpD,OAAO,EAAE,uBAAuB,EAAE,MAAM,eAAe,CAAC;AACxD,OAAO,EAAE,qBAAqB,EAAE,MAAM,aAAa,CAAC"}
@@ -0,0 +1,15 @@
1
+ /**
2
+ * Init Command
3
+ *
4
+ * Initialize GitHub Copilot Ralph in a repository
5
+ */
6
+ import type { Command } from 'commander';
7
+ import type { PlanSource } from '../core/config-schema.js';
8
+ export interface InitOptions {
9
+ force?: boolean;
10
+ planSource?: PlanSource;
11
+ local?: boolean;
12
+ github?: boolean;
13
+ }
14
+ export declare function registerInitCommand(program: Command): void;
15
+ //# sourceMappingURL=init.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"init.d.ts","sourceRoot":"","sources":["../../src/commands/init.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAGH,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAGzC,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAC;AA8B3D,MAAM,WAAW,WAAW;IAC1B,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,UAAU,CAAC,EAAE,UAAU,CAAC;IACxB,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,MAAM,CAAC,EAAE,OAAO,CAAC;CAClB;AAED,wBAAgB,mBAAmB,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,CAsF1D"}