Socket
Book a DemoInstallSign in
Socket

gh-here

Package Overview
Dependencies
Maintainers
2
Versions
15
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

gh-here

A local GitHub-like file browser for viewing code

latest
Source
npmnpm
Version
3.2.0
Version published
Maintainers
2
Created
Source

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-here

Or install globally:

npm install -g gh-here

Usage

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 Safari

Features

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

KeyAction
Cmd/Ctrl + KFocus search
EscapeClose 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 start

Running 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 test

Note: 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

Keywords

github

FAQs

Package last updated on 03 Jan 2026

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts