macOS · command line · free & MIT

Copy from the terminal.
Paste it clean.

Undoes what the terminal did to your text. Code passes through untouched.

$ npm install --global cleancopy-cli
macOS 12+ · Node 22+ · Apple Silicon & Intel · nothing leaves your machine
⌘C copied from iTerm2
    The deploy failed because the staging
    config was missing a required key, and
    the same key is absent in production,
    so the fix needs to land in both
    places before Friday.
 

Don't take our word for it

Edit the left pane.

% pbpaste — what the terminal gave you
% cleancopy clean — what you paste
The deploy failed because the staging config was missing a required key, and the same key turns out to be absent in production too, so the fix needs to land in both places before Friday.

$ kubectl get pods
NAME             READY   STATUS
api-7d9c4b       1/1     Running
worker-5f8d2a    0/1     CrashLoopBackOff

Next steps:
- roll the config change out to staging and verify the worker restarts cleanly
- backport the key to the production chart
--explain

Three kinds of terminal dirt.

····The deploy failed
····because the staging
····config was missing
Stray indentation
The shared left margin every line carries.
The fix needs to land
in both places
before Friday.
Broken line wraps
Sentences chopped at the window width.
Deploy⟨ZWSP⟩ when ready⟨NBSP⟩
restart the worker⟨ESC[0m⟩
then verify⟨BOM⟩
Invisible characters
Zero-widths, BOMs, ANSI escape codes.

Code, tables, JSON, logs — never touched. When unsure, it does nothing. full list →

Works with
TerminaliTerm2GhosttyWarpAlacrittykittyWezTermHyperTermius + common variants
How it works
01
copy
From any supported terminal.
02
detect
Each block judged: prose, code, or unsure.
03
paste
Already clean. Code untouched.
the full pipeline →

Nothing leaves your machine. Ever.

No disk writes. No password-manager items. No network. Everything runs locally.

learn more in the docs →

Fair questions

Will it mangle my code?+

No — that's the whole design. The cost of mistakes is asymmetric, so the classifier is biased hard toward caution: code, tables, traces, and data pass through verbatim, and anything uncertain is left exactly as it was.

Which terminals are supported?+

Terminal, iTerm2, Alacritty, kitty, WezTerm, Warp, Hyper, Ghostty, Termius, and common variants. Add your own by bundle identifier: export CLEANCOPY_TERMINALS=com.example.my-terminal.

Does it work on Linux or Windows?+

No. The clipboard watcher relies on a native macOS helper, so the package refuses installation elsewhere rather than installing a command that cannot work. macOS 12+, Node.js 22+.

Maintainer
Kartik Saini
Kartik Saini
Copies from the terminal a lot. Got tired of fixing the paste by hand, so the paste fixes itself now.
issues and fixtures welcome — real-world terminal output makes the engine safer