gnhf 0.1.2 → 0.1.3
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 +10 -7
- package/dist/cli.mjs +2 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
# gnhf
|
|
2
|
+
|
|
1
3
|
<p align="center">Before I go to bed, I tell my agents:</p>
|
|
2
4
|
<h1 align="center">good night, have fun</h1>
|
|
3
5
|
|
|
@@ -39,11 +41,11 @@
|
|
|
39
41
|
<img src="docs/splash.png" alt="gnhf — Good Night, Have Fun" width="800">
|
|
40
42
|
</p>
|
|
41
43
|
|
|
42
|
-
gnhf is a [ralph loop](https://ghuntley.com/ralph/) orchestrator that keeps your agents running while you sleep — each iteration makes one small, committed, documented change towards an objective.
|
|
44
|
+
gnhf is a [ralph loop](https://ghuntley.com/ralph/), autoresearch-style orchestrator that keeps your agents running while you sleep — each iteration makes one small, committed, documented change towards an objective.
|
|
43
45
|
You wake up to a branch full of clean work and a log of everything that happened.
|
|
44
46
|
|
|
45
47
|
- **Dead simple** — one command starts an autonomous loop that runs until you Ctrl+C
|
|
46
|
-
- **
|
|
48
|
+
- **Long running** — each iteration is committed on success, rolled back on failure, with sensible retries and exponential backoff
|
|
47
49
|
- **Agent-agnostic** — works with Claude Code or Codex out of the box
|
|
48
50
|
|
|
49
51
|
## Quick Start
|
|
@@ -121,11 +123,12 @@ npm link
|
|
|
121
123
|
|
|
122
124
|
## CLI Reference
|
|
123
125
|
|
|
124
|
-
| Command
|
|
125
|
-
|
|
|
126
|
-
| `gnhf "<prompt>"`
|
|
127
|
-
| `gnhf`
|
|
128
|
-
| `echo "prompt" \| gnhf` | Pipe prompt via stdin |
|
|
126
|
+
| Command | Description |
|
|
127
|
+
| ------------------------- | ----------------------------------------------- |
|
|
128
|
+
| `gnhf "<prompt>"` | Start a new run with the given objective |
|
|
129
|
+
| `gnhf` | Resume a run (when on an existing gnhf/ branch) |
|
|
130
|
+
| `echo "<prompt>" \| gnhf` | Pipe prompt via stdin |
|
|
131
|
+
| `cat prd.md \| gnhf` | Pipe a large spec or PRD via stdin |
|
|
129
132
|
|
|
130
133
|
### Flags
|
|
131
134
|
|
package/dist/cli.mjs
CHANGED
|
@@ -1155,6 +1155,7 @@ function slugifyPrompt(prompt) {
|
|
|
1155
1155
|
}
|
|
1156
1156
|
//#endregion
|
|
1157
1157
|
//#region src/cli.ts
|
|
1158
|
+
const packageVersion = JSON.parse(readFileSync(new URL("../package.json", import.meta.url), "utf-8")).version;
|
|
1158
1159
|
function ask(question) {
|
|
1159
1160
|
const rl = createInterface({
|
|
1160
1161
|
input: process$1.stdin,
|
|
@@ -1168,7 +1169,7 @@ function ask(question) {
|
|
|
1168
1169
|
});
|
|
1169
1170
|
}
|
|
1170
1171
|
const program = new Command();
|
|
1171
|
-
program.name("gnhf").description("Before I go to bed, I tell my agents: good night, have fun").version(
|
|
1172
|
+
program.name("gnhf").description("Before I go to bed, I tell my agents: good night, have fun").version(packageVersion).argument("[prompt]", "The objective for the coding agent").option("--agent <agent>", "Agent to use (claude or codex)", "claude").option("--mock", "", false).action(async (promptArg, options) => {
|
|
1172
1173
|
if (options.mock) {
|
|
1173
1174
|
const mock = new MockOrchestrator();
|
|
1174
1175
|
enterAltScreen();
|