CLI commands and flags

--output-format

Sets the format of the output in print mode to text, json, or stream-json.

Syntax

--output-format

Example

Terminal
claude -p "query" --output-format json

Type to search the reference, templates and lessons.