--output-format
Sets the format of the output in print mode to text, json, or stream-json.
Syntax
--output-formatExample
Terminal
claude -p "query" --output-format jsonProgress will not be saved. This browser is blocking storage (often private browsing). You can still learn, but closing the tab loses your progress.
--output-formatSets the format of the output in print mode to text, json, or stream-json.
--output-formatclaude -p "query" --output-format json