JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 43
  • Score
    100M100P100Q83922F
  • 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

Getting Started

Step 1: Install (Mac)

# Install claude-hub
npm install -g claude-hub-cli

# Install tmux (required)
brew install tmux

# Install Tailscale (required for remote access from iPhone)
brew install --cask tailscale

Step 2: Start the server

claude-hub start

It prints your dashboard URL and auth token:

  claude-hub

  Dashboard:    http://localhost:3080
  Auth token:   abc123...

  Press Ctrl+C to stop

Save the auth token — you'll need it to log in.

Step 3: Open the dashboard

Open http://localhost:3080 in your browser. Paste the auth token to log in.

Step 4: Create a session

  1. Click New in the dashboard
  2. Enter a name (e.g. my-project)
  3. Enter your project path (e.g. ~/Documents/github/my-project)
  4. Click Create

This starts Claude Code in a persistent tmux session.

Step 5: Use the terminal

Click on the session in the left panel. A terminal opens on the right with Claude Code running — type and interact just like your local terminal.

Step 6: Access from iPhone (anywhere)

One-time setup:

  1. Open the Tailscale app on your Mac, sign in
  2. Install Tailscale on your iPhone (App Store), sign in with the same account
  3. Enable Funnel — run on your Mac:
    claude-hub expose
    If it asks you to enable Funnel, open the link it gives you and enable it, then run claude-hub expose again.
  4. It prints a URL like:
    https://your-macbook.tail1234.ts.net

From iPhone:

  1. Make sure Tailscale is connected on your iPhone
  2. Open Safari and go to the URL above
  3. Paste your auth token
  4. Tap a session — full Claude Code CLI in your browser

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

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