uignore — a .gitignore for AI coding tools
AI coding tools are incredibly useful. They can read your codebase, understand context across dozens of files, and make changes in seconds. They can also read your .env file. Your secrets/ director...

Source: DEV Community
AI coding tools are incredibly useful. They can read your codebase, understand context across dozens of files, and make changes in seconds. They can also read your .env file. Your secrets/ directory. Your SSH keys. Your AWS credentials. Not because they're malicious — but because nothing stops them by default. I built uignore to fix this. What is uignore? uignore gives you a single .uignore file — same syntax as .gitignore — that blocks file access across all supported AI tools simultaneously. gitignore # .uignore secrets/ .env .env.* *.pem *.key Add a path once. Claude Code, Gemini CLI, Cursor, and Windsurf all respect it automatically. How it works Each AI tool has a native hook system: ┌─────────────┬────────────────┬─────────────────┐ │ Tool │ Hook │ Block mechanism │ ├─────────────┼────────────────┼─────────────────┤ │ Claude Code │ PreToolUse │ exit code 2 │ ├─────────────┼────────────────┼─────────────────┤ │ Gemini CLI │ BeforeTool │ exit code 2 │ ├─────────────┼───────────────