--json-schema
Enforces output validation against a specified JSON Schema once agent execution finishes in print mode.
Syntax
--json-schemaExample
Terminal
claude -p --json-schema '{"type":"object","properties":{...}}' "query"Progress will not be saved. This browser is blocking storage (often private browsing). You can still learn, but closing the tab loses your progress.
--json-schemaEnforces output validation against a specified JSON Schema once agent execution finishes in print mode.
--json-schemaclaude -p --json-schema '{"type":"object","properties":{...}}' "query"