<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: flypod</title>
    <description>The latest articles on DEV Community by flypod (@flypod).</description>
    <link>https://dev.to/flypod</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4265099%2F11c45e7f-0307-4a98-b94e-27ee47af2d5c.png</url>
      <title>DEV Community: flypod</title>
      <link>https://dev.to/flypod</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/flypod"/>
    <language>en</language>
    <item>
      <title>Your CLI's next user is an AI agent. Design for it.</title>
      <dc:creator>flypod</dc:creator>
      <pubDate>Thu, 26 Nov 2026 01:09:11 +0000</pubDate>
      <link>https://dev.to/flypod/your-clis-next-user-is-an-ai-agent-design-for-it-24n6</link>
      <guid>https://dev.to/flypod/your-clis-next-user-is-an-ai-agent-design-for-it-24n6</guid>
      <description>&lt;p&gt;&lt;em&gt;Originally published on the &lt;a href="https://flypod.dev/blog/your-cli-next-user-is-an-ai-agent?utm_source=devto&amp;amp;utm_medium=article&amp;amp;utm_campaign=daily-content&amp;amp;utm_content=20261203-cli-for-agents" rel="noopener noreferrer"&gt;flypod blog&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Most of the people installing our CLI aren't people.&lt;/p&gt;

&lt;p&gt;We make flypod, a small command that puts whatever you made online as a link someone else can open: a website, a Markdown doc, a slide deck, a page of charts. We built it for developers at a terminal. Then we looked at who was actually running it. Over the last month, more than nine in ten new installs came from a coding agent. In almost every one of those projects, nothing mentioned flypod: no rules file, no &lt;a href="https://agents.md" rel="noopener noreferrer"&gt;AGENTS.md&lt;/a&gt;, no &lt;a href="https://agentskills.io" rel="noopener noreferrer"&gt;Agent Skill&lt;/a&gt;. The agent found the tool, ran it, read the output, and handed a link to a person.&lt;/p&gt;

&lt;p&gt;That changes who you are designing for. Our most frequent user can't see a spinner, doesn't read the docs first, and will never open an issue. When the CLI confuses it, it doesn't complain. It guesses, and then tells a person something wrong with total confidence.&lt;/p&gt;

&lt;p&gt;So we started designing for the agent first. Here are the seven changes that came out of it, each with the failure it fixes. None of them needs a framework, and most fit in an afternoon.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The seven, in short:&lt;/strong&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Treat &lt;code&gt;--json&lt;/code&gt; output as an API: one line on stdout, nothing else, even on a crash.&lt;/li&gt;
&lt;li&gt;Give every failure a fixed &lt;code&gt;code&lt;/code&gt;, and make the exit code follow it.&lt;/li&gt;
&lt;li&gt;Put the next command in the error, as &lt;code&gt;fix&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;Start every warning by saying the command worked.&lt;/li&gt;
&lt;li&gt;When a credential is refused, fail. Never fall back.&lt;/li&gt;
&lt;li&gt;Read which agent is calling from its environment, as one word.&lt;/li&gt;
&lt;li&gt;Give the agent a way to remember your tool next session.&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  1. The output is an API, so treat it like one
&lt;/h2&gt;

&lt;p&gt;Every command takes &lt;code&gt;--json&lt;/code&gt;. Under it, success and failure are both &lt;strong&gt;one line of JSON on stdout and nothing on stderr&lt;/strong&gt;. No spinners, no colours, no "Uploading..." line for an agent to strip.&lt;/p&gt;

&lt;p&gt;None of this is new advice. The &lt;a href="https://clig.dev/#output" rel="noopener noreferrer"&gt;Command Line Interface Guidelines&lt;/a&gt; already say "Display output as formatted JSON if &lt;code&gt;--json&lt;/code&gt; is passed" and "If &lt;code&gt;stdout&lt;/code&gt; is not an interactive terminal, don’t display any animations." For a person those are good manners. For an agent they decide whether it can read your answer at all.&lt;/p&gt;

&lt;p&gt;A real failure, from an empty folder:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="nl"&gt;"ok"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="kc"&gt;false&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="nl"&gt;"code"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="s2"&gt;"no_build_dir"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="nl"&gt;"error"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="s2"&gt;"No build output folder found."&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="nl"&gt;"fix"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="s2"&gt;"Looked for dist, build, out, … (each must contain an index.html). Pass the folder explicitly, e.g. `npx flypod ./dist`."&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The rule we hold ourselves to: no command may print prose to stdout under &lt;code&gt;--json&lt;/code&gt;, ever, including when it crashes. Tests run every verb with a mistyped flag and expect a clean &lt;code&gt;unknown_flag&lt;/code&gt; failure, not a crash. An agent that gets half JSON and half stack trace guesses, and agents guess badly and confidently.&lt;/p&gt;

&lt;h2&gt;
  
  
  2. Agents branch on a code, not on a message
&lt;/h2&gt;

&lt;p&gt;&lt;code&gt;error&lt;/code&gt; is for the person reading the transcript. &lt;code&gt;code&lt;/code&gt; is for the agent: a fixed word like &lt;code&gt;no_build_dir&lt;/code&gt;, &lt;code&gt;token_rejected&lt;/code&gt; or &lt;code&gt;quota_exceeded&lt;/code&gt;. We can reword every message without breaking a single agent, because nothing should ever match on the wording.&lt;/p&gt;

&lt;p&gt;The exit code follows the error code, never the place it was raised:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Exit&lt;/th&gt;
&lt;th&gt;Means&lt;/th&gt;
&lt;th&gt;What the agent should do&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;0&lt;/td&gt;
&lt;td&gt;worked&lt;/td&gt;
&lt;td&gt;carry on&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;1&lt;/td&gt;
&lt;td&gt;a problem it can act on&lt;/td&gt;
&lt;td&gt;read &lt;code&gt;fix&lt;/code&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;2&lt;/td&gt;
&lt;td&gt;the command line is wrong&lt;/td&gt;
&lt;td&gt;change the command&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;3&lt;/td&gt;
&lt;td&gt;auth&lt;/td&gt;
&lt;td&gt;ask the person to sign in&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;4&lt;/td&gt;
&lt;td&gt;retryable&lt;/td&gt;
&lt;td&gt;wait and run it again&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;That last row matters most. An agent that sees &lt;code&gt;4&lt;/code&gt; retries. An agent that sees &lt;code&gt;1&lt;/code&gt; for a rate limit "fixes" something that was never broken.&lt;/p&gt;

&lt;h2&gt;
  
  
  3. Every error carries its fix
&lt;/h2&gt;

&lt;p&gt;&lt;code&gt;fix&lt;/code&gt; is the next command, written out. &lt;code&gt;no_build_dir&lt;/code&gt; lists the folders it looked in and tells you to pass yours. An unknown flag names the closest real one. And when a command needs a sign-in, &lt;code&gt;flypod login --json&lt;/code&gt; prints the sign-in URL and code as JSON, so the agent hands the link to the person instead of hanging on a browser it does not have.&lt;/p&gt;

&lt;p&gt;The test we apply: could an agent recover from this error with no documentation, using only the JSON? If not, the error is not finished.&lt;/p&gt;

&lt;h2&gt;
  
  
  4. Warnings say "don't redo this"
&lt;/h2&gt;

&lt;p&gt;Agents are eager. Tell one "warning: X" and it often runs the whole thing again to make the warning go away.&lt;/p&gt;

&lt;p&gt;So every note on a successful deploy starts by saying the deploy worked. For example, an update to a temporary site in its last three days now returns:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;link-expiring: This deploy worked; do not redo it. This is a temporary site and updates do not extend it: the link stops working in 2 days (2026-11-27 UTC). Tell the person. To keep it, run `flypod login` (free): the site becomes theirs and never expires.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;We added that one this week, from a number: of the installs that pushed an update into a site's final three days last month, only about one in eight signed in to keep it. The person usually found out when the link died. The agent knew the expiry date the whole time; it just had no reason to mention it.&lt;/p&gt;

&lt;h2&gt;
  
  
  5. Never downgrade silently
&lt;/h2&gt;

&lt;p&gt;If a command is sent with a credential and the credential is refused, it fails with &lt;code&gt;token_rejected&lt;/code&gt;. It does not quietly fall back to deploying anonymously.&lt;/p&gt;

&lt;p&gt;A person would notice the difference. An agent would not: it would get a perfectly good link to a temporary site that nobody owns, report success, and the site would expire two weeks later. A loud failure costs one retry. A silent fallback costs the person's work.&lt;/p&gt;

&lt;h2&gt;
  
  
  6. Know which agent is calling (without spying on it)
&lt;/h2&gt;

&lt;p&gt;Most coding agents announce themselves in the environment of the commands they run: Claude Code sets &lt;code&gt;CLAUDECODE&lt;/code&gt;, Cursor's agent sets &lt;code&gt;CURSOR_AGENT&lt;/code&gt;, Codex sets &lt;code&gt;CODEX_SANDBOX&lt;/code&gt;, Gemini CLI sets &lt;code&gt;GEMINI_CLI&lt;/code&gt;, and newer tools use the &lt;code&gt;AI_AGENT&lt;/code&gt; convention. We read those and reduce them to one word, &lt;code&gt;claude_code&lt;/code&gt;, &lt;code&gt;cursor&lt;/code&gt;, &lt;code&gt;codex&lt;/code&gt;, and so on. The value itself is never sent.&lt;/p&gt;

&lt;p&gt;We deliberately ignore variables that are set in every terminal of an editor, like &lt;code&gt;TERM_PROGRAM&lt;/code&gt;. Otherwise a person typing in the editor's terminal reads as an agent, and the numbers lie.&lt;/p&gt;

&lt;p&gt;That one word is how we know the nine-in-ten figure above. It is also how we found that one agent finds flypod constantly and others almost never, which told us where to spend the next month.&lt;/p&gt;

&lt;h2&gt;
  
  
  7. Help the agent remember you
&lt;/h2&gt;

&lt;p&gt;An agent that found your tool today starts tomorrow's session with no memory of it. So the first deploy from a new machine, run by an agent, in a project where nothing names flypod, gets one optional note:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;remember-flypod: Optional: ask the person whether to run `npx flypod install skill --yes`, which adds flypod's skill to this project so the next session starts with it. Nothing needs redoing.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;It is shown once per install, never to a person typing, and it asks the agent to ask the person, because it adds files to their project.&lt;/p&gt;

&lt;h2&gt;
  
  
  What should a CLI do for AI agents?
&lt;/h2&gt;

&lt;p&gt;Assume an agent will run it before a person does. Then:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;--json&lt;/code&gt; everywhere, one line, stdout only, including on crash.&lt;/li&gt;
&lt;li&gt;A stable &lt;code&gt;code&lt;/code&gt; on every failure, and exit codes that follow it.&lt;/li&gt;
&lt;li&gt;A &lt;code&gt;fix&lt;/code&gt; that is the literal next command.&lt;/li&gt;
&lt;li&gt;Notes that say "this worked" before they say anything else.&lt;/li&gt;
&lt;li&gt;Fail loudly instead of falling back.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;None of this makes the human experience worse. The default output is still a short, readable receipt. The agent just gets its own door.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;This article was created with the help of AI. Every number, quote and code sample in it was checked against flypod's code, its real command output and its own analytics before publishing.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>ai</category>
      <category>cli</category>
      <category>devtools</category>
      <category>webdev</category>
    </item>
  </channel>
</rss>
