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

claude-hub

v1.0.0

Published

The command center for Claude Code - Never lose your work again

Downloads

95

Readme

Claude Hub

Never lose your Claude Code work again.

The command center for Claude Code power users

npm version npm downloads GitHub stars License

Quick Start | Features | Screenshots | Documentation


The Problem

You're deep in a coding session with Claude Code. Everything is going great. Then...

  • Terminal crashes — hours of context, gone
  • Multiple sessions — which one was working on the auth bug?
  • Cost anxiety — "How much have I spent today?"
  • Lost progress — "What was I doing before lunch?"

The Solution

Claude Hub monitors all your Claude Code sessions in real-time, automatically recovers crashed sessions, tracks costs, and preserves context across iterations.

npx claude-hub

That's it. Open http://localhost:3377 and take control.


Why Claude Hub?

| | Without Claude Hub | With Claude Hub | |--|-------------------|-----------------| | Terminal crash | Lose all context, start over | One-click recovery with full context | | Multiple sessions | Switch terminals, lose track | See all sessions in one dashboard | | Cost tracking | Check Anthropic console manually | Real-time costs with predictions | | Session context | Gone when terminal closes | Persisted and searchable | | Project overview | Scattered across directories | Aggregated by project |


Quick Start

Option 1: npx (Recommended)

npx claude-hub

Option 2: Install globally

npm install -g claude-hub
claude-hub web

Option 3: From source

git clone https://github.com/majiayu000/claude-hub.git
cd claude-hub
bun install && bun run build
bun run start web

Open http://localhost:3377


Features

Real-time Session Monitoring

Monitor all Claude Code instances across your system. See status, current file, last tool, and activity at a glance.

┌─────────────────────────────────────────────────────────────────┐
│ SESSIONS                                            3 active    │
├─────────────────────────────────────────────────────────────────┤
│ ● RUNNING   my-app          Edit: src/auth.ts      2s ago      │
│ ● WAITING   api-service     Read: README.md        5m ago      │
│ ○ IDLE      docs            Write: guide.md       15m ago      │
│ ✗ LOST      old-project     —                      2h ago      │
└─────────────────────────────────────────────────────────────────┘

One-Click Session Recovery

Terminal crashed? Session lost? Recover in seconds with full context preserved.

claude-hub recover <session-id>

Three recovery methods:

  • Resume — Restore exact session state (recommended)
  • Continue — New session in same directory
  • New — Fresh start with original prompt

Cost Analytics & Predictions

Track spending in real-time. Know exactly where your tokens go.

┌─────────────────────────────────────────────────────────────────┐
│ COST ANALYTICS                                                  │
├─────────────────────────────────────────────────────────────────┤
│ Today          $12.34  ▲ 23%                                    │
│ This Week      $67.89                                           │
│ This Month    $198.50  (Projected: $320)                        │
│                                                                 │
│ Cache Savings  $45.20  (38% of total)                           │
│ Your hit rate: 72%                                              │
└─────────────────────────────────────────────────────────────────┘

Features:

  • Per-session cost breakdown
  • Cache token tracking (creation 1.25x, read 0.1x)
  • Multi-model support (Opus, Sonnet, Haiku)
  • Daily/weekly/monthly trends

Cross-Session Memory

Claude Hub implements the "relay race" pattern — your progress persists across sessions.

┌─────────────────────────────────────────────────────────────────┐
│ SESSION MEMORY                               my-app             │
├─────────────────────────────────────────────────────────────────┤
│ Last Progress: Implemented OAuth2 login flow                    │
│                                                                 │
│ Completed:                                                      │
│   ✓ Database schema design                                      │
│   ✓ User model with bcrypt                                      │
│   ✓ JWT token generation                                        │
│                                                                 │
│ Pending:                                                        │
│   ○ Refresh token rotation                                      │
│   ○ Password reset flow                                         │
│                                                                 │
│ Known Issues:                                                   │
│   ! Token expiry not handled in middleware                      │
└─────────────────────────────────────────────────────────────────┘

When you recover a session, this context is automatically injected.

Plans Tracking

Track progress on Claude's implementation plans. See phases, tasks, and completion rates.

┌─────────────────────────────────────────────────────────────────┐
│ PLANS                                                           │
├─────────────────────────────────────────────────────────────────┤
│ Auth System Refactor                              ████████░░ 80% │
│   Phase 1: Database Schema                        ✓ Complete     │
│   Phase 2: API Endpoints                          ✓ Complete     │
│   Phase 3: Frontend Integration                   ● In Progress  │
│   Phase 4: Testing                                ○ Pending      │
└─────────────────────────────────────────────────────────────────┘

Web Dashboard

Beautiful, cyberpunk-themed dashboard with 5 color themes.

| Sessions | Analytics | Projects | |:--------:|:---------:|:--------:| | Sessions | Analytics | Projects |

Keyboard shortcuts:

  • r — Refresh sessions
  • s — Sync from Claude
  • / — Focus search
  • t — Cycle themes
  • ? — Show help

Themes: Cyberpunk, Matrix, Synthwave, Minimal, Tokyo


CLI Reference

# Core commands
claude-hub                      # Start web dashboard (default)
claude-hub list                 # List all sessions
claude-hub watch                # Live terminal monitor
claude-hub recover <id>         # Recover a lost session

# Session management
claude-hub list -s running      # Filter by status
claude-hub list -d ./my-app     # Filter by directory

# Memory management
claude-hub memory list          # List session memories
claude-hub memory show <id>     # Show memory details
claude-hub memory export <id>   # Export as recovery context

# Background service
claude-hub daemon start         # Start background monitor
claude-hub daemon stop          # Stop daemon
claude-hub hooks install        # Install Claude hooks

How It Works

┌─────────────────────────────────────────────────────────────────┐
│                        Claude Hub                                │
├─────────────┬─────────────┬─────────────┬─────────────┬─────────┤
│   Web UI    │  Terminal   │   Daemon    │   Hooks     │   API   │
│   (React)   │   (Ink)     │ (Background)│  (HTTP)     │  (REST) │
├─────────────┴─────────────┴──────┬──────┴─────────────┴─────────┤
│                                  │                               │
│  ┌───────────────────────────────▼────────────────────────────┐ │
│  │                    Session Service                          │ │
│  │  • Aggregates process state + file state                   │ │
│  │  • Detects running/waiting/idle/lost sessions              │ │
│  │  • Calculates costs with cache token support               │ │
│  └────────────────────────────────────────────────────────────┘ │
│                                  │                               │
├──────────────────────────────────┼───────────────────────────────┤
│  Process Scanner    │  Claude Parser    │  Memory System         │
│  (ps + /proc)       │  (~/.claude/)     │  (SQLite)              │
└─────────────────────┴───────────────────┴────────────────────────┘

Data flow:

  1. Process Scanner — Finds all running claude processes
  2. Claude Parser — Reads JSONL session files from ~/.claude/
  3. Aggregator — Merges process state with file state
  4. Memory System — Persists progress for recovery
  5. Web/CLI — Presents unified view

Comparison

| Feature | Manual | claude-mem | Claude Hub | |---------|:------:|:----------:|:--------------:| | Multi-session monitoring | - | - | Yes | | Session recovery | - | - | 3 methods | | Cost tracking | - | - | Yes + predictions | | Cache token analysis | - | - | Yes | | Cross-session memory | - | Yes | Yes | | Web dashboard | - | Basic | 5 themes | | Plans tracking | - | - | Yes | | Real-time hooks | - | Yes | Yes | | Background daemon | - | - | Yes | | Sub-agent tracking | - | - | Yes |


Configuration

Data stored in ~/.claude-hub/:

~/.claude-hub/
├── claude-hub.db    # SQLite database
├── config.json      # Configuration
└── logs/            # Log files

Options

{
  "scanInterval": 5000,
  "hookPort": 7890,
  "webPort": 3377,
  "logLevel": "info"
}

API

REST API available at http://localhost:3377/api

| Endpoint | Description | |----------|-------------| | GET /sessions | List all sessions | | GET /sessions/:id | Session details | | POST /sessions/:id/recover | Recover session | | GET /memory | List memories | | GET /memory/:id/context | Get recovery context | | GET /plans | List plans | | GET /usage | Cost analytics | | WS /ws | Real-time updates |


Contributing

Contributions welcome! See CONTRIBUTING.md.

# Development
bun run dev          # Watch mode
bun run typecheck    # Type check
bun test             # Run tests

Roadmap

  • [ ] Cost alerts & budgets
  • [ ] Team dashboard
  • [ ] Cursor/Copilot support
  • [ ] Session replay/timeline
  • [ ] Plugin system

Support


Built for Claude Code power users

GitHub | npm | Documentation

MIT License