Skip to the content.

Agent-Friendly CLIs

A plain-English guide for when you want Codex to use a command-line tool without the tool fighting back.


The short version

A CLI is the text-based way you talk to a program.

An agent-friendly CLI is one that is easy for Codex to use because it gives clear answers, predictable output, and commands that do one thing at a time.

If a normal person is reading that and thinking “so, a command window?”, yes. That.


Why this matters

Codex works better when the tool it is driving behaves nicely.

If the CLI is messy, vague, or full of surprise prompts, the agent has to guess more often.

If the CLI is clean and predictable, Codex can:


What a normal person should picture

Imagine telling someone:

That is much easier than making them navigate 14 menus and guess what happened.

Agent-friendly CLIs do the same thing for Codex:


What makes a CLI easier for Codex

If a command asks ten follow-up questions, Codex has to babysit it.


What to ask for

If you are using Codex to improve a CLI, ask for things like:

If you are using a CLI someone else built, look for the same qualities before handing it to Codex.


What not to worry about

You mostly need to know whether the tool is easy or painful to use.


A useful mental model

Think of it like this:

Codex likes the clipboard.


Plain-English summary

Agent-friendly CLIs are command-line tools that behave clearly enough for Codex to use them without confusion.

The goal is not to make the CLI “fancy.” The goal is to make it boring in the best possible way.


Source: OpenAI Codex use cases page, “Create a CLI Codex can use”