Early Software (v0.4.0) — Start with a non-critical project. Report bugs to help us get to v1.0.
THREAT ACTIVE — YOUR .ENV IS EXPOSED

Your AI agent has
read access to
every secret you own

Open Source Free Forever

Cloak encrypts your .env secrets and replaces them with fakes on disk. Agents see sandbox values. You see the real ones.

Install Extension CLI for Terminal

Works with VS Code, Cursor, Windsurf, and any VS Code fork

macOS / Linux: curl -fsSL https://getcloak.dev/install.sh | sh

Windows: irm https://getcloak.dev/install.ps1 | iex

Protects against

AI agents don't hack you.
They just read your files.

Every coding agent scans your working directory for context. Your .env is just another file. .gitignore only protects git. It does nothing for local file reads.

01

Agents read .env on every prompt

Claude Code, Cursor, Copilot, and Codex index your project to build context. That includes every .env file with your Stripe live keys, database URLs, JWT secrets, private keys, and wallet mnemonics. No exploit required — it's how they work.

02

Secrets travel over the wire

File contents are sent to AI providers as part of API requests. Your production database password is now in a context window on someone else's infrastructure. It's in logs, in caches, potentially in fine-tuning pipelines.

03

One leak is permanent damage

A leaked sk_live_ key can drain Stripe accounts. A leaked database URL exposes user data. A leaked private key or wallet mnemonic in your .env means irreversible loss of funds. By the time you rotate, the window is open.

04

No existing tool solves this

.gitignore protects git, not disk. Vault/Infisical are for teams and production. Environment managers don't encrypt at rest. Nothing prevents a local process from reading cat .env and getting your real credentials. Until Cloak.

Intercept. Encrypt. Substitute.

Real credentials go into an AES-256-GCM encrypted vault. Structurally valid fakes go to disk. Everything is local. No servers, no accounts, no network calls.

1

Initialize protection

Run cloak init. Cloak scans for secrets using pattern matching and entropy analysis. Real values are encrypted to a local vault. Sandbox replacements are written to disk. A recovery key and CLI access password are set.

$ cloak init
scanning .env...
[ok] 11 secrets detected
[ok] vault created (AES-256-GCM)
[ok] sandbox written to disk
[!!] recovery key: CLOAK-8f2a-b9c1-d4e5-f6a7-b8c9-d0e1
save this. it will not be shown again.
[ok] CLI password set
2

Edit transparently

The VS Code / Cursor extension intercepts file opens and saves. You see and edit real credentials in your buffer. On save, the extension encrypts to the vault and writes sandbox values to disk. Zero workflow change.

# your editor buffer (decrypted):
STRIPE_KEY=sk_live_4eC39HqLyjWDar...

# on disk after save (sandbox):
STRIPE_KEY=sk_test_cloak_sandbox_000000000000
3

Run with real values

cloak run decrypts the vault and injects real environment variables into any child process. Touch ID or password required — AI agents can't authenticate. No files touched.

$ cloak run npm start
[auth] Touch ID / password
# process.env.STRIPE_KEY =
sk_live_4eC39HqLyjWDar... (real)

$ cat .env | grep STRIPE
sk_test_cloak_sandbox_000000000000 (sandbox)
4

Recover anytime

Lost your keychain? Switched machines? cloak recover restores vault access from your recovery key. PBKDF2-SHA256 with 100k iterations protects the recovery file. No data is ever lost.

$ cloak recover
enter recovery key: CLOAK-8f2a-b9c1-...
[ok] recovery file decrypted
[ok] keychain key restored
[ok] vault accessible

Make your agent
part of the solution

Drop a SKILL.md skill file into your project. Your AI agent will actively protect secrets — checking for Cloak, suggesting protection, and using cloak run instead of reading .env directly. With your consent, always.

without cloak.md
# Agent reads .env, sees real secrets
Agent indexes sk_live_4eC39HqLy...
Secret ends up in context window
Sent to AI provider over the wire
 
No protection. No awareness.
vs
with cloak.md
# Agent checks for .cloak marker
Finds .cloak → protection active
Reads only sandbox values from .env
Uses `cloak run` for real env vars
Uses `cloak set` to add secrets
Suggests `cloak init` if unprotected

Add it to any project in seconds. Copy SKILL.md to your project root, or append the rules to your CLAUDE.md, .cursorrules, or .windsurfrules. The agent becomes security-aware — it will never read real secrets, always use Cloak commands, and ask before making changes.

Download SKILL.md

Same file. Two realities.

Your .env on disk contains structurally valid fakes. Real secrets live in an encrypted vault in ~/.config/cloak/ that agents never touch. Your editor decrypts and shows the real values in memory only.

disk — what agents read
# Database
DATABASE_URL=postgres://dev:dev@localhost:5432/devdb

# Stripe
STRIPE_SECRET_KEY=sk_test_cloak_sandbox_000000000000
STRIPE_PUBLISHABLE_KEY=pk_test_cloak_sandbox_000000000000

# WAM
WAM_API_KEY=cloak_sandbox_api_key_00000000
WAM_SECRET=cloak_sandbox_token_00000000

# Non-secrets (unchanged)
NODE_ENV=production
PORT=3000
vs
editor — what you see
# Database
DATABASE_URL=postgres://admin:[email protected]:5432/myapp_prod

# Stripe
STRIPE_SECRET_KEY=sk_live_4eC39HqLyjWDar...
STRIPE_PUBLISHABLE_KEY=pk_live_TYooMQauvdEDq54...

# WAM
WAM_API_KEY=wam_live_k8xPq2mNvR7bT4jL9sW1
WAM_SECRET=wam_sec_Yx3kF7nQ2pR8mVbJ4tL6wS9

# Non-secrets (unchanged)
NODE_ENV=production
PORT=3000

Everything you need.
Nothing you don't.

Single binary. Zero runtime dependencies. No cloud accounts. No config files. Install once, protect every project.

AES-256-GCM vault

Secrets encrypted with AES-256-GCM. Keys stored in your OS keychain. Binary vault format with magic bytes, versioning, and integrity verification.

aes-gcm

Smart detection

Identifies API keys, database URLs, tokens, passwords, and private keys by name patterns and value analysis. Shannon entropy catches unknown secret formats.

entropy > 4.5

Structural sandbox

Sandbox values are structurally valid. sk_test_* for Stripe, postgres://dev:dev@localhost for databases. Your linters and parsers still work.

deterministic

Biometric auth gate

Touch ID on macOS, CLI password on all platforms. Even if an agent runs cloak peek, it can't authenticate. No TTY means no access.

touch id

Editor integration

VS Code, Cursor, and Windsurf extension intercepts open/save. Real values in buffer, sandbox on disk. Cloak Terminal provides a shell with real env vars (modal-gated).

typescript

Full CLI

Terminal workflows: init, edit, peek, run, set, reveal, recover. Works standalone without any editor extension.

rust

Recovery system

Human-readable recovery key shown once during init. PBKDF2-SHA256 with 100k iterations. Recover from lost keychain on any machine. Secrets are never lost.

pbkdf2

Runtime injection

cloak run npm start injects real env vars into child processes. Touch ID or password required. No files modified. No disk writes.

zero-write

Cross-platform

macOS (Intel + Apple Silicon), Linux (x86_64 + ARM64), Windows (10/11). Touch ID on Mac, password everywhere else. Same vault format across all platforms.

3 platforms

Protects against every agent

Any process that reads files from disk gets sandbox values. No per-agent configuration. If it can cat .env, Cloak handles it.

Claude Code
Cursor
GitHub Copilot
Codex
Windsurf
Any agent

Born from a real problem

While building WAM — an agentic gaming company with crypto payment rails — I quickly saw how fragile local .env files become when AI agents take over your workflow. Wallet keys, payment secrets, API tokens for real money infrastructure, all sitting in plaintext on disk, fully readable by every agent in the project.

I looked for a solution. Nothing existed. Secret managers protect servers, not laptops. .gitignore protects git, not disk. So I built Cloak — and open-sourced it because every developer running AI agents has this exact same problem.

— Daniel Tamas

Three layers deep

Encryption protects the vault. Biometric auth blocks the CLI. Modal gates block the extension. Every failure mode favors visibility over lockout.

OS keychain storage

Encryption keys in macOS Keychain, libsecret, or Windows Credential Manager. Protected by your OS login. Never on disk as plaintext.

Biometric auth gate

Touch ID on macOS, PBKDF2-hashed password on all platforms. CLI commands that reveal secrets require authentication. AI agents can't bypass.

Non-interactive rejection

No TTY means no access. Piped input, scripted access, and CI runners are blocked. Only interactive terminals can authenticate.

VS Code modal gate

Cloak Terminal with real env vars requires clicking a modal dialog. AI agents can't interact with VS Code modals.

Zero plaintext on disk

No backup files, no temp files that persist, no recovery dumps. Plaintext only exists in editor memory buffers.

Zero network calls

No telemetry, no analytics, no cloud sync. Only cloak update optionally checks GitHub releases. Everything else is offline.

Atomic file writes

Write-to-temp-then-rename. Interrupted saves can't corrupt vaults or leave half-written .env files.

Fail toward visibility

Decrypt failure on open shows sandbox with a warning. Encrypt failure on save writes real values to disk. Temporary leak beats permanent data loss.

Auditable source

MIT licensed. Rust CLI and TypeScript extension. Read every line. Build from source. No obfuscation, no binaries you can't inspect.

You're paying for tools that
don't protect your laptop

Secret managers protect production infrastructure. None of them protect the .env file on your laptop from being read by AI agents. That's a different threat model. That's what Cloak does.

Cloak HashiCorp Vault Infisical Doppler 1Password CLI .gitignore
Hides secrets from AI agents on disk
Replaces secrets with valid sandbox values
Encrypts .env at rest on your machine partial
Biometric / password auth gate biometric
Works without cloud accounts or servers
Zero network calls
Editor integration (VS Code / Cursor) partial partial
Runtime env injection (no file writes)
Automatic secret detection partial
Offline recovery system partial partial
Single binary, zero dependencies
Open source (MIT) BSL
Setup time 10 sec hours 30 min 15 min 15 min 10 sec
Price Free self-hosted or HCP $$ $18/user/mo $21/user/mo $7.99/user/mo Free
The gap is clear. Existing tools manage secrets for teams and production servers. None of them address the fact that your local .env file — sitting right there in your project directory — is fully readable by every AI agent you run. You're paying $21/month per seat for secret management while your Stripe live key is in plain text on disk, one cat .env away from landing in an AI provider's context window. Cloak is the only tool that solves this. And it's free.

Questions

.gitignore prevents files from being committed to git. It does nothing for local file access. AI agents read from your working directory, not from git. If an agent can run cat .env, it sees your real secrets. Cloak ensures cat .env returns sandbox values.

Those are team secret managers for production infrastructure. Cloak is workstation-level protection for individual developers. No servers, no accounts, no team management. Use both: Vault for production, Cloak for your laptop.

If you lose both keychain access and recovery key, you can't decrypt the vault. But nothing is destroyed — your project structure is intact with sandbox values. Re-enter your real credentials and run cloak init again. Save the recovery key in a password manager.

Sandbox values are structurally valid but won't authenticate. Use cloak run npm start to inject real environment variables (Touch ID or password required), or use the Cloak Terminal in VS Code which has real values pre-loaded.

No. Zero network calls. Everything runs locally. The only optional network request is cloak update checking GitHub releases. No telemetry, no analytics, no cloud sync. Ever.

No. Touch ID requires biometric proof. The CLI password requires a TTY (interactive terminal) — piped input and scripted access are rejected. The VS Code Cloak Terminal requires clicking a modal dialog that AI agents can't interact with. Three layers, all human-only.

Delete the auth file (~/.config/cloak/vaults/<hash>.auth) and run cloak init again in the project to set a new password. Your vault and recovery key are unaffected.

Yes. The Rust CLI works standalone. Use cloak init to protect, cloak edit for your terminal editor, cloak peek to compare values, and cloak run for real env vars. Claude Code reads the sandbox .env from disk and never sees real credentials.

v0.1 protects .env, .env.local, .env.development, .env.production, .env.staging, and .env.test. Support for ~/.ssh, ~/.aws, and other sensitive files is planned for v0.3.

Yes. MIT licensed. Rust CLI + TypeScript extension. Same vault format, fully cross-compatible. Audit it, build from source, or contribute on GitHub.

Stop leaking secrets to AI agents

Install the extension. Your .env is cloaked. Your workflow doesn't change.

VS Code, Cursor, Windsurf & any VS Code fork — same extension