r/CLine • u/gargetisha • 22h ago
Announcement We’re deprecating .clineignore - here’s what to use instead
Hey everyone - we wanted to give you an early heads-up that we’re planning to deprecate .clineignore soon.
.clineignore was originally introduced to reduce context noise by controlling which files Cline automatically loads, such as dependencies, build artifacts, generated files, and other files that are unlikely to be relevant to a task.
However, it only affects files that Cline loads automatically into context. It was never intended to act as a security or access-control boundary. Models can still access project files through other methods, particularly shell commands, so .clineignore cannot reliably prevent access to specific files.
To avoid giving users a false sense of security, we’re removing it as a supported feature.
Still want context filtering? Here’s an alternative
For users who still want context filtering, we have a plugin that offers similar behavior:
https://docs.cline.bot/sdk/plugin-examples#block-ignored-file-access
You can Install it with:
cline plugin install https://github.com/cline/cline/blob/main/sdk/examples/plugins/gitignore-read-files-guard.ts --cwd .
The plugin uses a runtime beforeTool hook to block read_files, editor, and apply_patch calls when they target files ignored by your workspace’s .gitignore.
Important limitations
There are a few important limitations to be aware of. This is not a 1:1 replacement for .clineignore, and it should still be treated as best-effort context filtering rather than a security guardrail.
- It guards file reads and edits only.
- It does not filter
search_filesorlist_filesresults. - It does not guard shell commands.
- It uses
.gitignore, not a separate.clineignore. - It requires a Git repository.
- Plugins currently run on the Cline SDK, CLI, and Kanban. VS Code and JetBrains support will arrive as those extensions migrate onto the SDK.
For now, the .clineignore documentation will remain available for existing users while the feature is phased out, but we no longer recommend adopting it for new workflows.
Thanks for your understanding: we’re making this change so Cline’s file access behavior is clearer and less likely to be mistaken for a security boundary.