npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

ghost-tab

v2.7.1

Published

Terminal + tmux wrapper for AI coding tools (Claude Code, Codex CLI, Copilot CLI, OpenCode)

Readme

Ghost Tab

A Ghostty + tmux wrapper that launches a four-pane dev session with Claude Code, lazygit, broot, and a spare terminal. Automatically cleans up all processes when the window is closed — no zombie Claude Code processes.

ghost-tab screenshot


Quick Start

npx ghost-tab

That's it — only requirements are macOS and Node.js 16+. Everything (Ghostty, tmux, lazygit, broot, Claude Code) is installed automatically.


Usage

Step 1. Open a new Ghostty window (Cmd+N)

Step 2. Use the interactive project selector:

⬡  Ghost Tab
──────────────────────────────────────

 1❯ my-app
    ~/Projects/my-app
  2 another-project
    ~/Projects/another-project
──────────────────────────────────────
  A Add new project
  D Delete a project
  O Open once
  P Plain terminal
──────────────────────────────────────
  ↑↓ navigate  ⏎ select
  • Arrow keys or mouse click to navigate
  • Number keys (1-9) to jump directly to a project
  • Letter keysA add, D delete, O open once, P plain terminal
  • Enter to select
  • Path autocomplete when adding projects (with Tab completion)
  • Plain terminal opens a bare shell with no tmux overhead

Step 3. The four-pane tmux session launches automatically with Claude Code already focused — start typing your prompt right away.

[!TIP] You can also open a specific project directly from the terminal:

~/.config/ghostty/claude-wrapper.sh /path/to/project

Hotkeys

| Shortcut | Action | |---|---| | Cmd+T | New tab | | Cmd+Shift+Left | Previous tab | | Cmd+Shift+Right | Next tab | | Left Option | Acts as Alt instead of typing special characters |


What ghost-tab Does

  1. Downloads tmux, lazygit, broot, and jq natively (no package manager required)
  2. Installs Claude Code via native installer (auto-updates)
  3. Prompts to install Ghostty from ghostty.org if not already installed
  4. Sets up the Ghostty config (with merge option if you have an existing one)
  5. Walks you through adding your project directories
  6. Installs Node.js LTS (if needed) and sets up Claude Code status line showing git info and context usage
  7. Auto-updates automatically — just run npx ghost-tab again to get the latest version

Status Line

The ghost-tab command configures a custom Claude Code status line based on Matt Pocock's guide:

my-project | main | S: 0 | U: 2 | A: 1 | 23.5%
  • Repository name — current project
  • Branch — current git branch
  • S — staged files count
  • U — unstaged files count
  • A — untracked (added) files count
  • Context % — how much of Claude's context window is used

[!TIP] Monitor context usage to know when to start a new conversation. Lower is better.


Process Cleanup

[!CAUTION] When you close the Ghostty window, all processes are force-terminated — make sure your work is saved.

The wrapper automatically:

  1. Recursively kills the full process tree of every tmux pane (including deeply nested subprocesses spawned by Claude Code, lazygit, etc.)
  2. Force-kills (SIGKILL) any processes that ignored the initial SIGTERM after a brief grace period
  3. Destroys the tmux session
  4. Self-destructs the session via destroy-unattached if the tmux client disconnects without triggering cleanup

This prevents zombie Claude Code processes from accumulating.


Architecture

Ghost Tab uses a hybrid architecture:

Layer 1: Go TUI Binary (ghost-tab-tui)

  • Interactive terminal UI components built with Bubbletea
  • Project selector, AI tool selector, settings menu, input forms
  • Outputs structured JSON for bash consumption
  • Binary: ~/.local/bin/ghost-tab-tui

Layer 2: Bash Orchestration (ghost-tab)

  • Entry point and session orchestration
  • Process management, config file operations
  • Calls ghost-tab-tui for interactive parts
  • Parses JSON responses with jq
  • Script: ~/.local/bin/ghost-tab

Dependencies:

  • Go 1.21+ (for building)
  • jq (for JSON parsing)
  • tmux (session management)
  • Ghostty (terminal emulator)

Communication:

# Bash calls Go with subcommand
result=$(ghost-tab-tui select-project --projects-file ~/.config/ghost-tab/projects)

# Go returns JSON
{"name": "my-project", "path": "/home/user/code/my-project", "selected": true}

# Bash parses with jq
project_name=$(echo "$result" | jq -r '.name')