This app runs inside the BotSurf browser. Don't have it yet? Get the app or extension now!

GitHub Repo File Tree Search

Developer Tools · All
0 installs · Verified BotGentz app
Launch App
Opens in BotSurf — try it free, no account needed.
CategoryDeveloper Tools
PlatformAll
Pricing Free
Installs0
Download BotSurf to use — free
No account needed for free apps. Once BotSurf is open, find this app in Apps from the + menu.

About this app

WHAT IT DOES

This script adds a real-time search input above the GitHub repository file tree, allowing you to quickly filter files and directories by name. As you type, the script scans all files and folders in the current directory view, highlights matching filenames, and hides non-matching entries. This makes it easy to find specific files in large repositories without scrolling through dozens or hundreds of entries. The search supports case-sensitive matching and regex mode for advanced pattern searches. A "Clear search" button lets you reset the filter instantly. The search persists as you navigate between directories or switch branches, and your preferences (case sensitivity, regex mode) are saved locally.

WHERE IT RUNS

The script runs on all GitHub repository pages (github.com/*/*). It works on the main file listing view, the "Find file" interface, and any page that displays the repository file tree. It supports both desktop and mobile views.

HOW TO USE

After installation, the settings panel appears on the left side of the screen with the gear emoji (⚙️). Open the panel to configure the script:

- The "Enable file tree search" toggle enables or disables the search feature.

- Toggle "Case sensitive" to enable case-sensitive matching.

- Toggle "Regex mode (advanced)" to use regular expression patterns for searching.

- Click "Refresh file tree" to manually rebuild the search UI.

A search input appears above the file tree on any repository page. Type your search query to filter files and directories in real-time. Click the ✕ button to clear the search. The search query is saved and restored when you navigate between pages.

TECHNICAL SECTION — REAL MECHANISM

The script detects repository pages by matching the URL pattern github.com/owner/repo and filtering out non-repo pages (issues, pull requests, settings, etc.). It finds the file tree container using selectors like .file-tree, .file-tree-view, .js-file-tree, .repository-content .Box .js-navigation-container, and .file-navigation .js-navigation-container. File and directory items are extracted from the container using selectors like .js-navigation-item, .file-tree-item, .folder-item, .js-file-tree-item, and links to /blob/ or /tree/. Each item's name is extracted from data-name attributes, text content, or the URL path. The search input is inserted above the file tree container using parentNode.insertBefore. The search function builds a RegExp (or uses a simple string pattern) and tests each item's name. Matches are highlighted by adding a .bg-rfts-highlight class, and non-matches are hidden using style.display = 'none'. Parent directories of matched items are kept visible to maintain context. A MutationObserver watches for DOM changes and re-renders the search UI when the user navigates between directories.

THE PANEL

The settings panel is built with BotGentz's BGPanel component. It is draggable via its header, allowing you to reposition it anywhere on the screen. The panel snaps to the left edge by default but can be moved freely. Click the gear emoji to collapse the panel into a small bubble, and click the bubble to expand it again. The panel remembers its position per page session. Press the Escape key to quickly close or minimize the panel. The panel includes a status flash bar that provides visual feedback when settings are changed or actions are performed. All settings save automatically via GM_setValue.

PLEASE NOTE

This script requires the free BotGentz browser extension to run. It does not function as a standalone Chrome extension and does not use chrome.* APIs. GitHub frequently updates its repository page structure, which may affect the selectors used to find the file tree and items. If the search stops working, please check for script updates. The regex mode supports standard JavaScript regular expressions—invalid regex patterns will fall back to simple string matching. The script stores only your preferences and the current search query via GM_setValue. No data is sent externally—all data is stored locally in your browser. The script never reads or writes password fields, hidden inputs, or file inputs. All DOM operations use safe methods (style properties, classList, appendChild) and never use innerHTML.

Similar Apps

Log in to BotGentz

Suggest an App

Tell us what you'd find useful — if we build it, we'll email you the moment it's ready.