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 request: Allow gitignored files in file search #1535
Right now .gitignore files and dirs are hidden from opencode file search. I often like to save off audits and todo lists in project repos, but not commit them.
As a user... I'd like to be able to re-include specific gitignored files and dirs so I can reference them from the file search.
opencode uses rg to file search. As as workaround you can use RIPGREP_CONFIG_PATH to configure search function. For example, I'm using this in my project:
Create a file named .rgrc file with the following option in your project root:
--no-ignore-vcs
Then open opencode with:
RIPGREP_CONFIG_PATH=.rgrc opencode
Now you can search for gitignored files.
In my opinion it might be better yet to support .rgrc (this is just a very common filename used by ripgrep users so it's just a suggestion). That way, users can customize file search beyond just allowing .gitignore files.
Reacted by Dustin Dowell, Danilo Favato and Francesc Rosas
would like to voice support for this feature request, I have a few LLM-specific guiding docs or plans that I don't need to commit to the repo, but obviously would want to use in opencode
Reacted by Andrei Stoica, Gregori Rivas, André Cruz, Fahim Ali Zain and Roman
Activity
[-]Allow gitignored files in file search[/-][+]Feature request: Allow gitignored files in file search[/+]Yrds commentedon Aug 16, 2025
opencode uses
rgto file search. As as workaround you can useRIPGREP_CONFIG_PATHto configure search function. For example, I'm using this in my project:Create a file named
.rgrcfile with the following option in your project root:Then open opencode with:
Now you can search for gitignored files.
In my opinion it might be better yet to support
.rgrc(this is just a very common filename used by ripgrep users so it's just a suggestion). That way, users can customize file search beyond just allowing .gitignore files.thdxr commentedon Aug 17, 2025
/oc are there any other issues like this one?
opencode-agent commentedon Aug 17, 2025
Based on my search, this appears to be a unique and valid feature request. Here's what I found:
No Similar Issues Found
There are currently no other issues in the repository requesting similar file search enhancements. This is the first request for:
Current Implementation Gaps
The current file search system has significant limitations:
.git/*is filtered out.gitignoreawareness: Gitignored files are still shown/searchable.rgrcorRIPGREP_CONFIG_PATHsupportThis is a Greenfield Opportunity
The codebase shows this would be a valuable enhancement since:
This issue represents a clear gap in expected developer tooling functionality that would benefit many users.
opencode session | github run
anmorgunov commentedon Oct 29, 2025
would like to voice support for this feature request, I have a few LLM-specific guiding docs or plans that I don't need to commit to the repo, but obviously would want to use in opencode
rekram1-node commentedon Oct 29, 2025
@anmorgunov we may need to highlight this better in the docs but since we use ripgrep for file searches you can make exclusions using ignore files:
https://opencode.ai/docs/tools/#ignore-patterns
fix(extensions): show directory-based project plugins (anomalyco#1535)