Working with fleets
This is the task-focused page for fleets in Connect. For what a fleet is — the tenant boundary that owns machines, sessions, members, and keys — see the concept page: Fleets.
Every cmdop connect operation runs inside one active fleet. The
fleet you are signed in to determines which machines you can list and
reach.
How you authenticate to a fleet
The CLI authenticates with OAuth only. Run cmdop login to perform
the browser device flow; the resulting access token is stored in the OS
keyring (with an encrypted-file fallback on headless hosts), and every
cmdop connect call resolves it automatically.
Your fleet membership is carried in that token. There is no local
API-key file, no --api-key flag, and no CMDOP_API_KEY environment
variable — those were removed. See
Credential resolver for the single-source
model.
List machines in the active fleet
# all machines in the active fleet
cmdop connect --list
# only the ones currently online
cmdop connect --list --online
# JSON for scripting
cmdop connect --list --jsoncmdop connect --list only shows machines scoped to the current fleet —
members of one fleet cannot see another fleet’s machines.
Switch the active fleet
There is no cmdop workspace verb and no cmdop connect workspace
subcommand. Because fleet membership lives in the OAuth token, you change
the active fleet in the web cabinet and then refresh the token:
# pick the fleet in the dashboard, then refresh the stored token
cmdop loginAfter a fresh login the active fleet is updated automatically on the next connect.
Switching the active fleet causes the daemon to drop and re-establish its relay connection. Sessions on the old fleet are not visible from the new one.
Server-side fleet migration
When a logged-in user changes the active fleet in the web cabinet, the
server notices the new fleet in the next OAuth-bearing call and migrates
the machine record from the old fleet to the new one. This is what lets
you sign up under a personal fleet and later move a machine into a team
fleet without re-running cmdop agent register.
Point a fleet at a custom relay
Most users use the default cloud relay. For on-prem or staging
deployments, a fleet can be pointed at a custom gRPC endpoint
server-side (the Workspace.Server field). When set, cmdop connect
dials that endpoint instead of the default relay.
Common multi-fleet patterns
- Production / staging split. Two fleets so a misconfigured CI job cannot accidentally reach production.
- Multi-tenant consultancy. One fleet per customer, switched per engagement; re-login keeps the active selection current.
- Personal vs company. A personal fleet for your own laptop, plus a team fleet shared with co-workers.
Related
What a fleet is — the tenant boundary, roles, and identity model.
Credential resolverThe single OAuth source that authenticates every connect call.
Machines & identityHow machines are scoped to a fleet and how the resolver picks one.
cmdop connect (verb)The full CLI surface for cmdop connect.