.AIIgnore
The .aiignore file is a configuration specification that tells AI coding agents and LLM-powered developer tools which files, directories, and content should not be read, processed, or modified. Modeled after .gitignore syntax, .aiignore files protect sensitive data, proprietary code, and personal information from being exposed to AI models during development workflows. Supported by JetBrains AI Assistant, Cursor, GitHub Copilot, Claude Code, Gemini Code Assist, and other AI coding tools.
APIs
AIIgnore CLI
Command-line tool that generates .aiignore configuration files to protect secrets from AI coding tools including JetBrains AI, Cursor, GitHub Copilot, Claude Code, Codeium, and ...
Features
Uses familiar glob pattern syntax from .gitignore so developers can immediately define exclusion rules.
Prevents AI models from reading .env files, credential files, API keys, private keys, and other sensitive data.
Single .aiignore file works across JetBrains AI, Cursor, GitHub Copilot, Claude Code, Codeium, and Windsurf.
Exclude entire directories from AI context with simple pattern rules (e.g., vendor/, node_modules/).
Match files by extension, name, or path pattern to control AI model access granularly.
Single file in project root applies rules across the entire project tree.
Prevent proprietary algorithms, business logic, or licensed code from being sent to external AI APIs.
aiignore-cli generates boilerplate .aiignore files with one command, covering common secrets patterns automatically.
Use Cases
Exclude .env and config files containing API keys, tokens, and credentials from AI coding tool context.
Protect trade secrets and proprietary algorithms from being processed by AI models hosted on third-party infrastructure.
Ensure regulated data (PII, healthcare records, financial data) is not sent to external AI APIs.
Exclude large binary files, build artifacts, and generated files that would waste AI context window.
Prevent licensed third-party code and vendor directories from being included in AI context.
Integrations
JetBrains IDEs (IntelliJ, PyCharm, WebStorm, etc.) AI Assistant respects .aiignore in project root.
Cursor IDE supports .cursorignore (similar concept) for controlling AI context access.
GitHub Copilot supports content exclusion via repository settings and .copilotignore patterns.
Anthropic Claude Code CLI supports .claudeignore file for excluding files from AI context.
Codeium AI coding assistant with configurable file exclusion patterns.
Codeium Windsurf AI editor with .windsurfignore support for context control.
Google Gemini Code Assist with project-level context exclusion configuration.