v0.1.6
open source · macOS & Linux · v0.1.6

Your shell history remembers every secret.

Exported API keys, curl tokens, database passwords and keys pasted into Claude Code or Codex all sit in plain text under your home folder. smash scrubs them out once a day, in place, and leaves the rest of your history alone.

curl -fsSL https://keysmash.website/install.sh | sh

then smash to set up and previewsmash run to scrub nowsmash log to see what changed

⚠ Rewrites your history and agent logs in place, with no backups. Read the risks before you run it ↓

92% fewer lines sent 0 of today's lines touched key stored AES-256 OpenAI or Anthropic no sudo, one binary

Four steps, once a day.

A background job (launchd on macOS, a systemd timer on Linux) checks only what's new since the last run. Only suspicious lines ever leave your machine, and every answer is checked before a byte changes.

  1. Filter locally

    Key formats, KEY=value, bearer tokens, URL credentials and random-looking strings are spotted on your machine.

  2. Model confirms

    Suspicious lines go to OpenAI or Anthropic in batches; only lines with a real secret come back, masked.

  3. Verify

    An answer is used only if it's your original line with spans replaced by [REDACTED].

  4. Rewrite in place

    Atomic rewrite, byte-for-byte except the redactions. Lines added meanwhile are kept.

What ships

  • Preview first. Counts per source, and nothing is sent until you confirm.
  • Cleans four sources. zsh and bash history, Claude Code and Codex sessions, and both prompt histories.
  • Incremental. Only new lines are checked, and clean ones are never re-sent.
  • Today stays. Lines dated today wait for tomorrow, and live agent sessions are skipped.
  • Catches up. A run missed during sleep or downtime happens afterwards.
  • Audit log. smash log shows files and counts, never the text.

Stay in control

# stop the daily job, keep smash for manual runs
launchctl bootout gui/$(id -u) ~/Library/LaunchAgents/com.smash.daily.plist
rm ~/Library/LaunchAgents/com.smash.daily.plist
smash run  # whenever you like
smash update     # install the latest release, checksum verified
smash uninstall  # removes the job, ~/.smash and the binary; asks first

Redaction is permanent, and smash keeps no backups. Rotate any key it finds: if it was on disk, assume it was read.

Know the risks

smash changes files you may care about. Read this before your first run.

  • Redaction is permanent.No backups, on purpose: a backup would be another copy of the secret. Anything wrongly masked is gone too.
  • Old agent sessions may not resume.Claude Code and Codex replay their logs on resume; an older session smash edited may fail or lose earlier reasoning. Today's and active sessions are never touched.
  • Suspicious lines go to a provider.Flagged lines, which can include real secrets, are sent to OpenAI or Anthropic to be confirmed.
  • It can miss secrets.Both the filter and the model are heuristics. Rotate any key you find: if it was on disk, assume it was read.
  • Not protection against malware.Anything running as you can read your history before it's cleaned, and smash's config with its key.
  • Open shells can write old lines back.A running shell keeps history in memory. Restart open terminals after a run.