Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Your CLI has a new user by Margaret Gu CNCF M...

Avatar for cncf-canada-meetups cncf-canada-meetups
September 30, 2026
1

Your CLI has a new user by Margaret Gu CNCF Montreal

CLIs were built for humans - colourful output, forgiving argument parsing, helpful error messages. Then LLM agents became users too, and the mismatch is immediate. Agents can't parse color codes, they need to know what commands exist before deciding what to do, and ambiguous output is one hallucinated flag away from a broken workflow.

Avatar for cncf-canada-meetups

cncf-canada-meetups

September 30, 2026

More Decks by cncf-canada-meetups

Transcript

  1. Why a CLI in the AI era Do not add

    a second interface the model has to guess at. • A CLI is a process: flags, help, exit code. • That is the same command a person already types. • Cloudflare: about half of Wrangler use is now agents. Learning: the agent is already using the CLI. Treat it like an API.
  2. In this talk • • • • • A wrong

    flag must not look like success. Read the command before you run it. The caller can see the problem. Stop a forbidden write before it is sent. These rules are better for a person too.
  3. A wrong flag must not look like success. A model

    writes indexes, with an es. Learning: a wrong flag must fail, and the error must name it.
  4. Help is JSON, from the same schema. What if the

    caller reads the help before it runs the command? Learning: help-as-JSON
  5. The caller can see the problem. Suppose an agent is

    asked to clean up a product catalog.
  6. Refuse the write before it hits the network. The task

    also said to fix those rows. Learning: trust no one
  7. No hanging prompt. The agent handed that command to a

    person. Learning: if nobody is there to answer, do not ask. Fail, or take --yes.
  8. If an agent will call your CLI A wrong flag

    must fail and name the flag. Seems obvious. Lots of CLIs used to drop it. An agent will not notice. • Machine-readable help is not a second help page. The flags the caller reads have to be the same list the CLI actually accepts. • Refuse a forbidden write before it hits the network. A 403 after send is too late. • If nobody is there to answer, do not ask. Fail, or take --yes. A hanging prompt is a stuck agent. •