Skip to content

Commit 5e7bb8b

Browse files
NiveditJainclaude
andauthored
[luv-22] Stream tool calls in -nit mode via stream-json (#22)
* [luv-22] Stream tool calls in -nit mode via stream-json claude -p only prints the final result by default, so -nit hid every tool call and intermediate turn. Switch the non-interactive invocation to --output-format stream-json --verbose --include-partial-messages so each event surfaces on stdout as it happens. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com> * Bump to 0.0.16 and document -nit stream-json output Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.7 <noreply@anthropic.com>
1 parent ca7500f commit 5e7bb8b

3 files changed

Lines changed: 4 additions & 3 deletions

File tree

‎README.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ All workspaces live under `~/prs/`. The number comes from the repo's GitHub issu
7272
| `-n` | Navigate: open a shell instead of Claude |
7373
| `-r` | Resume: resume the last Claude session |
7474
| `-p` | Launch Claude in plan permission mode (default: `bypassPermissions`) |
75-
| `-nit` | Non-interactive: run `claude -p <prompt>` and exit (no REPL) |
75+
| `-nit` | Non-interactive: run `claude -p <prompt>` and exit (no REPL); streams `stream-json` events to stdout |
7676
| `-e` | Env: pass `LUV_*` environment variables (with prefix stripped) into the session |
7777
| `-f`, `--force` | Skip safety checks (with `--clean`) |
7878

‎luv/__init__.py‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -363,7 +363,8 @@ def launch(clone_dir: Path, prompt: str | None, plan_mode: bool = False,
363363
if non_interactive:
364364
if not prompt:
365365
die("-nit requires a prompt")
366-
mode_flags = []
366+
mode_flags = ["--output-format", "stream-json",
367+
"--verbose", "--include-partial-messages"]
367368
initial_args = ["-p", prompt]
368369
elif plan_mode:
369370
mode_flags = ["--permission-mode", "plan"]

‎pyproject.toml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
44

55
[project]
66
name = "luv-cli"
7-
version = "0.0.15"
7+
version = "0.0.16"
88
description = "Launch Claude Code agents on GitHub repos with isolated workspaces and optional Docker dev environments"
99
requires-python = ">=3.10"
1010
license = "MIT"

0 commit comments

Comments
 (0)