⌨️Non-Interactive Mode
Also known as Headless mode, claude -p, Print mode
Running Claude Code on one prompt, with no chat, then exiting.
Think of it like
It is like sending a note, not making a call. One note goes, one reply comes back.
Example
Jack adds one line to his build script. Each night, claude -p reads the test log and writes a short report of what failed.
Why it matters
Definition
Example code
bash
claude -p "list the TODOs in src/"Common mistake
Key takeaways
- 1One prompt. Then it exits.
- 2The -p flag. Short for print.
- 3For scripts. Pipes and CI.