Claude Code · Sessions and flags

Get machine-readable output

Return the result as JSON so scripts can parse it.

claude -p "list the TODOs" --output-format json

Official Claude Code documentation

More sessions and flags commands

All sessions and flags commands · Claude Code cheatsheet

Was this page helpful?