Your writing tools, in your terminal
Humanize, paraphrase, grammar-check and detect AI text without leaving the shell. Reads stdin, writes stdout, understands globs, and fails a build when content reads as machine-written.
npm install -g supwriter# Rewrite a draft and keep the pipeline going
cat draft.md | sw humanize > final.md
# A whole folder, three at a time
sw humanize 'drafts/*.md' --tone academic --out-dir humanized/
# Fix a README in place
sw grammar README.md --in-place --mode thorough
# How many credits are left?
sw balanceFour tools, one key
The same engines behind the app and the API, as commands.
sw humanize
Rewrite AI-generated text so it reads as naturally human-written. Tone, purpose and intensity are flags.
sw paraphrase
Reword while preserving meaning, in standard, formal, casual, academic or creative mode.
sw grammar
Fix grammar, spelling and punctuation — basic, thorough or style mode — in place or to a new file.
sw detect
Score text for AI authorship across 12 detectors, and fail the build when it scores too high.
Get started
Three steps. The API is available on the Pro and Ultra plans.
Install
Run npm install -g supwriter. Needs Node 20.10 or newer. You get two commands: sw and supwriter.
Sign in
Run sw login and paste an API key from Settings → API. It is stored owner-only and never printed back.
Pipe something through it
cat draft.md | sw humanize > final.md. Results go to stdout, so it composes with everything else you use.
npm install -g supwriter
sw login # or export SUPWRITER_API_KEY=sw_live_...
cat draft.md | sw humanizeNeed a key? Create one in Settings → API.
More than a wrapper around curl
Built for pipes
Results go to stdout and every status line, spinner and warning goes to stderr. Colour switches off automatically when output is redirected, so a pipe gets clean bytes, not escape codes.
Long documents just work
The API caps one request at your plan's word limit. The CLI splits longer documents on paragraph boundaries and reassembles them with the original spacing, so nothing between paragraphs is invented or dropped.
Whole folders at once
Pass a glob and it processes files in parallel, writing to a directory or rewriting them in place — with a summary of the words and credits it spent.
Honest exit codes
A distinct code per failure class: auth, plan, credits, rate limit, network. Scripts can branch on why something failed instead of parsing text.
Stop AI-sounding content at the pull request
sw detect turns a detection score into an exit code, so the check belongs in CI like any other.
# .github/workflows/content.yml
- run: npm install -g supwriter
- run: sw detect 'content/**/*.md' --max-score 30
env:
SUPWRITER_API_KEY: ${{ secrets.SUPWRITER_API_KEY }}Frequently asked
What do I need to use the SupWriter CLI?
Node.js 20.10 or newer and an API key from Settings → API, which is available on the Pro and Ultra plans. Install it with npm install -g supwriter, then run sw login.
How does the CLI handle documents longer than the word limit?
It splits them on paragraph boundaries, sends the pieces in order, and reassembles the result with the original spacing. AI detection is the exception: it is not split by default, because a score for a document is not the average of scores for its parts. Pass --chunk to opt in.
Can I use the CLI in CI?
Yes. Set SUPWRITER_API_KEY as a secret and skip sw login entirely. sw detect --max-score 30 exits non-zero when content scores above the threshold, which turns AI detection into a build gate.
Does the CLI cost credits?
Every call draws on the same word credits the web app uses, including AI detection, which is metered on the API. sw whoami and sw balance are free — they read your account without spending anything.
Where is my API key stored?
In ~/.supwriter/config.json, written owner-only (mode 0600) inside an owner-only directory. The key is verified before it is saved and is never printed in full anywhere in the CLI. You can also pass it as the SUPWRITER_API_KEY environment variable instead.
Prefer to build it yourself?
The CLI is a client for the same REST API you can call directly, and the same tools are available to your AI assistant over MCP.
