gh-here
v3.2.0
Published
A local GitHub-like file browser for viewing code
Readme
gh-here
A fast, local GitHub-style file browser for exploring codebases. Browse directories with a file tree, view files with syntax highlighting, and explore git diffs - all in your browser.
Installation
npx gh-hereOr install globally:
npm install -g gh-hereUsage
gh-here # Start server on available port
gh-here --open # Start and open browser (default)
gh-here --port=8080 # Use specific port
gh-here --open --browser=safari # Open in SafariFeatures
Core
- File Tree Sidebar - Navigate your repository structure with an interactive file tree
- Context-Aware Search - Global repository search or filter the file tree
- Client-Side Navigation - Fast page transitions without full reloads
- Syntax Highlighting - Support for 30+ languages via highlight.js
- Git Integration - Status indicators and diff viewer with line numbers
UI/UX
- Gitignore Toggle - Show/hide gitignored files (persists in localStorage)
- Dark/Light Themes - Toggle between themes
- README Preview - Automatic markdown rendering
- Language Statistics - See breakdown of languages in your repo
- File Operations - Copy file paths, download files, view raw content
Keyboard Shortcuts
| Key | Action |
|-----|--------|
| Cmd/Ctrl + K | Focus search |
| Escape | Close search/modals |
How It Works
gh-here runs a local Express server that serves a read-only view of your codebase. It:
- Respects your
.gitignore(optional toggle to show ignored files) - Shows git status and diffs for modified files
- Provides a familiar GitHub-like interface
- Works entirely offline - no data leaves your machine
Development
npm install
npm startRunning Tests (Optional)
Tests use Playwright for smoke testing but are optional for development:
# First time only - install Chromium for testing (~210MB)
npx playwright install chromium
# Run tests
npm testNote: End users don't need Playwright - it's only installed when you clone the repo and run npm install (devDependency).
Dependencies
- express - Web server
- highlight.js - Syntax highlighting
- marked - Markdown rendering
- @primer/octicons - GitHub icons
License
MIT
