CLI Commands
Complete reference for the hex command-line interface.
hex start
Start the Hexdeck server and dashboard. By default, the server runs in the background. On macOS, it also opens the dashboard in your browser.
hex start [options]| Option | Description | Default |
|---|---|---|
--port | Port for the server | 3002 |
--foreground | Run in foreground instead of background | false |
Examples:
# Start in background (default)
hex start
# Start on a custom port
hex start --port 4000
# Start in foreground (useful for debugging)
hex start --foregroundhex stop
Stop the background Hexdeck server.
hex stopReads the PID file at ~/.hexdeck/server.pid and sends SIGTERM to the process.
hex restart
Stop and restart the Hexdeck server. Accepts the same options as start.
hex restart [options]hex status
Check if a Hexdeck server is currently running.
hex statusPrints the server's PID, port, start time, dashboard directory, and active agent count (if the API is reachable).
hex open
Open the dashboard in your browser.
hex open [--port N]Defaults to http://localhost:3002. Pass --port if you started on a different port.
hex relay
Manage cloud relay connections. The relay command has several subcommands for connecting to Hexcore, managing targets, and selecting which projects to share.
relay <connect-link>
Add or update a relay target using a connect link from Hexcore.
hex relay <connect-link>Connect links use the hexcore+wss:// protocol and are provided on the Hexcore detail page in the cloud dashboard.
Example:
hex relay "hexcore+wss://relay.example.com/ws?p=abc&c=connectCode&n=Team"relay list
List all configured relay targets and their selected projects.
hex relay listrelay sessions
List active sessions available to relay.
hex relay sessionsShows project paths with active operator sessions, grouped by project.
relay include
Start relaying a project to a Hexcore target.
hex relay include <hexcoreId> <projectPath>The hexcoreId can be a prefix — just enough characters to uniquely identify the target.
Example:
hex relay include abc ~/Code/my-apprelay exclude
Stop relaying a project to a Hexcore target.
hex relay exclude <hexcoreId> <projectPath>relay remove
Remove a relay target entirely.
hex relay remove <hexcoreId>