duet-cli 0.2.7__tar.gz → 0.2.9__tar.gz

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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: duet-cli
3
- Version: 0.2.7
3
+ Version: 0.2.9
4
4
  Summary: Two CLI agents in conversation. One Python file. Stdlib only.
5
5
  Author: Volkan Altan
6
6
  License-Expression: MIT
@@ -29,6 +29,8 @@ also supported, and you can pair two agents from the same backend. One agent
29
29
  plans or reviews while the other implements; each keeps its own session memory
30
30
  across turns, and every run leaves a transcript you can inspect.
31
31
 
32
+ ![duet — how it works, in 40 seconds](./docs/assets/duet-deck.gif?raw=true)
33
+
32
34
  ## Use it four ways
33
35
 
34
36
  ### 1. Inside Claude Code — `/duet`
@@ -45,7 +47,9 @@ Plain `/duet` runs Claude Code's real `/review`, then loops Codex and Claude in
45
47
  a worktree until they converge. Pass any upstream command as the kickoff:
46
48
  `/duet 'npm test 2>&1' --turns 4`. The plugin shells out to the `duet` CLI, so
47
49
  install that first (see below) and make sure `command -v duet` passes in Claude
48
- Code's shell. Full guide:
50
+ Code's shell. Custom topology flags such as `--no-worktree` and
51
+ `--allow-worktree-fallback` replace the plugin defaults without emitting
52
+ conflicting CLI flags. Full guide:
49
53
  [docs/CLAUDE_CODE_PLUGIN.md](https://github.com/volkan/duet/blob/main/docs/CLAUDE_CODE_PLUGIN.md).
50
54
  If Claude Code disambiguates plugin commands with namespaces, `/duet:duet` is
51
55
  the same command.
@@ -107,7 +111,8 @@ non-interactively). Like the other plugins it shells out to the `duet` CLI, so
107
111
  install that first and make sure `command -v duet` passes in OpenCode's shell.
108
112
  The command runs on OpenCode's `build` agent; plain `/duet` runs the same
109
113
  `claude -p /review` kickoff, and `/duet 'npm test 2>&1' --turns 4` seeds from
110
- any command. Full guide:
114
+ any command. Custom worktree overrides are constructed conditionally, matching
115
+ the Claude and Codex entry points. Full guide:
111
116
  [docs/OPENCODE_PLUGIN.md](https://github.com/volkan/duet/blob/main/docs/OPENCODE_PLUGIN.md).
112
117
  (duet can also drive OpenCode as a backend — `--partner opencode:coder` — so
113
118
  OpenCode can be one of the two looped agents too.)
@@ -153,9 +158,24 @@ duet --task "Review the latest commit; fix only what the reviewer requests." \
153
158
  `/review`, a test run, or any command:
154
159
 
155
160
  ```bash
156
- duet --task-from-cmd 'claude -p /review' \
157
- --lead claude:reviewer --partner codex:coder \
158
- --worktree --recap --cwd ~/workspace/project --turns 6
161
+ duet --recipe review --cwd ~/workspace/project
162
+ ```
163
+
164
+ The review recipe uses recap mode, `claude:reviewer` + `codex:coder`, six
165
+ turns, `claude -p /review`, and strict worktree isolation. Explicit flags
166
+ override recipe values.
167
+
168
+ **Deterministic automation** — discover the run without parsing terminal prose,
169
+ then poll the curated status schema:
170
+
171
+ ```bash
172
+ control_dir=$(mktemp -d)
173
+ duet --recipe review --run-info-file "$control_dir/run.json" &
174
+ duet_pid=$!
175
+ while [ ! -s "$control_dir/run.json" ]; do sleep 0.1; done
176
+ run_dir=$(python3 -c 'import json,sys; print(json.load(open(sys.argv[1]))["run_dir"])' "$control_dir/run.json")
177
+ duet --status "$run_dir" --json
178
+ wait "$duet_pid"
159
179
  ```
160
180
 
161
181
  **Deep planner, fast coder** — Claude plans at high effort while Codex coder
@@ -205,7 +225,8 @@ stop, duet opens a `force>` prompt so you can push another round.
205
225
 
206
226
  Every run writes a directory with `transcript.md`, `state.json`, per-turn
207
227
  stderr logs, and the `wt/` worktree when `--worktree` is on. Inspect a run with
208
- `duet --status <run-id>`, list runs with `duet --list`, and start a fresh run
228
+ `duet --status <run-id> --json` (or omit `--json` for the human view), list runs
229
+ with `duet --list`, and start a fresh run
209
230
  from saved state with `duet --continue <run> --task "next thing"`.
210
231
 
211
232
  - **Backends:** `claude`, `codex`, `gemini`, `copilot`, `opencode`
@@ -8,6 +8,8 @@ also supported, and you can pair two agents from the same backend. One agent
8
8
  plans or reviews while the other implements; each keeps its own session memory
9
9
  across turns, and every run leaves a transcript you can inspect.
10
10
 
11
+ ![duet — how it works, in 40 seconds](./docs/assets/duet-deck.gif?raw=true)
12
+
11
13
  ## Use it four ways
12
14
 
13
15
  ### 1. Inside Claude Code — `/duet`
@@ -24,7 +26,9 @@ Plain `/duet` runs Claude Code's real `/review`, then loops Codex and Claude in
24
26
  a worktree until they converge. Pass any upstream command as the kickoff:
25
27
  `/duet 'npm test 2>&1' --turns 4`. The plugin shells out to the `duet` CLI, so
26
28
  install that first (see below) and make sure `command -v duet` passes in Claude
27
- Code's shell. Full guide:
29
+ Code's shell. Custom topology flags such as `--no-worktree` and
30
+ `--allow-worktree-fallback` replace the plugin defaults without emitting
31
+ conflicting CLI flags. Full guide:
28
32
  [docs/CLAUDE_CODE_PLUGIN.md](https://github.com/volkan/duet/blob/main/docs/CLAUDE_CODE_PLUGIN.md).
29
33
  If Claude Code disambiguates plugin commands with namespaces, `/duet:duet` is
30
34
  the same command.
@@ -86,7 +90,8 @@ non-interactively). Like the other plugins it shells out to the `duet` CLI, so
86
90
  install that first and make sure `command -v duet` passes in OpenCode's shell.
87
91
  The command runs on OpenCode's `build` agent; plain `/duet` runs the same
88
92
  `claude -p /review` kickoff, and `/duet 'npm test 2>&1' --turns 4` seeds from
89
- any command. Full guide:
93
+ any command. Custom worktree overrides are constructed conditionally, matching
94
+ the Claude and Codex entry points. Full guide:
90
95
  [docs/OPENCODE_PLUGIN.md](https://github.com/volkan/duet/blob/main/docs/OPENCODE_PLUGIN.md).
91
96
  (duet can also drive OpenCode as a backend — `--partner opencode:coder` — so
92
97
  OpenCode can be one of the two looped agents too.)
@@ -132,9 +137,24 @@ duet --task "Review the latest commit; fix only what the reviewer requests." \
132
137
  `/review`, a test run, or any command:
133
138
 
134
139
  ```bash
135
- duet --task-from-cmd 'claude -p /review' \
136
- --lead claude:reviewer --partner codex:coder \
137
- --worktree --recap --cwd ~/workspace/project --turns 6
140
+ duet --recipe review --cwd ~/workspace/project
141
+ ```
142
+
143
+ The review recipe uses recap mode, `claude:reviewer` + `codex:coder`, six
144
+ turns, `claude -p /review`, and strict worktree isolation. Explicit flags
145
+ override recipe values.
146
+
147
+ **Deterministic automation** — discover the run without parsing terminal prose,
148
+ then poll the curated status schema:
149
+
150
+ ```bash
151
+ control_dir=$(mktemp -d)
152
+ duet --recipe review --run-info-file "$control_dir/run.json" &
153
+ duet_pid=$!
154
+ while [ ! -s "$control_dir/run.json" ]; do sleep 0.1; done
155
+ run_dir=$(python3 -c 'import json,sys; print(json.load(open(sys.argv[1]))["run_dir"])' "$control_dir/run.json")
156
+ duet --status "$run_dir" --json
157
+ wait "$duet_pid"
138
158
  ```
139
159
 
140
160
  **Deep planner, fast coder** — Claude plans at high effort while Codex coder
@@ -184,7 +204,8 @@ stop, duet opens a `force>` prompt so you can push another round.
184
204
 
185
205
  Every run writes a directory with `transcript.md`, `state.json`, per-turn
186
206
  stderr logs, and the `wt/` worktree when `--worktree` is on. Inspect a run with
187
- `duet --status <run-id>`, list runs with `duet --list`, and start a fresh run
207
+ `duet --status <run-id> --json` (or omit `--json` for the human view), list runs
208
+ with `duet --list`, and start a fresh run
188
209
  from saved state with `duet --continue <run> --task "next thing"`.
189
210
 
190
211
  - **Backends:** `claude`, `codex`, `gemini`, `copilot`, `opencode`