SidekickSidekick

Sidekick Ignore

The .sidekickignore file lets you control which files and folders the Agent can see and access. Use it to hide sensitive files, reduce noise, or keep the Agent focused on relevant code.

How It Works

When you create a .sidekickignore file in your project root, Sidekick prevents the Agent from:

  • Reading ignored files
  • Editing ignored files
  • Searching within ignored files
  • Listing ignored files in directory scans
  • Mentioning ignored files with @
.sidekickignore in project root

All Agent tools respect the patterns

Ignored files are invisible to the Agent

The Agent treats .sidekickignore and .gitignore the same way. Both files work together—patterns from both are combined.

Creating a .sidekickignore File

Create the File

Create a file named .sidekickignore in your project's root directory (same level as package.json or Cargo.toml).

Add Patterns

Add one pattern per line. Use gitignore-style syntax.

# Sensitive files
.env
.env.local
secrets/

# Large generated files
coverage/
*.min.js

# Dependencies
vendor/

Save

Save the file. Patterns take effect immediately—no restart needed.

Pattern Syntax

.sidekickignore uses the same syntax as .gitignore:

Basic Patterns

PatternWhat It Ignores
file.txtExact file named file.txt
*.logAll files ending in .log
folder/Directory named folder and all contents
.env*All files starting with .env

Examples

# Exact file matches
.DS_Store
Thumbs.db
.env
.env.local
credentials.json

# Extension matches
*.log
*.tmp
*.bak
*.swp
# Directories (end with /)
node_modules/
vendor/
dist/
build/
coverage/
.cache/
__pycache__/
# Prefix wildcards
*.min.js
*.min.css
*.bundle.js

# Suffix wildcards
.env*          # .env, .env.local, .env.production
test_*         # test_utils.py, test_helpers.py

# Multiple extensions
*.log
*.tmp
*.temp

Comments

Lines starting with # are comments:

# This is a comment
.env

# Ignore all log files
*.log

File Location

The .sidekickignore file must be in your project root:

my-project/
├── .sidekickignore    ✓ Correct location
├── .gitignore
├── package.json
├── src/
│   └── .sidekickignore    ✗ Won't be detected
└── ...

Currently, .sidekickignore only works at the project root level. Nested ignore files in subdirectories are not supported.