W3 GitHub Search Extension
A VSCode extension that enables searching for keywords across your synced GitHub repositories using git grep and GitHub CLI.
Features
- 🔍 Powerful Search: Search across multiple GitHub repositories with exclude patterns
- 🎯 Git Grep Integration: Fast and efficient search using native git grep
- 📊 Rich Results UI: Navigate search results with prev/next buttons, grouped by repository
- 🔒 Secure: Uses GitHub CLI authentication (no manual token management)
- ⚙️ Configurable: Customize search options like case sensitivity and context lines
- 📂 Repository Management: Sync and manage GitHub repositories locally via webview UI
- 🏢 Organization Support: Sync repositories from your GitHub organizations
- 🌿 Branch Selection: Choose specific branches to sync
- 📦 Bulk Operations: Sync/remove multiple repositories at once with filters
- 🗑️ Bulk Remove: Remove selected or all visible synced repositories
Requirements
- GitHub CLI (
gh) must be installed: https://cli.github.com/
- Git must be installed and available in PATH
- Authenticated with GitHub CLI (run
gh auth login)
Installation
Install from Open VSX Registry:
ext install w3-management.w3-search-on-github
Or search for "W3 GitHub Search" in VS Code Extensions.
Commands
- W3 GitHub Search: Check GitHub CLI Authentication - Verify GitHub CLI is installed and authenticated
- W3 GitHub Search: Start searching on Github - Open the repository management UI
Usage
1. Install and Authenticate GitHub CLI
# Install GitHub CLI (if not already installed)
# macOS
brew install gh
# Windows
winget install GitHub.cli
# Linux
# See https://github.com/cli/cli/blob/trunk/docs/install_linux.md
# Authenticate with GitHub
gh auth login
2. Check Authentication
- Open Command Palette (
Cmd+Shift+P or Ctrl+Shift+P)
- Run
W3 GitHub Search: Check GitHub CLI Authentication
- Verify you see "✓ GitHub CLI is authenticated"
3. Open Repository Management UI
- Open Command Palette
- Run
W3 GitHub Search: Start searching on Github
- The webview UI will open with three tabs:
- My Repositories: Your personal GitHub repos
- Organization Repositories: Repos from organizations you're a member of
- Search: Search across all synced repositories
4. Sync Repositories
My Repositories Tab
- Browse your personal repositories
- Filter by sync status (All/Synced/Unsynced)
- Search repositories by name
- Click Sync on any repository to clone/update it
- Choose branch (default or custom)
- Use Sync All Visible or Sync All with Branch... for bulk operations
Organization Repositories Tab
- Select an organization from the dropdown
- Browse organization repositories
- Same sync options as personal repos
Bulk Remove
- Check repositories you want to remove
- Click Remove Selected to delete checked repos
- Click Remove All Visible to delete all currently displayed synced repos
5. Search Across Repositories
- Go to the Search tab
- Enter your search keyword
- Configure options:
- Case Sensitivity: Choose case-sensitive or insensitive search
- Context Lines: Number of lines to show before/after match (0-10)
- Exclude Patterns: Comma-separated patterns to exclude (e.g.,
node_modules,*.test.js,dist)
- Click Search
- Navigate results:
- Use ← Prev Repo / Next Repo → to switch between repositories
- All matches in current repo are displayed
- Click any code block to open the file in VS Code at that line
Configuration
Configure the extension in VSCode settings:
w3-search-on-github.storageLocation: Local directory for synced repositories (default: ~/.w3-github-repos)
Features in Detail
Repository Sync
- Syncs repositories with
--depth 1 for faster cloning
- Automatically deletes and re-clones on each sync for consistency
- Stores sync metadata (branch and timestamp) for each repository
- Displays last sync time in human-readable format (e.g., "2h ago")
Search
- Uses native
git grep for fast searching
- Supports regex patterns
- Configurable context lines
- Exclude patterns to filter out unwanted files
- Click-to-open functionality for instant file navigation
UI Features
- Repository count display
- Filter by sync status
- Search/filter repositories by name
- Bulk operations with visual feedback
- Native VS Code dialogs for confirmations
License
MIT
Support
For issues, feature requests, or contributions, please visit:
https://github.com/w3-management/w3-search-on-github
| |