Cleanss
How it worksFeaturesPricing
Buy nowDownload
Cleanss© 2026
DownloadFeaturesBlogFree toolsChangelogPrivacyTermsContact
← All posts

November 22, 2026 · 5 min read

Screenshot Terminal and iTerm output without leaking tokens

The key is rarely in the output you meant to show. It is in the scrollback, the prompt or the tab title. How to capture, annotate and blur terminal shots.

By Cleanss team

Account settings3 secrets hidden
Billing contact
[email protected]Email
Card on file
4242 4242 4242 4242Card number
Signing key
whsec_9fK2mQ7xLp41Zr8TbVAPI key

A terminal screenshot is the most dangerous screenshot a developer takes, and the reason is boring: the part you care about is three lines of output, and the frame around it is a log of everything you typed to get there.

For the full pre-share checklist, see How to share a screenshot without leaking anything.

This page covers Terminal and iTerm on Mac, though any shell has the same problem: what leaks, what to do before you press the shortcut, and how to capture, annotate, scan and export in Cleanss.

The key in the corner

You want to show that a deploy succeeded. The capture also includes:

  • The export API_KEY=... you ran earlier, still in the scrollback.
  • A curl with a bearer token in the header, two commands up.
  • The output of cat .env, which you ran to check a value.
  • The prompt, with your username and the machine's hostname.
  • The tab or window title, which usually shows the current directory or the running command.

None of that was the point of the screenshot, and all of it is readable. Guardsquare describes screenshotting a config file as a plausible leak path (Guardsquare). Resend's knowledge base lists a key pasted into a screenshot among common leak sources and puts revoking the key before everything else (Resend). A guide to the YouTube API puts it in one line: "if a key ends up in a commit, a screenshot, or a log file, treat it as compromised" (outlierkit).

The tool itself can be the leak too. A Tom's Guide forum thread describes a game key leaked through a screenshot tool's upload workflow (Tom's Guide forums). Cleanss has no upload or share-link feature; the image stays on your machine until you copy or save it.

Before you capture

  1. If a real key is on screen, decide now that you will rotate it afterwards. Tavily's order is revoke, regenerate, then update env files and secrets (Tavily).
  2. Clear the scrollback, then re-run only the command you want to show. In Terminal, Clear to start is ⌘K (Apple Support). In iTerm, Edit > Clear Buffer wipes the whole history, and Edit > Clear Scrollback Buffer clears the scrollback but keeps what is on screen (iTerm2 docs).
  3. Where a value has to appear, replace it first. One Hacker News commenter's method is to swap the real password for the word "password" and only then obscure it (Hacker News). Nothing under the blur is then worth recovering.
  4. Ask whether it should be a screenshot at all. GitHub's docs team tells writers to paste commands and output as text rather than screenshot a command-line interface (GitHub Docs). A screenshot is right for colour, layout or an exact moment.

Capture just the terminal

  1. Open the Cleanss editor from the menu bar icon, click Window capture at the top and pick the Terminal or iTerm window from the list. It is captured on its own at full native resolution.
  2. For a few lines rather than the whole window, press ⇧⌘1 on Mac, drag a region over them, and release.
  3. In the corner thumbnail, choose Edit.

Annotate

Terminal output is dense, so one mark is usually enough.

  1. Press H for Highlight and drag over the line that matters, or R for Box.
  2. Press A for Arrow if the reader needs a pointer from a label to a line. Drag either end to fine-tune it.
  3. For a sequence of commands, press N for Numbered steps and click them in order.
  4. Press T for Text and pick the Mono font, so a label that quotes a flag looks like code.

Run the scan

The sensitive-info scan reads the screenshot on the device, nothing is uploaded, and finds emails, card numbers, passwords, API keys and tokens, NAME=value lines whose name contains SECRET, TOKEN, PASSWORD or API_KEY, usernames and passwords inside URLs, IPv4 addresses and long random-looking strings. It outlines each one; Blur all covers them in a click. A setting runs the scan on every capture automatically.

The on-device part matters more than it sounds. In a 2022 Hacker News thread about screenshot tools, one commenter noticed that blurring something in another app triggered a network request to the vendor's server (Hacker News). A redaction tool that uploads the unredacted image defeats the purpose.

Hostnames, IPv6 addresses, short tokens and the username in your prompt are not in the scan's list, and small or low-contrast text can be missed. Blur those by hand with B for Blur or P for Pixelate, raise the strength until no character shapes remain, and cover the full width of the string. Blurs are locked to the screenshot, so re-cropping or tilting the image never uncovers them.

Export, then rotate anyway

Press ⌘C to copy or ⌘S to save a PNG, both at full native resolution. Then rotate any key that was genuinely on screen, blurred or not. Weak pixelation has been reversed with public tools, and Bishop Fox's advice is solid bars over the whole text rather than pixelation (Bishop Fox). See why blurring is not redacting, how to hide API keys in screenshots for what tools detect automatically, and the PixelLeak checklist if the image is going into a pull request.

FAQ

How do I screenshot a Terminal window on Mac without the shadow?

Press ⇧⌘4, then Space, and hold Option while you click the window (Apple Support). In Cleanss, window capture leaves out the macOS shadow; add your own frame and shadow in the editor if you want one. There is a longer guide to Mac screenshots without the window shadow.

Does blurring an API key in a terminal screenshot make it safe?

No. Blur hides it from a casual reader, but light blur and pixelation have both been reconstructed. Replace the value before capturing, blur or cover it strongly, and rotate the key if the real one was ever on screen.

Should I share terminal output as text or as a screenshot?

Text, when someone needs to copy a command or search the error. A screenshot, when colour, layout or a specific moment is the point. Often both: paste the exact error text and attach the annotated image.

Cleanss is available for Mac and Windows from the download page.

liked this? try it yourself

Take better screenshots with Cleanss

Download app

Related posts

  • How to share a screenshot without leaking anything: a 6-step checklistNovember 15, 2026
  • Redact customer data from support screenshots before they enter the ticketNovember 22, 2026
  • Screenshot, annotate and blur in VS Code without leaking tokensNovember 22, 2026