A normal text snippet is a trade: you memorize a short trigger, the expander pastes a longer block of text you saved earlier. Type ;addr, get your mailing address. The text is fixed. You wrote it once, and the snippet just recalls it.
AI text snippets work the other way around. The input is the text you already wrote, and the snippet rewrites it. Select a clumsy sentence, tap a key, and it comes back fixed. Select a blunt email, tap a key, and it comes back polite. There's nothing stored ahead of time. The snippet is a transform, not a recall.
That difference is the whole point of this article, so it's worth being precise about it. Static expansion turns a short string into a longer string you defined. An AI text snippet takes whatever you selected and returns a changed version of it - grammar fixed, tone shifted, length cut. In ToolPiper, you select text in any app, tap the right Command key, and a language model running on your Mac replaces the selection with the rewrite. I use the grammar-fix one a few dozen times a day without thinking about it, which is the real test for this kind of feature - it has to be faster than the thing it replaces, or you go back to the old way.
What are AI text snippets?
AI text snippets are keyboard-triggered text transforms. You select text, press a trigger, and a language model rewrites the selection in place. Unlike static text expansion, which pastes pre-written text from an abbreviation, an AI snippet takes your selected text as input and returns a modified version - corrected grammar, a different tone, a shorter summary.
The mechanism is what separates them from both classic expanders and from a chat window. A classic expander like a stored ;sig signature has one job, which is to match a trigger and paste the saved text. It can't reason about what you wrote. A chat window can reason, but it lives in another app. You copy, switch, paste, prompt, copy the answer, switch back, then paste again. The AI snippet collapses that loop into one keystroke and keeps you in the document you're already editing.
The category name is new because the capability is new on the desktop. Apple's Writing Tools, Grammarly, and a handful of editor plugins all do versions of "rewrite what I selected," which tells you the demand is real. What's different here is where the model runs and how much of the trigger surface you control, which is the rest of this article.
Why does AI on selected text beat static expansion?
AI on selected text beats static expansion because the input is dynamic - the model reworks whatever you actually wrote, instead of recalling text you saved earlier. Static snippets can only insert fixed strings. An AI snippet can fix grammar, change tone, or summarize text it has never seen before.
Static expansion is great at exactly one thing, the text you type the same way every time. Your address. A boilerplate reply. A code template. For those, a stored snippet is faster and more reliable than any AI, and you should keep using it. We're not replacing that.
The gap shows up the moment the text changes. You can't pre-store "fix the grammar in this paragraph" because you don't know what the paragraph will say. You can't pre-store "make this email sound less annoyed" for every email. That's the work an AI snippet does - it reads the live selection and rewrites it. Static snippets recall what you saved. AI snippets rework what you just wrote. The two solve different problems, and a good setup uses both. Stored snippets handle the fixed stuff, AI snippets handle everything that's different every time.
Why does running it locally matter?
Running text transforms locally matters because the text you rewrite is often the text you'd least want to send to a server - draft emails, client notes, source code, half-finished arguments. With a local model, the transform runs on your Mac and the text never crosses the network, which you can confirm by watching network traffic while a snippet fires.
Think about what you actually reach for a rewrite on. It's rarely a grocery list. It's the reply to a difficult client, the bug writeup with the internal system names in it, the paragraph of a contract you're not sure reads right. Cloud rewrite tools take that exact text and POST it to a server you can't inspect. Their privacy policy might be excellent. The text still left your machine, and there's no way for you to audit what happened to it after it arrived.
ToolPiper's text AI runs on your Mac. The transform runs against a local LLM that ToolPiper hosts on the loopback interface, and the rewritten text comes back without a network call. That's not a promise in a policy document - it's an architectural fact you can check yourself with a packet inspector. The structural point is simple. A tool that does the work locally has nowhere to send your text, so the question of what a server does with it never comes up. This is the same local-first argument we make across the whole local-first AI on macOS series, applied to the text you select. Replace your rewrite stack with one native app - no cloud, no Docker, no Python, no API keys - and you can verify it yourself at localhost:9998.
How does the right-Command tap work?
You select text in any app, then press and release the right Command key in under 250 milliseconds. ToolPiper captures the selection, sends it to a transform (grammar fix by default), and replaces the selected text with the rewritten result. The tap is distinct from holding the key, which routes to voice capture instead - the choice is decided when you release.
The press-and-release timing is deliberate. A quick tap, under 250ms, is the snippet trigger. A longer hold routes to voice capture instead - the press timer starts the moment the key goes down, and the choice is decided on release. That gap is how the same physical key serves both jobs without one stepping on the other.
What happens on the tap is one local model call. The snippet's prompt is sent verbatim as the system message to a chat completion on ToolPiper's local engine - the same engine that serves your local chat, over the loopback interface on your Mac. Your prompt is never swapped for a canned one, and there's no cloud account or API key anywhere in the path. You can watch the request hit localhost yourself.
The selection is the only input. The action pipeline never reads your clipboard, so whatever you have copied stays untouched and out of the transform. If the selection is empty, the output comes back empty, or the selection is larger than 16,384 characters, ToolPiper refuses the transform and leaves your text alone rather than guessing.
What transforms ship by default?
ToolPiper ships 12 built-in transforms: ;fix, ;formal, ;casual, ;concise, ;expand, ;simplify, ;bullets, ;summary, ;tldr, ;active, ;email, and ;rewrite. Each takes your selected text and returns a rewritten version - corrected, retoned, restructured, or condensed - in place.
The defaults cover the rewrites people reach for most. ;fix corrects grammar and spelling. ;formal and ;casual shift tone in either direction. ;concise and ;expand change length. ;simplify drops jargon, ;active kills passive voice, ;bullets turns prose into a list, ;summary and ;tldr condense, ;email shapes a note into a sendable message, and ;rewrite is the general-purpose pass.
These aren't a fixed menu. Each one is a prompt plus a trigger, and you can edit them or add your own - your prompt, your trigger, run against your chosen local model. That's the line between this and the built-in rewrite menus on macOS. You define the transform, not the vendor.
Can you chain transforms together?
Yes. Writing two triggers like ";fix ;formal" runs them in document order - first the grammar fix, then the formal rewrite - up to a cap of 4 stages. If any stage returns empty output, the chain aborts and your original selection is preserved untouched.
Chaining is how you compose a transform you didn't pre-define. "Fix the grammar, then make it formal" is two passes, written as ;fix ;formal, run left to right. You can stack up to four stages, which is enough to fix, retone, and condense in a single trigger without building a custom prompt for that exact combination.
The abort behavior is the important part. If stage two comes back empty - the model returned nothing usable - the chain stops and your selection is restored to what it was before you tapped. A failed chain never leaves you with half-transformed or empty text. That's a deliberate fail-safe. A rewrite that can silently eat your paragraph is worse than no rewrite at all.
Can you trigger snippets by voice?
Yes. You can say "use the fix snippet" or speak the literal trigger, and ToolPiper runs that transform on your selected text. These explicit voice paths are deterministic single-model-call routes, the same as tapping the key.
Voice dispatch has two solid tiers today. The first is an explicit instruction - "use the fix snippet" - which names the transform directly. The second is a literal trigger or set voice phrase that maps one-to-one to a snippet. Both resolve to a single model call and behave exactly like the keystroke. If you've already got push-to-talk dictation set up, this is the same muscle. Hold to speak, and the snippet fires on what you selected.
The third tier is the chat fallback. When neither explicit tier matches - say, "translate this to Spanish then make it formal" - the transcript goes to the local chat engine with your snippet library registered as apply_<trigger> tools, and the model dispatches one or more transforms through the same executor the keystroke uses. One boundary worth knowing is that the tier-1 and tier-2 patterns are English-only, so non-English transcripts go straight to the tier-3 chat path.
How does it know when not to fire?
Before it captures a selection, ToolPiper checks the focused element's accessibility role and refuses secure or password fields. If accessibility permission is denied, it fails closed and does nothing - it never transforms text it can't confirm is safe.
A rewrite tool that fired inside your password manager would be a disaster, so the action pipeline checks first. It reads the accessibility role of whatever element has focus, and if that's a secure text field, it refuses. The check is fail-closed. If accessibility permission is missing, ToolPiper declines rather than risking a transform on a field it couldn't verify. Erring toward doing nothing is the right default for something that edits text in place.
Trigger matching is just as careful. A trigger only fires when it's flanked by whitespace, punctuation, or the edge of the selection, so ;fix never fires inside ;fixed. The same right Command key serves both jobs by timing - a sub-250ms tap fires the snippet path, a hold routes to voice capture - so the two paths can't grab the same keypress. The design goal across all of it is that the feature stays out of your way until you clearly ask for it.
How does it compare to other AI rewrite tools?
ToolPiper is the only one of these tools that lets you define your own prompts, chain transforms, and run a model of your choice fully on your Mac. Apple Writing Tools and Grammarly use fixed presets and route some or all text to a server, and Raycast AI lets you write commands but runs them in the cloud.
Several tools now rewrite selected text. The differences are about who controls the prompt, where the model runs, and how you invoke it - we go deeper on two of them in the Apple Writing Tools comparison and the Raycast alternative guide. Competitor pricing below is as of May 2026 and may have changed since.
What are the limits?
This is a transform tool, not a generator. AI text snippets rework text you've selected - they don't write a paragraph from a blank cursor. If you want the model to draft something from nothing, that's a chat task, not a snippet task. The snippet pipeline needs a non-empty selection to act on, by design.
Injection doesn't work everywhere. Most standard macOS text fields accept the replacement cleanly, but some Electron apps, terminal emulators, and apps with custom text rendering handle input in non-standard ways and may not take the injected result. When that happens the transform still ran - you just may need to paste manually rather than getting an in-place replace. It's the same constraint every accessibility-based text tool on macOS runs into, which is why tools like this ship outside the App Store sandbox in the first place.
Voice has a language boundary. Tier-1 and tier-2 voice dispatch - explicit instructions and literal triggers - are deterministic but English-only. Non-English transcripts fall through to the tier-3 chat fallback, which is flexible but no longer a single deterministic model call. And the secure-field check is reactive. It probes the focused field when you trigger, and it doesn't pre-scan every field on screen before you act.
Can you bring your existing snippet library with you?
Yes. ToolPiper imports snippet libraries from TextExpander (.textexpandersettings), Raycast (JSON), Alfred (.alfredsnippets), Espanso (YAML), Apple Text Replacements, and CSV or TSV - one file pick or one drag onto the Snippets pane, with the format detected from file content. Re-importing the same file creates zero duplicates.
AI transforms and static snippets share one storage and one editor, so the practical migration is: import the library you already have, then layer transforms on top. Competitor placeholders get one of three counted treatments - clipboard and cursor markers and simple date/time translate to ToolPiper's macro grammar, what can't translate is kept as literal text and counted, and the import summary names a reason for every snippet it skips. Nothing is silently dropped.
What doesn't come across: fill-in forms and script snippets are skipped with counted reasons rather than imported broken, and nested snippet references aren't inlined. The full walkthrough - all eight formats, the placeholder translation table, the 32 MB and 10,000-snippet caps - is in the local text expansion guide, and if you're weighing the switch itself, start with the TextExpander alternative comparison.
How do you set it up?
Download ToolPiper from modelpiper.com (DMG). It's a free download and requires macOS 26 or later on Apple Silicon (M1 or newer). ToolPiper isn't on the Mac App Store because the Accessibility and CGEvent APIs that read your selection and inject the rewrite are incompatible with the App Store sandbox - the same reason TextExpander, Raycast, Alfred, and Keyboard Maestro all ship outside it.
On first launch, grant Accessibility permission. That's what lets ToolPiper read the focused element's role (so it can refuse secure fields) and replace your selection with the rewrite. The 12 transforms work out of the box. Select some text, tap right Command, and the grammar fix runs. Edit the prompts or add your own triggers from settings when you want transforms specific to your work.
This is part of a series on local-first AI workflows on macOS and the text and clipboard workflow roundup. Next up: local text expansion on Mac - the static-snippet side of the same engine, dynamic dates, cursor placement, and importing your existing library.
