Writing with Claude Code
Flywrite doesn't bundle its own AI. Instead, you run the real Claude Code (or Codex, Cursor Agent, or any CLI agent) in the built-in terminal, on your own subscription โ with your skills, your memory, and no extra AI fees from Flywrite.
Before you start
Install the agent you want to use โ for Claude Code, follow Anthropic's install guide. Once it runs in your computer's terminal, it runs in Flywrite.
The writing loop
- Open a terminal and launch Claude Code โ
โ2, or the + button in the terminal tab bar. - Select some text in your document. Claude Code automatically sees your selection and your open files โ no copying and pasting. (Cursor Agent can too, after its one-time setup โ see below.)
- Ask for what you want โ "tighten this paragraph," "draft an intro from these notes."
- Watch the edits land. The agent edits your files directly, and the editor updates live.
- Review and keep writing. You can hand-edit right alongside the agent.
Pointing the agent at your work
Most CLI agents, including Claude Code, Codex, and Cursor Agent, let you
@-mention a file right in your prompt (type @
and the file name). In Flywrite you often don't even need that: the app
tells the agent which file you're looking at, which line you're on, and which
text you've highlighted โ no pasting content into your prompt. Claude Code
gets this automatically. Cursor Agent gets it once you've run its one-time
setup in Settings → Agents (below), which connects it to
Flywrite's editor โ then ask about "this file" or "the selected paragraph"
and it just knows.
To hand off a selection explicitly, press โโงL โ
Send Selection to Terminal โ and Flywrite drops a reference
to it into the terminal for you. (These shortcuts are defaults โ all of them
are customizable.)
Your safety net
Flywrite automatically saves a checkpoint the moment an agent starts working, so you can always see exactly what changed โ and restore any earlier version if you don't like it. See Checkpoints & versions.
Know when it's done
A spinner on the terminal tab shows the agent is busy. Flywrite can also send a macOS notification when Claude Code, Codex, or Cursor Agent finishes a task in a Flywrite terminal — or, for Claude Code, stops to ask for your permission — and can play a sound with it. Each agent's notification switch lives on its page in Settings → Agents; the sound is in Settings → Notifications. Click the notification to jump straight back to that terminal.
Setting up each agent
Settings → Agents has a page for each agent — Claude Code, Codex, and Cursor Agent — with its terminal shortcut, its notification switch, and its one-time Flywrite setup. The setup lives in the agent's own config, and the agent applies it for you: click Set up with… and a terminal opens where the agent adds the entries while you watch and approve the edit — Flywrite never edits those files itself. Preview prompt shows the exact prompt the agent is given, and Copy prompt lets you paste it into a session you already have open instead. Once installed, the same buttons offer to remove it again. Setup takes effect in new agent sessions, and everything it installs does nothing in terminals outside Flywrite.
- Claude Code — hooks that tell Flywrite when a task finishes or Claude is waiting on you. (Claude Code sees your file and selection automatically, with no setup.)
- Codex — a notify setting that tells Flywrite when a task finishes.
- Cursor Agent — a stop hook that tells Flywrite when a task finishes, plus Flywrite's MCP server so Cursor Agent can see the file and lines you have open. The first time a session uses it, Cursor asks you to approve the Flywrite server and its tool.
Agents can tune Flywrite, too
Your app settings are editable as files, so your agent can manage them for you. Open the Settings project (Settings โ Edit settings file (JSON)), launch Claude Code in its terminal, and ask โ "switch me to a warmer theme," "make the code font bigger." Changes apply live as the agent works, and the automatic checkpoint means anything can be rolled back. Details in Appearance & themes.