← 返回命令列表

Linux command

claude-pee 命令

文本

复制后可按需替换文件名、目录或参数。

常用示例

Run an interactive session

claude-pee

Example

claude-pee -p "[summarize this file]"

Example

claude-pee -p "[prompt]" --output-format json

Example

claude-pee -p "[prompt]" --output-format stream-json

Forward extra flags

claude-pee --model [opus] -p "[prompt]"

说明

claude-pee is a Rust front-end that wraps the official claude command-line tool. It spawns claude inside a pseudo-terminal (PTY), assigns a fresh --session-id (UUIDv4), forwards every other flag unchanged, optionally injects a one-shot prompt with -p, and then tails the matching session transcript JSONL file until the assistant's reply is complete. The wrapper exists so that programmatic scripts and CI pipelines can drive claude without being billed against its programmatic-usage credit pool, while still benefitting from the interactive session semantics. Output is collected and printed to stdout in plain text, JSON, or streaming JSON depending on --output-format. A sentinel file combined with claude's Stop hooks signals when the response has finished so the wrapper can exit cleanly instead of polling indefinitely.

参数

-p _prompt_
Inject a one-shot prompt and exit when the reply is complete. Without -p the wrapper hands the PTY back to the user for an interactive session.
--output-format _FORMAT_
Select output mode: text (default), json, or stream-json.
--session-id _ID_
Override the auto-generated UUIDv4 used to correlate the underlying claude transcript.

FAQ

What is the claude-pee command used for?

claude-pee is a Rust front-end that wraps the official claude command-line tool. It spawns claude inside a pseudo-terminal (PTY), assigns a fresh --session-id (UUIDv4), forwards every other flag unchanged, optionally injects a one-shot prompt with -p, and then tails the matching session transcript JSONL file until the assistant's reply is complete. The wrapper exists so that programmatic scripts and CI pipelines can drive claude without being billed against its programmatic-usage credit pool, while still benefitting from the interactive session semantics. Output is collected and printed to stdout in plain text, JSON, or streaming JSON depending on --output-format. A sentinel file combined with claude's Stop hooks signals when the response has finished so the wrapper can exit cleanly instead of polling indefinitely.

How do I run a basic claude-pee example?

Run `claude-pee` in a terminal, then adjust file names, paths, flags, or remote targets for your system.

What does -p _prompt_ do in claude-pee?

Inject a one-shot prompt and exit when the reply is complete. Without -p the wrapper hands the PTY back to the user for an interactive session.