JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 43
  • Score
    100M100P100Q84039F
  • License MIT

Remote Claude Code session manager — manage and access Claude Code CLI sessions from any device via web dashboard

Package Exports

  • claude-hub-cli
  • claude-hub-cli/dist/index.js

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (claude-hub-cli) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

claude-hub

npm version License: MIT

Remote Claude Code session manager — manage and access Claude Code CLI sessions from any device via a web dashboard.

Run Claude Code on your Mac. Control it from your iPhone.

npm package: claude-hub-cli | CLI command: claude-hub

Install

npm install -g claude-hub-cli

Prerequisites

  • Node.js >= 18
  • tmuxbrew install tmux (macOS) or apt install tmux (Linux)
  • Tailscale (optional, for remote access) — brew install --cask tailscale

Quick Start

# Start the dashboard
claude-hub start

# Open http://localhost:3080 in your browser
# Use the auth token printed in the terminal to log in

# Create a session
claude-hub session new my-project --path ~/Documents/github/my-project

# Expose to the internet (access from phone)
claude-hub expose

CLI Commands

Service

claude-hub start              # Start dashboard server
claude-hub start -d           # Start as background daemon
claude-hub start -p 8080      # Start on custom port
claude-hub stop               # Stop the server
claude-hub restart             # Restart the server
claude-hub status              # Show status overview

Sessions

claude-hub session new <name> [--path ~/project]   # Create session
claude-hub session list                             # List sessions
claude-hub session kill <name>                      # Kill session
claude-hub session attach <name>                    # Attach locally (tmux)

Remote Access

claude-hub expose             # Expose via Tailscale Funnel
claude-hub unexpose           # Stop remote access
claude-hub url                # Print remote URL

Configuration

claude-hub config get                    # Show all config
claude-hub config get authToken          # Show auth token
claude-hub config set port 8080          # Change port
claude-hub config set auth-token <tok>   # Set custom auth token
claude-hub config set mac-sleep off      # Disable Mac sleep
claude-hub config path                   # Show config file location

Web Dashboard

The dashboard runs at http://localhost:3080 (default) and provides:

  • Session management — Create, open, and kill Claude Code sessions
  • Web terminal — Full native Claude Code CLI in your browser via xterm.js
  • System monitor — CPU, memory, uptime, and sleep status
  • Connected devices — See who's connected

Remote Access (iPhone)

  1. Install Tailscale on your Mac and iPhone
  2. Run claude-hub expose
  3. Open the printed URL on your iPhone's Safari
  4. Paste the auth token to log in
  5. Tap Open on any session — full Claude Code CLI in your browser

Architecture

┌─────────────────────────────────────────────┐
│  claude-hub (Node.js)                       │
│                                             │
│  ┌──────────┐  ┌──────────┐  ┌───────────┐ │
│  │ Web UI   │  │ REST API │  │ WebSocket │ │
│  │ (HTML/JS)│  │ /api/*   │  │ terminal  │ │
│  └────┬─────┘  └────┬─────┘  └─────┬─────┘ │
│       │              │              │       │
│  ┌────┴──────────────┴──────────────┴─────┐ │
│  │         Session Manager (tmux)         │ │
│  └────────────────────────────────────────┘ │
│                                             │
│  ┌──────────────┐  ┌─────────────────────┐ │
│  │ Auth (token) │  │ System Monitor      │ │
│  └──────────────┘  └─────────────────────┘ │
└─────────────────────────────────────────────┘
         │
         │ Tailscale Funnel (HTTPS)
         ▼
    iPhone Safari

Config File

Stored at ~/.claude-hub/config.json:

{
  "port": 3080,
  "authToken": "auto-generated",
  "preventSleep": true,
  "defaultShell": "/bin/zsh",
  "sessions": {}
}

Development

git clone https://github.com/clark-s-dev/claude-hub.git
cd claude-hub
npm install
npm run build
npm test

# Run locally
node dist/cli/index.js start

Releasing

This project uses semantic-release for automated versioning and npm publishing. Commits to main following Conventional Commits trigger releases automatically.

feat: ...     → minor version bump
fix: ...      → patch version bump
feat!: ...    → major version bump

License

MIT