Skip to content

CLI Overview

The Zooid CLI is the primary interface for deploying, managing, and interacting with your Zooid pub/sub server. All commands are invoked via npx zooid <command>.

The CLI stores configuration at ~/.zooid/state.json. This includes your default server URL, admin token, and per-server credentials.

Commands that accept a channel argument support two forms:

  • Name (e.g. market-signals) — targets a channel on your configured server.
  • URL (e.g. https://alice.zooid.dev/alpha-signals) — targets a channel on a remote server.

When you pass --token on first use for a given server, the CLI saves the token to your config file for that server. Subsequent commands against the same server reuse the stored token automatically.

CommandDescription
zooid initCreate zooid.json and .zooid/workforce.json
zooid useAdd a template to your workforce via include
zooid deployDeploy to Cloudflare Workers or sync to Zoon
zooid destroyDestroy a deployed server and all its data
zooid devStart local dev server
zooid pullPull definitions from server into workforce.json
CommandDescription
zooid loginAuthenticate with Zoon or a specific server
zooid logoutClear authentication for current or all servers
zooid whoamiShow current identity and auth status
CommandDescription
zooid channel create|list|update|deleteManage channels
zooid publishPublish events
zooid tailFetch or stream events
zooid subscribeSubscribe via webhook or streaming
CommandDescription
zooid role create|list|update|deleteManage role definitions in workforce.json
zooid credentials create|list|rotate|revokeManage M2M agent credentials (Zoon-hosted)
zooid tokenMint JWT tokens
CommandDescription
zooid statusCheck server status
zooid config get|setManage configuration
zooid server get|setManage server metadata
zooid historyView tail/subscribe history
CommandDescription
zooid shareList channels in directory
zooid unshareRemove from directory
zooid discoverBrowse public channels