Latest Threat ResearchGlassWorm Loader Hits Open VSX via Developer Account Compromise.Details
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

Source
npmnpm
Version
1.1.0
Version published
Maintainers
2
Created
Source

gh-here

A local GitHub-like file browser for viewing and exploring codebases in your browser. Launch it in any folder to get a beautiful web-based directory browser with syntax highlighting and powerful navigation features.

Why?

TUIs (Terminal User Interfaces) like Claude Code, Google Gemini CLI, and Cursor have become very popular tools for working on codebases, but they don't provide a visual view into the directories and files themselves. gh-here exists to fill that gap, so you can easily explore your project files in a familiar GitHub-esque browser GUI.

Installation

Run gh-here directly with npx (no installation required):

npx gh-here

Or install it globally:

npm install -g gh-here

Usage

Navigate to any directory and run:

gh-here                           # Start server on available port
gh-here --open                    # Start server and open browser
gh-here --port=8080               # Start server on port 8080
gh-here --open --browser=safari   # Start server and open in Safari
gh-here --open --browser=arc      # Start server and open in Arc

The app will automatically find an available port starting from 5555 and serve your current directory with a GitHub-like interface.

Features

📁 File Browsing

  • Beautiful directory browsing with specific file type icons
  • README preview with beautiful markdown rendering
  • Language statistics for project overview
  • Quick actions (copy path, download files, edit, rename, delete)
  • .gitignore support with toggle functionality
  • File and folder creation, editing, renaming, and deletion

🎨 Code Viewing & Editing

  • VS Code-quality Monaco Editor with advanced syntax highlighting for 30+ languages
  • GitHub-style line numbers with selection (click, shift-click, ctrl-click)
  • Professional in-browser file editing with auto-save to localStorage
  • Draft management with persistence across sessions
  • Raw and rendered markdown views
  • Shareable URLs with line selections (#L10-L20)
  • Monaco Editor features: IntelliSense, bracket matching, folding

🔀 Git Integration

  • Automatic git repository detection
  • Clean git status indicators with colored dots in dedicated column
  • Smart status detection for files within untracked directories
  • Professional inline diff viewer with syntax highlighting
  • View/Diff/Edit mode toggle for files with changes
  • Beautiful raw git diff display with color coding
  • Git branch display in navigation header
  • Visual status indicators: modified (dot), untracked (purple dot), added, deleted

⌨️ Keyboard Navigation

  • j/k or arrow keys to navigate files
  • Enter or o to open files/folders
  • e to edit focused file
  • c to create new file
  • / or s to focus search
  • h to go up directory
  • t to toggle theme
  • i to toggle .gitignore filter
  • d to show diff for focused file (if git changes)
  • r to refresh
  • ? to show keyboard shortcuts
  • Ctrl/Cmd + S to save file (in editor)
  • Esc to close editor/dialogs

🌙 Themes & UI

  • GitHub dark and light themes
  • Smart header path (shows "gh-here" at root, path when browsing)
  • Search functionality with keyboard shortcuts
  • Breadcrumb navigation
  • Error handling and loading states
  • Notification system for user feedback

Language Support

Supports syntax highlighting for 30+ languages including JavaScript, TypeScript, Python, Go, Rust, Java, C/C++, and many more through Monaco Editor integration.

Keyboard Shortcuts

ShortcutAction
j / Move down
k / Move up
Enter / oOpen file/folder
eEdit focused file
cCreate new file
hGo up directory
/ / sFocus search
Ctrl/Cmd + KFocus search
Ctrl/Cmd + GGo to top
Shift + GGo to bottom
tToggle theme
iToggle .gitignore filter
dShow diff for focused file
rRefresh page
?Show keyboard shortcuts
Ctrl/Cmd + SSave file (in editor)
EscClose editor/dialogs

Line Selection (Code Files)

  • Click line number: Select single line
  • Shift + Click: Select range
  • Ctrl/Cmd + Click: Multi-select lines
  • URLs: Automatically updated (#L5, #L10-L20, #L1,L5-L10)

Development

npm install
npm start

Navigate to http://localhost:5555 to view the interface.

Dependencies

  • express - Web server
  • highlight.js - Syntax highlighting
  • marked - Markdown rendering
  • @primer/octicons - GitHub icons

Keywords

github

FAQs

Package last updated on 05 Sep 2025

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