A CLI agent is an AI agent you start from the command line in a folder, where it reads and edits the files and runs commands for you, instead of answering in a chat window you copy from.
Examples
- Claude Code, from Anthropic.
- The Codex CLI, from OpenAI.
- Cursor Agent, which Cursor's CLI runs in any terminal.
- Gemini CLI, from Google, and OpenCode, which describe themselves as agents for the terminal.
How it changes the work
A CLI agent works where your files are. Ask it to tighten an intro, split a long draft into three or rename every heading in a folder, and it does it in the files, so you read the result in your draft instead of pasting it in. Most read a standing instruction file at the start, such as CLAUDE.md for Claude Code or AGENTS.md for Codex and others.
Because it edits files directly, it can also change more than you meant. Keep a way back: a checkpoint or a Git commit before it starts.
In Flywrite
If an agent runs in your Mac's terminal, it runs in Flywrite's terminal, under the page you're writing. Flywrite has launchers for Claude Code, Codex and Cursor Agent. Claude Code sees the open file, line and selection automatically, and Cursor Agent does after its one-time setup; for any agent, select text and press ⌘⇧L to send it to the terminal (how it works). Flywrite saves a checkpoint of the whole project when Claude Code starts in its terminal, and when Cursor Agent starts after its one-time setup. Codex and other CLI agents don't trigger it, so press ⌘⇧C before you start them. More in The terminal.
Questions
Do I need to know the terminal to use a CLI agent?
Very little. You install it with one command, start it with another, such as claude or codex, and from then on you ask in plain words.
How is a CLI agent different from a chatbot?
A chatbot answers in a window and you copy the result into your file. A CLI agent edits the file itself, so the change is already in your draft, and you need a way to undo it.
- Claude Code: Overview. Checked .
- OpenAI Codex docs: Codex CLI. Checked .
- Cursor CLI. Checked .
- Gemini CLI docs. Checked .
- OpenCode docs. Checked .
- Flywrite docs: The terminal. Checked .