You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Feature] Custom .nanocoderignore File Support #755
Introduce support for a .nanocoderignore file at the root of the workspace. This file would prevent the AI from ever reading or considering specific files, even if they are referenced or open.
Use Case
Developers often have large generated files (e.g., package-lock.json, minified builds, huge CSV datasets) or sensitive files (.env) that should never be sent to the LLM. While .gitignore covers some of this, users sometimes need to commit files to Git but hide them from the AI to save tokens and prevent context bloat.
Proposed Solution
Before the ACP client reads a file or builds workspace context, it should check against glob patterns defined in .nanocoderignore.
Alternatives Considered
Relying solely on .gitignore, but this doesn't cover files that are tracked in version control but shouldn't be read by the AI.
Additional Context
I have searched existing issues to ensure this is not a duplicate
This feature aligns with the project's goals (local-first AI assistance)
Implementation Notes (optional)
Use a lightweight glob matching library (like ignore on npm).
Parse the file during session initialization and pass the ignore list to file-reading tools.
Contribution Guidelines
If you would like to work on this issue, please comment below to ask for assignment first.
Before opening a Pull Request, please briefly share your implementation plan in this thread so we can align on the approach!
Hi! I'd like to work on this — could I get assigned?
.gitignore handling already exists in source/utils/gitignore-loader.ts (uses the ignore package, 5 call sites consume it). Plan: extend that same loadGitignore function to also read .nanocoderignore and merge its patterns into the same ignore instance, additive on top of .gitignore. No changes needed to the 5 call sites since they just consume the returned object.
Will add tests covering: .nanocoderignore alone, both files together, and neither present. Keeping the function name as-is unless you'd prefer a rename.
Activity
[-]# [Feature] Custom `.nanocoderignore` File Support[/-][+][Feature] Custom `.nanocoderignore` File Support[/+]A-S-Manoj commentedon Aug 4, 2026
Hi! I'd like to work on this — could I get assigned?
.gitignorehandling already exists insource/utils/gitignore-loader.ts(uses theignorepackage, 5 call sites consume it). Plan: extend that sameloadGitignorefunction to also read.nanocoderignoreand merge its patterns into the sameignoreinstance, additive on top of.gitignore. No changes needed to the 5 call sites since they just consume the returned object.Will add tests covering:
.nanocoderignorealone, both files together, and neither present. Keeping the function name as-is unless you'd prefer a rename.