|
2 | 2 |
|
3 | 3 | Dead simple Bun CLI that runs `codex` and `claude` in a loop. The [main loop](https://github.com/axeldelafosse/loop/blob/main/src/loop/main.ts#L14) is ~50 lines of easy-to-read code. |
4 | 4 |
|
| 5 | +```bash |
| 6 | +curl -fsSL https://raw.githubusercontent.com/axeldelafosse/loop/main/install.sh | bash |
| 7 | +``` |
| 8 | + |
| 9 | +```bash |
| 10 | +loop --prompt "Implement {feature}" --proof "Use {skill} to verify your changes" --worktree |
| 11 | +``` |
| 12 | + |
5 | 13 | ## What this is |
6 | 14 |
|
7 | 15 | This _is_ a "meta agent loop" to help coding agents become long-running agents. Stop baby sitting your agents: let them iterate on tasks with clear proof requirements until they are done. Run multiple reviews to continue the feedback loop. |
@@ -52,22 +60,22 @@ Installer currently supports macOS and Linux and installs to `~/.local/bin/loop` |
52 | 60 |
|
53 | 61 | ```bash |
54 | 62 | # run from source |
55 | | -./loop.ts --prompt "Implement feature X" --proof "Use X skill to verify your changes" |
| 63 | +./loop.ts --prompt "Implement {feature}" --proof "Use {skill} to verify your changes" |
56 | 64 |
|
57 | 65 | # open live panel of running claude/codex instances |
58 | 66 | ./loop.ts |
59 | 67 |
|
60 | 68 | # build executable |
61 | 69 | bun run build |
62 | | -./loop --prompt "Implement feature X" --proof "Use X skill to verify your changes" |
| 70 | +./loop --prompt "Implement {feature}" --proof "Use {skill} to verify your changes" |
63 | 71 |
|
64 | 72 | # same live panel behavior on built binary |
65 | 73 | ./loop |
66 | 74 | ``` |
67 | 75 |
|
68 | 76 | Some notes: |
69 | 77 |
|
70 | | -- You can pass prompt text positionally (`loop "Implement feature X"`) or via `--prompt`. |
| 78 | +- You can pass prompt text positionally (`loop "Implement {feature}"`) or via `--prompt`. |
71 | 79 | - `--proof` is required and should describe how to prove the task works (tests, commands, and checks to run). You should be super specific based on the prompt. |
72 | 80 | - If the input is plain text (not a `.md` path), `loop` first runs a planning step to create `PLAN.md`, then uses `PLAN.md` for the main loop. |
73 | 81 | - Running with no args opens the live panel. To run the loop with `PLAN.md`, pass at least `--proof`. |
@@ -145,31 +153,31 @@ When running from source (`bun src/loop.ts`), auto-update is disabled — use `g |
145 | 153 |
|
146 | 154 | ```bash |
147 | 155 | # use PLAN.md automatically |
148 | | -./loop --proof "Use X skill to verify your changes" |
| 156 | +./loop --proof "Use {skill} to verify your changes" |
149 | 157 |
|
150 | 158 | # two iteration, raw JSON/event output |
151 | | -./loop -m 2 --proof "Use X skill to verify your changes" "Implement feature X" --format raw |
| 159 | +./loop -m 2 --proof "Use {skill} to verify your changes" "Implement {feature}" --format raw |
152 | 160 |
|
153 | 161 | # plain text prompt: auto-creates PLAN.md, then runs from PLAN.md |
154 | | -./loop --proof "Use X skill to verify your changes" "Implement feature X" |
| 162 | +./loop --proof "Use {skill} to verify your changes" "Implement {feature}" |
155 | 163 |
|
156 | 164 | # run with claude |
157 | | -./loop --proof "Use X skill to verify your changes" --agent claude --prompt PLAN.md |
| 165 | +./loop --proof "Use {skill} to verify your changes" --agent claude --prompt PLAN.md |
158 | 166 |
|
159 | 167 | # run review with a single reviewer |
160 | | -./loop --proof "Use X skill to verify your changes" "Implement feature X" --review codex |
| 168 | +./loop --proof "Use {skill} to verify your changes" "Implement {feature}" --review codex |
161 | 169 |
|
162 | 170 | # run claudex reviewers when done (default behavior) |
163 | | -./loop --proof "Use X skill to verify your changes" "Implement feature X" --review claudex |
| 171 | +./loop --proof "Use {skill} to verify your changes" "Implement {feature}" --review claudex |
164 | 172 |
|
165 | 173 | # run in detached tmux session (good for SSH) |
166 | | -./loop --tmux --proof "Use X skill to verify your changes" "Implement feature X" |
| 174 | +./loop --tmux --proof "Use {skill} to verify your changes" "Implement {feature}" |
167 | 175 |
|
168 | 176 | # run in a fresh git worktree automatically |
169 | | -./loop --worktree --proof "Use X skill to verify your changes" "Implement feature X" |
| 177 | +./loop --worktree --proof "Use {skill} to verify your changes" "Implement {feature}" |
170 | 178 |
|
171 | 179 | # run in detached tmux session in a fresh git worktree automatically |
172 | | -./loop --tmux --worktree --proof "Use X skill to verify your changes" "Implement feature X" |
| 180 | +./loop --tmux --worktree --proof "Use {skill} to verify your changes" "Implement {feature}" |
173 | 181 | ``` |
174 | 182 |
|
175 | 183 | ## License |
|
0 commit comments