claw-code/rust/crates/rusty-claude-cli/src
YeonGyu-Kim 84b77ece4d fix(cli): pipe stdin to prompt when no args given (suppress REPL on pipe)
When stdin is not a terminal (pipe or redirect) and no prompt is given on
the command line, claw was starting the interactive REPL and printing the
startup banner, then consuming the pipe without sending anything to the API.

Fix: in parse_args, when rest.is_empty() and stdin is not a terminal, read
stdin synchronously and dispatch as CliAction::Prompt instead of Repl.
Empty pipe still falls through to Repl (interactive launch with no input).

Before: echo 'hello' | claw  -> startup banner + REPL start
After:  echo 'hello' | claw  -> dispatches as one-shot prompt

159 CLI tests pass, fmt clean.
2026-04-09 20:36:14 +09:00
..
init.rs Make .claw the only user-facing config namespace 2026-04-05 18:11:25 +00:00
input.rs Reduce REPL overhead for orchestration-heavy workflows 2026-04-02 07:19:14 +00:00
main.rs fix(cli): pipe stdin to prompt when no args given (suppress REPL on pipe) 2026-04-09 20:36:14 +09:00
render.rs feat: b5-context-compress — batch 5 wave 2 2026-04-07 15:19:45 +09:00