Honestly? Don't think you don't need to rewrite your CLI.
The whole "raw JSON > flags" argument sounds clean in a blog but falls apart in practice. Agents are actually good at parsing messy human output. stderr, exit codes, even tables.
I run AI agents against CLIs every day. The failures are almost never, "the outpt wasn't structured enough." They're context window overflows, permission issues, and the agent confidently running the wrong command over and o ver.
The real insight here shouldn't be "rewrite for agents" — it's "make your CLI not actively hostile." --output json and non-zero exit codes on failure. That's should be it.
Maybe we are optimising the wrong layer..