hub
Named workspace connections for pushing, pulling, and sharing artifacts on Hub.
A hub connection is a named link between your local Treeship and a workspace on Hub. You push receipts to it. Other people verify them there. Think of hub connections like tmux sessions -- named connections you can attach, detach, and kill independently.
Most developers need exactly one hub connection. Multiple hub connections exist when receipts need to go to separate workspaces (personal vs work, your company vs a client).
Commands
| Command | Description |
|---|---|
treeship hub attach | Connect to Hub (creates new or reconnects) |
treeship hub detach | Disconnect active hub connection (keeps keys) |
treeship hub ls | List all known hub connections |
treeship hub status | Show active hub connection details |
treeship hub use <name> | Switch active hub connection |
treeship hub push <id> | Push artifact to active hub connection |
treeship hub pull <id> | Pull artifact from Hub |
treeship hub open | Open workspace in browser |
treeship hub kill <name> | Remove a hub connection |
treeship hub attach
Connects to Hub. If the hub connection name already exists locally with keys, reconnects without re-authenticating. If new, runs the device flow.
treeship hub attach visit treeship.dev/hub/activate
code: 4b0a-6d36
attached
name: default
hub id: hub_661e5463912d
endpoint: api.treeship.dev
workspace: treeship.dev/workspace/hub_661e5463912dtreeship hub attach --name acme-corpCreates a hub connection named "acme-corp" pointing at a separate workspace.
treeship hub attach --name acme-corpIf "acme-corp" already exists with keys, reconnects instantly without the browser flow.
reconnected
hub: acme-corp
hub id: hub_f7e6d5c4b3a2| Option | Description |
|---|---|
--name <name> | Hub connection name (default: "default") |
--endpoint <url> | Hub API endpoint (default: https://api.treeship.dev) |
DPoP Security
All Hub requests use RFC 9449 DPoP proof-of-possession. Every request carries a DPoP JWT signed by the hub key. Stolen credentials are useless without the private key.
treeship hub detach
Disconnects the active hub connection. Keys are preserved locally so you can reconnect later.
treeship hub detachdetached from acme-corp
keys preserved
reconnect: treeship hub use acme-corptreeship hub ls
Lists all known hub connections.
treeship hub lsNAME HUB ID ENDPOINT STATUS
--------------------------------------------------------------------------------
default hub_661e5463912d api.treeship.dev active
work hub_a2b3c4d5e6f7 api.treeship.dev
acme-corp hub_f7e6d5c4b3a2 api.treeship.devtreeship hub status
Shows the currently active hub connection with details.
treeship hub statushub: default
hub id: hub_661e5463912d
key: key_9f8e7d6c (ed25519)
endpoint: api.treeship.dev
workspace: treeship.dev/workspace/hub_661e5463912dtreeship hub use
Switches the active hub connection without re-authenticating. Accepts name or hub ID.
treeship hub use work
treeship hub use hub_a2b3c4d5e6f7treeship hub push
Push an artifact to Hub. Returns a shareable verify URL.
treeship hub push art_f7e6d5c4
treeship hub push lasttreeship hub push art_f7e6d5c4 --hub acme-corp
treeship hub push last --hub worktreeship hub push art_f7e6d5c4 --allPushes to every known hub connection. The verify URL is the same across all hub connections -- artifacts are content-addressed.
| Option | Description |
|---|---|
--hub <name|id> | Push to a specific hub connection |
--all | Push to all known hub connections |
treeship hub pull
Pull an artifact from Hub into local storage. No authentication required.
treeship hub pull art_f7e6d5c4
treeship hub pull art_f7e6d5c4 --hub acme-corptreeship hub open
Opens the active workspace in the browser. Prints the URL regardless.
treeship hub open
treeship hub open --hub acme-corp
treeship hub open --no-opentreeship hub kill
Removes a hub connection from local config. Prompts for confirmation.
treeship hub kill acme-corp
treeship hub kill acme-corp --forceArtifacts already pushed to Hub remain there -- they are content-addressed and independently verifiable. Only the ability to push new artifacts to that workspace is removed.
Config
Hub connections are stored in ~/.treeship/config.json:
{
"hub_connections": {
"default": {
"hub_id": "hub_661e5463912d",
"key_id": "key_9f8e7d6c",
"endpoint": "api.treeship.dev"
},
"work": {
"hub_id": "hub_a2b3c4d5e6f7",
"key_id": "key_9f8e7d6c",
"endpoint": "api.treeship.dev"
}
},
"active_hub": "default"
}Configs from v0.1/v0.2 (flat hub object) are automatically migrated to the new hub_connections format on first run. No manual action required.