.gitignore prevents git from tracking files. It does not prevent AI coding tools from reading them. Secretless AI blocks AI tools from accessing secrets and encrypts them at rest.
by OpenA2A
Blocks AI coding tools from reading secret files, encrypts credentials at rest, and installs deny rules for Claude Code, Cursor, Copilot, and Windsurf in a single command.
built into git
A git configuration file that prevents tracked files from being committed to a repository. It has no effect on how AI coding tools access the local filesystem.
.gitignore controls what git tracks, not what AI reads. Claude Code, Cursor, Copilot, and Windsurf read your working directory directly. Every file your AI assistant can see, it can send to an API.
| Feature | Secretless AI | .gitignore |
|---|---|---|
| Blocks AI tools from reading secrets | Yes | No |
| Prevents git from tracking files | Via scanning | Yes |
| Encrypts secrets at rest | AES-256-GCM | No |
| Protects .env files from AI context | Yes | No |
| Works with Claude Code | PreToolUse hook + deny rules | No |
| Works with Cursor | .cursorrules | No |
| Works with Copilot | .github/copilot-instructions.md | No |
| Works with Windsurf | .windsurfrules | No |
| Works with Cline | .clinerules | No |
| Works with Aider | .aiderignore | No |
| MCP server secret protection | Yes | No |
| Pre-commit secret scanning | Yes | No |
| 1Password / OS keychain backend | Yes | No |
| Zero config setup | npx secretless-ai init | Manual editing |
| Prevents accidental commits | Via scanning | Yes |
| Open source | Apache-2.0 | Built into git |
.gitignore stops git. Secretless AI stops AI tools from reading secrets in the first place.
$ npx secretless-ai init
Scanning project...
Found 3 secret files:
.env (API keys, database URLs)
.env.local (local overrides)
config/credentials.json (service account)
Generating protections:
Claude Code -> .claude/settings.json (deny rules)
Cursor -> .cursorrules
Copilot -> .github/copilot-instructions.md
Windsurf -> .windsurfrules
Encrypting secrets:
.env -> .env.enc (AES-256-GCM)
Backend: OS Keychain
Done. Secrets are now blocked from AI context.# .gitignore
.env
.env.local
config/credentials.json
# Git won't track these files.
# But AI coding tools can still read them:
#
# Claude Code: reads entire working directory
# Cursor: indexes all project files
# Copilot: accesses file system context
# Windsurf: reads project directory
#
# Your secrets are in every AI prompt.One command. Six AI tools protected. Secrets encrypted. Open source, Apache-2.0.
Apache-2.0 license -- Works with Claude Code, Cursor, Copilot, Windsurf, Cline, Aider