--output-format
Claude CodeDefinition
A Claude Code CLI flag that controls the response format. Values: 'text' (default, plain text), 'json' (structured JSON), 'stream-json' (streaming JSON events). Use with --json-schema to guarantee output matches a specific schema. Critical for CI/CD pipeline integration.
Example Usage
claude -p 'Analyze dependencies' --output-format json --json-schema ./schema.json to get machine-parseable output in pipelines.