API SeatbeltA quiet, 100% offline heads-up display that catches exposed API keys before they turn into a four-figure bill. Built for beginners, indie builders, and anyone coding alongside AI assistants—and clean enough for experienced devs who want a lightweight safety net with zero bloat. See It in Action1. Context-Aware Frontend Warnings (Medium)Public browser keys (like Firebase
2. One-Click
|
| Status | What Triggered It | What API Seatbelt Does |
|---|---|---|
| Clean | Private key inside a Git-ignored, untracked, never-committed .env* file |
Stays completely silent (Seatbelt: Clean in the Status Bar) |
| Medium | Public-ambiguous frontend key (AIza..., Supabase publishable) in client code |
Yellow squiggle + reminder to verify domain restrictions (or move to .env if it's a private Gemini key) |
| High | Key hardcoded in source/config files, or .env* missing from .gitignore / staged |
Red squiggle + plain-English fix (plus a one-click .gitignore Quick Fix & git rm --cached helper) |
| Critical | Frontend bundle trap (NEXT_PUBLIC_, VITE_, dangerouslyAllowBrowser: true) or committed locally in Git history |
Red squiggle + exact recovery steps (warns that git rm --cached does not erase Git history) |
| Emergency | Secret confirmed pushed to a remote repository | Opens the 3-Step Panic Card with direct links to revoke the key and check billing immediately |
Key Features
- One-Click
.gitignoreQuick Fix: Click the lightbulb on an unignored.envfile to add it (or.env*while keeping.env.example) cleanly to.gitignore—and get a copyablegit rm --cachedcommand if it's already staged. - The 3-Step Panic Card: If a key is already pushed, API Seatbelt opens a calm recovery checklist:
- Revoke/delete the old key first (creating a new key does not disable the leaked one).
- Check usage & set a hard spending cap (with direct links to official provider key and billing dashboards).
- Store the replacement safely in a Git-ignored
.envfile.
- Catches Silent AI Agent Edits: A background file watcher monitors disk writes even in closed files—catching accidental keys dropped into
.mcp.json,.cursorrules,CLAUDE.md, or source files by coding agents. - Optional Git Pre-Commit Hook: One command installs a standalone, offline
.gitpre-commit scanner that blocks staged secrets even when your editor is closed. - Zero Popup Spam: Simultaneous findings are grouped into a single notification and deduplicated while you fix them. Placeholders (
example,your_key,xxxx), local database URLs (localhost,127.0.0.1),node_modules/, lockfiles, binaries, and files over 1 MB are automatically skipped.
What It Catches
- AI & Indie APIs: OpenAI (
sk-proj-,sk-svcacct-,sk-admin-, legacysk-), Anthropic (sk-ant-), OpenRouter (sk-or-v1-), Groq (gsk_), Replicate (r8_), Hugging Face (hf_), Resend (re_), Perplexity (pplx-), xAI (xai-), Supabase (sbp_,sb_secret_,sb_publishable_) - Cloud, Payments & Dev: GitHub (
ghp_,github_pat_,ghs_), AWS (AKIA...), Stripe (sk_live_,rk_live_,whsec_), SendGrid (SG.), Slack (xoxb-,xoxp-), Google (AIza...) - Database URLs: Embedded passwords in
postgres://,postgresql://,mongodb://,mongodb+srv://,mysql://,redis://, andrediss:// - Private Key Blocks:
-----BEGIN ... PRIVATE KEY-----(RSA, OpenSSH, EC, DSA, Encrypted, PGP) - Frontend Traps: Private keys assigned to
NEXT_PUBLIC_,VITE_,REACT_APP_,EXPO_PUBLIC_,NUXT_PUBLIC_, orPUBLIC_, keys insidepublic/orclient/src/, anddangerouslyAllowBrowser: true
Works Everywhere You Code
- OS: Windows, macOS, and Linux
- Editors: VS Code, Cursor, Devin Desktop (formerly Windsurf), VSCodium, Kiro, Antigravity, Trae, and any Open VSX–compatible VS Code fork
- AI Agents: Works alongside Claude Code, Cursor Agent, Codex, and other local coding agents (with an optional Git pre-commit hook that protects you even when your editor is closed)
Core Guarantees
- 100% Offline: Zero network requests, zero analytics, zero telemetry. Everything runs locally and is verifiable in the source code.
- Read-Only on Source Code: Never modifies your application code. Only updates
.gitignoreor installs the pre-commit hook when you explicitly click to do so. - Masked & Leak-Safe: Raw secrets are never logged, rendered in the UI, or passed as CLI arguments to Git—only masked previews (like
sk-proj...4f9a) are shown. - Honest Status Badge: Shows
Seatbelt: Cleanwhen no active issues are found (never claims you are "100% protected"), because no scanner catches every custom key format.
Commands
Open the Command Palette (Ctrl+Shift+P / Cmd+Shift+P) and search for API Seatbelt:
API Seatbelt: Run Workspace Hygiene Check— Run a workspace hygiene check on.env*, AI/IDE configs, and open files.API Seatbelt: Install Pre-Commit Git Hook— Install the standalone offline Git pre-commit blocker for the current repo.API Seatbelt: Open Emergency Panic Card— Open the 3-Step Leak Recovery Plan anytime.
Feedback & Bug Reports
This is a community side project built to help folks avoid costly mistakes. If you hit a false positive, find a bug, or want another key format supported, please open an issue on GitHub:
👉 Report a Bug or Request a Provider
License
MIT — free to use, modify, and share. See LICENSE for details.
Take care all of you, and be safe out there.