mindignore
Control which files Mind can access using gitignore-style patterns
The .mindignore file prevents Mind from reading specific files in your workspace. Using familiar gitignore syntax, you define patterns for files that should remain private — credentials, secrets, or content you prefer to keep out of agent context.
Where supported, ignore patterns apply across the agent's tools — blocked files stay blocked regardless of which tool tries to read them. Before returning file or text search results, Mind checks each result against your read permissions and ignore rules. Paths and matching content from ignored or unreadable files do not appear in search results.
| Capability | IDE | CLI | Web |
|---|---|---|---|
Workspace .mindignore | ✓ | ✓ | — |
Global ignore file (~/.mind/settings/mindignore) | ✓ | — | — |
Why use .mindignore?
- Security — Prevent Mind from accessing files containing credentials, API keys, or other sensitive data
- Privacy — Exclude confidential information from AI interactions
- Compliance — Ensure Mind doesn't access files that shouldn't be shared with external services
- Focus — Keep Mind's context relevant by excluding large files or build artifacts
Setting up workspace ignore
To exclude files in a specific project, create a .mindignore file in your project root (or any subdirectory) and add patterns for files you want to exclude:
# Secrets and credentials
.env
.env.*
!.env.example
*.pem
*.key
# Private directories
secrets/
private/The IDE reads ignore filenames from the Agent Ignore Files setting. Open Settings (Cmd+, on Mac or Ctrl+, on Windows/Linux), search for Agent Ignore Files, and verify .mindignore is present.
Subdirectory ignore files
Like .gitignore, you can place .mindignore files in subdirectories to override or extend patterns from parent directories. Patterns in subdirectory ignore files take precedence for files within that subdirectory.
Best practices
- Use comments to document why files are ignored — helpful for team members
- Test patterns by asking Mind to read an ignored file — it will indicate access is blocked
- Review patterns periodically as your project structure evolves
- Coordinate with your team on global patterns for consistent behaviour across workspaces
Global ignore files
Mind automatically honors global ignore files if they exist — no configuration needed:
~/.mind/settings/mindignore— Your global Mind ignore patterns- Git's global ignore file (configured via
core.excludesfilein your git config) — only applied in git repositories
Pattern syntax
| Pattern | Effect |
|---|---|
| file.txt | Ignore specific file |
| *.log | Ignore by extension |
| folder/ | Ignore directory |
| **/temp | Ignore in any subdirectory |
| !keep.txt | Don't ignore (negation) |
secrets/, adding !secrets/public.txt won't work. To include specific files from a directory, use more specific patterns instead of excluding the entire directory.Examples
Protecting API keys and secrets
# Environment files with credentials
.env
.env.local
.env.production
# Keep the template accessible
!.env.example
# Certificate and key files
*.pem
*.key
*.p12
credentials/Excluding build artifacts and data files
# Build outputs
dist/
build/
.next/
# Data files
*.sql
*.dump
data/exports/Team compliance setup
# Customer data directories
customer-data/
pii/
# Audit and compliance docs
compliance/internal/
audit-reports/