A writing app for the Mac

Let the AI rewritemark up the page.

You remain the author.

Margins puts an AI agent beside your document. It marks up the page like a good editor would, and every change waits for your call.

Why not just use chat?

Ever tried to write a doc in a chat window?

You ask for a draft and get one. You ask for a summary at the top and get the whole thing back, slightly different. Three turns later the good intro is gone and you're scrolling up to find it. The document ends up spread across a dozen replies, and the only way to change anything is another prompt.

A chat window churning

Write a design note on rate limiting for our API
Sure! Here's a design note:
Add a summary at the top
Here's the updated note:
Good, but put the old approach section back
Apologies! Here's the full note again:
wait, it rewrote the whole thing?
which one had the good intro?

Margins calm

Design Note: Rate Limiting.margins

Design Note: Rate Limiting

v6 · add summary at top · agent

Summary. Per-key token-bucket limits at the gateway; 429 with Retry-After.

Problem Our public REST API has no limits. One client can exhaust database connections for everyone.

Approach We'll probably add limiting somewhere. Redis-backed token bucket per API key: 100/min, bursts to 200.

Rollout Shadow mode for a week, then enforce for new keys first.

②Add a summary at the top

1 pending

The actual app

Here's a real session.

An unretouched window. I asked the agent to visualize the performance comparisons in a review I was writing. The chart came back as one pending change, waiting on me.

The Margins window reviewing a document titled “RTX Spark vs. MacBook Pro: a narrow case for local AI”. On the left, the Instructions pane shows the request “visualize the performance comparisons” with the agent’s Run command steps, two follow-up notes, and Accept these and Reject buttons. In the document, the original prompt is struck through in red and a new green section, “Performance at a glance”, adds a bar chart and a table. Small accept, reject and discuss buttons sit beside the change, and a review bar across the top lists keyboard shortcuts next to Reject all and Accept all.

Hover or tab through the parts

How it works

The rules it plays by

One document, always current.

There's one page and it's always the latest version. Each instruction you give ("draft", "tighten", "add an example here") is applied to that page. Select some text first if you want to aim at a particular passage.

Edits arrive as suggestions.

Additions in green, deletions struck through, grouped under the instruction that caused them. Accept one, everything from an instruction, a handful you pick, or the lot. J, K, A and R work from the keyboard.

Nothing changes until you say so.

The agent's edits wait for you. The one exception is the first draft of an empty page, since there's nothing there yet to protect.

You can still just type.

Fix a typo yourself. Tell one change to be shorter and leave the rest alone. Highlight a paragraph and press ⌘J to ask about it in a thread off to the side.

Every version has a label.

"add summary at top", "accepted 3 changes", "edited §Approach". History records who made each change and why, and you can preview or restore any of them.

Bring your own AI.

Margins runs the official Copilot, Codex and Claude command-line tools on the plan you already pay for. Your documents are ordinary files in ~/Documents: a .margins file and a plain .md copy.

Under the hood

There's a proper agent behind the page.

It can search the web, fetch pages, read files and, if you allow it, run commands. You watch it work on the instruction card instead of in a transcript. Point a document at a project folder and say "implement this", and it will edit the code too. Whatever it ends up doing, the changes to your document still arrive as suggestions.

Research
③ make the approach concrete: numbers, not maybes✓web_search "token bucket vs sliding window"✓fetch docs.stripe.com/rate-limits✓read gateway/config.yaml?run `go test ./limiter/...`✓plan: 2 edits · "concrete limits"→2 pending changes

Bring your own subscription

Uses the AI plan you already have.

NameCommandNote
Copilotcopilot --acpEvery model your plan includes.
ChatGPTcodex execPlus, Pro or Team, via Codex.
Claudeclaude -pPro or Max, via Claude Code.
Local/v1/chat/completionsOllama, LM Studio, any compatible server.

Copilot, Codex and Claude Code handle their own sign-in. For an HTTP endpoint, Margins stores an optional API key in the macOS Keychain.

Got a draft that needs work?

Download Margins, give it an instruction, and start marking up what comes back.

macOS 14 Sonoma or later · Apple silicon