Emit the CLI command structure as machine-readable JSON. Designed for coding agents and scripts that need to discover flags and subcommands without parsing --help output.
# Describe the full CLI (root + all subcommands)lazyworktreedescribe
lazyworktreedescribe--all
# Describe a specific commandlazyworktreedescribecreate
lazyworktreedescribelist
# Describe a nested subcommandlazyworktreedescribenoteshow
# Pipe to jq for targeted querieslazyworktreedescribecreate|jq'.flags[].name'lazyworktreedescribecreate|jq'.flags[] | select(.name == "json")'lazyworktreedescribenoteshow|jq'.flags[].name'
{"name":"create","usage":"Create a new worktree","args_usage":"[worktree-name]","flags":[{"name":"from-branch","aliases":["branch"],"usage":"Create worktree from branch (defaults to current branch)","type":"string"},{"name":"json","usage":"Output result as JSON","type":"bool"}],"subcommands":[]}
--json flags — machine-readable output from mutating commands
--help — human-readable fallback (do not parse programmatically)
# Discover all flags for create before invoking itlazyworktreedescribecreate|jq'.flags[] | {name, type, usage}'# Check if a flag existslazyworktreedescribelist|jq'.flags[] | select(.name == "no-agent")'