Skip to content

CLI and configuration

Terminal window
claude-code-hub [flags]

The examples use the command of a global install. With npx, put npx in front: npx claude-code-hub [flags].

Flag Default Action
--port <n> 3540 Hub port
--kanban-port <n> 3541 Kanban port
--marketplace-port <n> 3542 Marketplace port
--cost-port <n> 3543 Cost port
--memory-port <n> 3544 Memory Diagnoser port
--hub-dir <path> ~/.claude-hub The folder for the hub’s config file and token. See Run a second hub
--pool-size <n> poolSize in the config file, else 3 How many config-dir sets stay running after a switch
--disable-terminal Turn off the embedded terminal in Kanban
--no-mods modsEnabled in the config file Load no mod. See The config file
--host <addr> 127.0.0.1 Bind address. See Security.
--allowed-hosts <list> Extra host names to accept, comma-separated
--open Open the browser on start
--show-token Print the hub URL with its token even when the output is not a terminal. See Security
--detached Keep running when stdin closes. The macOS tray uses it.
--tray Windows, macOS: run the hub from a tray icon, then exit
--autostart Windows, macOS: same as --tray, and start the tray when you log on
--no-autostart Windows, macOS: stop starting the tray when you log on
--tray-status Windows, macOS: show the config dir, autostart, and whether the tray and hub run
--app-id <id> Windows, macOS, with --tray or --autostart: the installed app that Open Hub starts
-v, --version Print the version and exit
-h, --help Print the flags and exit

A flag takes its value after a space or after =: --port 4000 and --port=4000 are the same.

The hub ships a Claude Code plugin with the hub-builder skill. The skill helps an agent build on the hub: it explains how to extend the hub and make custom themes, and links each task to the page of these docs that covers it.

Terminal window
claude-code-hub --install [--dir <config dir>]
claude-code-hub --uninstall [--dir <config dir>]
claude-code-hub ext install <app id> [--dir <config dir>]
Flag Default Action
--install Install or update the hub plugin and the plugins of the enabled built-in apps (today Kanban’s) in one config dir, then exit
--uninstall Remove the hub plugin from one config dir, then exit. App plugins stay
ext install <app id> Install or update the plugin of one app, built-in or extension, then exit. The app launcher’s ⚠ opens the update window, which runs it
--dir <path> CLAUDE_CONFIG_DIR, else ~/.claude The config dir to install into or remove from

The hub does not update plugins by itself. After a hub update, run claude-code-hub --install again in each config dir to update the hub plugin and Kanban’s plugin. The app launcher shows a ⚠ on a plugin that is older than the one its app ships.

The install copies the plugin to plugin/ in the hub folder and registers that copy in the config dir. Run it once for each config dir, and again after you update the hub. Start a new Claude Code session to load the skill. The uninstall keeps the copy, because other config dirs can use it.

The hub listens on its own port and on the port of each enabled tool. The tool ports forward to the tools of the active config dir, which run on free ports that the hub picks. So the tool URLs stay the same when you switch the config dir.

Each tool’s port comes from the first of these that is set:

  1. The --<id>-port flag, for example --cost-port 4543.
  2. The port of the tool’s entry in the apps list of the config file.
  3. The tool’s default port.

If that port is busy, the hub uses a random free port for this run and logs port <n> in use, trying random port.... The port is the tool’s origin in the browser, so on a random port the tool starts with no saved browser state: pins, filters and the theme. To keep that state, set a port that is free. The banner shows the hub’s real port.

Every hub reads its config file and token from the same folder, ~/.claude-hub. To run a second hub with its own config dirs, tools and ports, give it its own folder with --hub-dir or CLAUDE_HUB_DIR:

Terminal window
claude-code-hub --hub-dir ~/.claude-hub-work --port 4540

The hub creates the folder, the config file and a new token on the first run. Set a port for each tool in that config file, or the second hub’s tools fall back to random ports while the first hub holds the defaults.

Variable Action
PORT Hub port, if --port is not set
HOST Bind address, if --host is not set
ALLOWED_HOSTS Extra host names, if --allowed-hosts is not set
CLAUDE_CONFIG_DIR The default config dir. Else ~/.claude.
CLAUDE_HUB_DIR The hub folder, if --hub-dir is not set. Else ~/.claude-hub.
CLAUDE_HUB_NO_UPDATE_CHECK Set to any value to turn off the check for a new hub version on npm.
CLAUDE_HUB_NO_ONBOARDING Set to any value to skip the welcome dialog, as onboarding: "skipped" in config.json does. Nothing is saved.

On start, the hub asks npm for the latest claude-code-hub version and keeps the answer for 12 hours. If a newer stable version exists, the hub page shows a notice in the bottom-right corner when it loads. The notice hides after 10 seconds, or when you click ×, and shows again on the next start. Click Skip this version to hide it until a later version ships. The hub skips the check when it runs from a git checkout.

Click Review update… in the notice, or open the hub settings and choose Updates, to see the update window. It shows the command that updates the hub, with a Copy button. Stop the hub, run the command, then start the hub again. The window also shows the plugins in each config dir. Click Update for one dir, or Update all dirs. Then restart the open Claude Code sessions in those dirs. After a hub update, the window opens once on the first load if a plugin is out of date.

Press Ctrl+, to open the hub settings, and Esc or Ctrl+, to close them. The list on the left has a page for General, Apps and Keyboard, then one page for each tool that has settings, such as Kanban. Press ↑ ↓ in the list to change the page, Tab to move between the controls and ← → to change a choice, or click it. The hub saves each change in the config file at once.

Setting Values Takes effect
Ctrl+Alt+W does Open the list (the config-dir palette), or Swap to last dir (see Switch with one key) At once
Instant switch-back 1 to 8 dirs whose tools stay running At the next switch to a dir that has no running tools. --pool-size overrides it, and the setting cannot change then
Manage… Opens the config-dir palette
Show, one row per tool Tab, Launcher only (hidden) or Off After a hub restart. The footer says when a restart is needed
Start, one row per tool With hub, or On demand (deferredStart) After a hub restart

The hub does not let you turn off every tool.

The hub keeps its settings in config.json in the hub folder, ~/.claude-hub by default:

{
"configDirs": ["C:\\Users\\me\\.claude", "C:\\Users\\me\\.claude-work"],
"activeConfigDir": "C:\\Users\\me\\.claude",
"previousConfigDir": "C:\\Users\\me\\.claude-work",
"configDirSwitch": "swap",
"poolSize": 2,
"terminal": { "enabled": false },
"apps": [
{ "id": "kanban" },
{ "id": "cost", "port": 4543 },
{ "id": "marketplace", "enabled": false }
],
"keys": { "hub.projectPicker": "ctrl+alt+o" }
}
  • configDirs, activeConfigDir and previousConfigDir are the config-dir list, the active dir and the dir used before it. The config-dir palette writes them. You do not need to edit them.
  • configDirSwitch is what Ctrl+Alt+W does: "palette" (the default) opens the config-dir palette, "swap" switches to the previous dir. poolSize is how many config-dir sets stay running, 1 to 8, 3 by default. The hub settings write both.
  • terminal is for you to edit. "enabled": false turns off the embedded terminal. The hub gives the whole block to Kanban as its terminal config, so you can also set keys like shell, fontFamily, maxSessions (most terminals open at the same time, 30 by default) and restore (on by default: resume the terminals that were open when the hub last stopped; false turns it off) here. See Terminal config in the Kanban docs. The hub keeps this block when it writes the file.
  • apps is for you to edit. It sets which tools run and the tab order. The ids are kanban, marketplace, cost and memory. The tools you list come first, in list order, and the tools you do not list follow in the default order. A tool with "enabled": false does not start, gets no tab and no port, and links from other tools to it do nothing. With Kanban off, the embedded terminal is off and the project palette has no project list. Alt+1 to Alt+4 follow the tab order. port sets the tool’s port, a whole number from 1 to 65535 (see Ports). The hub logs and ignores a value that is not valid, such as "4543" in quotes. "hidden": true keeps a tool running and in the app launcher, but gives it no Alt+number key and no place in the Ctrl+Alt+Left/Right cycle. "deferredStart": true does not start the tool with the hub; start it from the app launcher with Ctrl+S. See Apps entry. The hub keeps this list when it writes the file, and does not start when every tool is off.
  • keys is for you to edit. It changes the hub’s keys. See Change the keys. The hub keeps this block when it writes the file.
  • onboarding is "done" or "skipped". The setup checklist writes it when you finish or skip it. Until then, the hub page opens the checklist on each load if a step is not done. Delete the key to see the checklist again, or open it from the hub settings.
  • mods is the list of installed mods. ext install and ext remove write it. A mod with "enabled": false does not load. "modsEnabled": false turns off every mod, as --no-mods does. Use it when a mod breaks a page. To check without a restart, open the hub at /?nomods: that page loads no mod.

Restart the hub after you edit the file by hand.

The paths are for the default hub folder. With --hub-dir or CLAUDE_HUB_DIR, the files are in that folder.

File Content
~/.claude-hub/config.json The config-dir list, the active dir, and your terminal block, apps list and keys
~/.claude-hub/token The hub token
~/.claude-hub/plugin/ The copy of the hub plugin that --install writes
~/.claude-hub/hub.json The process id and port of the running hub. A second hub for the same hub dir reads it, prints the running hub’s URL and exits.
~/.claude-hub/tray/, hub.log, tray.log, tray.pid The tray files, on Windows and macOS, when you use --tray or --autostart

The hub also reads ~/.claude-hub/themes.json, which you write. It holds your custom color themes.

The tools write their own files. See their docs: