zooid login
Authenticates the CLI with a Zooid server. For Zoon-hosted servers, this uses a device code flow that opens your browser. For self-hosted servers with OIDC configured, it uses the server’s own auth flow.
npx zooid login [url]Arguments
Section titled “Arguments”| Argument | Description |
|---|---|
url | Server URL (optional). Omit to authenticate with Zoon. |
Options
Section titled “Options”None.
Examples
Section titled “Examples”# Authenticate with Zoon platformnpx zooid login
# Authenticate with a specific Zoon-hosted servernpx zooid login https://beno.zoon.eco
# Authenticate with a self-hosted servernpx zooid login https://my-zooid.workers.devHow it works
Section titled “How it works”Zoon-hosted servers
Section titled “Zoon-hosted servers”- The CLI starts a device code flow with the Zoon accounts service
- Your browser opens to a login page
- You authenticate and authorize the CLI
- The CLI polls for completion and stores two tokens:
- Zooid JWT — for tenant server operations (publish, subscribe, channel management)
- Platform session — for Zoon platform operations (credentials, deploy)
Self-hosted servers
Section titled “Self-hosted servers”- The CLI opens the server’s OIDC login URL in your browser
- You authenticate with the configured OIDC provider
- The server mints a Zooid JWT and the CLI stores it
- Tokens are stored in
~/.zooid/state.jsonunder the server URL. - The CLI automatically refreshes tokens near expiry before each command.
- Run
zooid whoamito verify your identity after logging in.