A lightweight Cursor/VS Code extension to manage .cursorignore
entries straight from the Explorer or Command Palette. Keep ignores tidy, reduce noise for AI/code tools, and speed up your workspace.
- Features
- Installation
- Quick Start
- Screenshots
- Usage
- Typical
.cursorignore
entries - How it works
- Troubleshooting
- Development
- Contributing
- License
- Keep
.cursorignore
organized and readable - Suggest common ignores for typical projects
- Works with multi‑select and falls back to the active editor file
Option A: Install the packaged VSIX
- Open Cursor/VS Code → Extensions view
- Click the ⋯ menu → "Install from VSIX..."
- Select
cursorignore-helper-1.0.0.vsix
Option B: Run from source (for development)
npm ci
npm run compile
- Press F5 (Run Extension) in VS Code to start an Extension Host
- Open a workspace/folder
- Select files or folders in the Explorer
- Right‑click → "Add to .cursorignore" (or use the Command Palette)
Explorer context menu (recommended):
- In the Explorer, select one or more files/folders
- Right‑click → "Add to .cursorignore" or "Remove from .cursorignore"
Command Palette:
- Open the file in the editor (or select in Explorer)
- Run "Add to .cursorignore" or "Remove from .cursorignore"
Notes:
- Works with multi‑select in the Explorer
- If nothing is selected, the active editor file is used
- Only items inside a workspace folder are processed
- A
.cursorignore
file is created at the workspace root if missing
node_modules/
dist/
build/
.next/
.venv/
*.log
coverage/
tmp/
.cache/
- Resolves selected URIs and groups them by workspace folder
- Reads the workspace
.cursorignore
(creates it if missing) - Normalizes entries to paths relative to the workspace root using forward slashes
- Add: appends entry if it does not already exist
- Remove: deletes an exact matching entry
- Writes the updated file with a trailing newline
Commands contributed:
cursorignore.add
– Add to.cursorignore
cursorignore.remove
– Remove from.cursorignore
- "No selection detected" — Select files in Explorer or open a file in the editor and re‑run the command.
- "No workspace folder found" — Make sure you have an actual folder/workspace open.
- Paths don’t match — The extension writes paths relative to the workspace root using
/
separators. Ensure your ignore entries match that style.
- Scripts:
npm run compile
(prepublish),npm ci
for deps - Main entry:
out/extension.js
built fromsrc/extension.ts
- Activation events:
cursorignore.add
,cursorignore.remove
Issues and PRs are welcome. Please ensure changes are well-scoped and documented.
MIT