Problem
The SKILL.md and references/commands.md prominently document a --json flag:
commands.md line 3: "All commands support --json for machine-readable output"
SKILL.md line 20: "Use --json when parsing output programmatically"
- Every command example in SKILL.md uses
--json
However, the --json flag is never defined in build_parser() and does not exist in the CLI. Running any command with --json produces an argparse error.
This is a broken API contract that affects all programmatic consumers, especially AI agents (Claude, Codex, OpenClaw) that rely on SKILL.md for tool usage.
Proposed Solution
Add a global --json flag to the top-level parser in build_parser():
parser.add_argument("--json", action="store_true", help="Output as JSON")
Then modify each cmd_* function to check args.json and output structured JSON instead of formatted text. The JSON output should include all data that the human-readable output shows.
Affected commands
plan show → JSON weekplan with days/recipes
search → JSON array of results with id, title, time, rating, url
recipe show → JSON recipe object
today → JSON array of today's recipes
shopping show → JSON shopping list
favorites show → JSON array of favorites
status → JSON status object
categories show → JSON categories map
Impact
- Severity: CRITICAL for AI agent integration
- Effort: Medium (each command needs a JSON code path)
Workaround
Currently none — programmatic consumers must parse the human-readable CLI output.
Problem
The
SKILL.mdandreferences/commands.mdprominently document a--jsonflag:commands.mdline 3: "All commands support--jsonfor machine-readable output"SKILL.mdline 20: "Use--jsonwhen parsing output programmatically"--jsonHowever, the
--jsonflag is never defined inbuild_parser()and does not exist in the CLI. Running any command with--jsonproduces an argparse error.This is a broken API contract that affects all programmatic consumers, especially AI agents (Claude, Codex, OpenClaw) that rely on
SKILL.mdfor tool usage.Proposed Solution
Add a global
--jsonflag to the top-level parser inbuild_parser():Then modify each
cmd_*function to checkargs.jsonand output structured JSON instead of formatted text. The JSON output should include all data that the human-readable output shows.Affected commands
plan show→ JSON weekplan with days/recipessearch→ JSON array of results with id, title, time, rating, urlrecipe show→ JSON recipe objecttoday→ JSON array of today's recipesshopping show→ JSON shopping listfavorites show→ JSON array of favoritesstatus→ JSON status objectcategories show→ JSON categories mapImpact
Workaround
Currently none — programmatic consumers must parse the human-readable CLI output.