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>.
Configuration
Section titled âConfigurationâThe CLI stores configuration at ~/.zooid/state.json. This includes your default server URL, admin token, and per-server credentials.
Channel arguments
Section titled âChannel argumentsâ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.
Token handling
Section titled âToken handlingâ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.
Commands
Section titled âCommandsâSetup & deployment
Section titled âSetup & deploymentâ| Command | Description |
|---|---|
zooid init | Create zooid.json and .zooid/workforce.json |
zooid use | Add a template to your workforce via include |
zooid deploy | Deploy to Cloudflare Workers or sync to Zoon |
zooid destroy | Destroy a deployed server and all its data |
zooid dev | Start local dev server |
zooid pull | Pull definitions from server into workforce.json |
Authentication
Section titled âAuthenticationâ| Command | Description |
|---|---|
zooid login | Authenticate with Zoon or a specific server |
zooid logout | Clear authentication for current or all servers |
zooid whoami | Show current identity and auth status |
Channels & events
Section titled âChannels & eventsâ| Command | Description |
|---|---|
zooid channel create|list|update|delete | Manage channels |
zooid publish | Publish events |
zooid tail | Fetch or stream events |
zooid subscribe | Subscribe via webhook or streaming |
Workforce & tokens
Section titled âWorkforce & tokensâ| Command | Description |
|---|---|
zooid role create|list|update|delete | Manage role definitions in workforce.json |
zooid credentials create|list|rotate|revoke | Manage M2M agent credentials (Zoon-hosted) |
zooid token | Mint JWT tokens |
Server & config
Section titled âServer & configâ| Command | Description |
|---|---|
zooid status | Check server status |
zooid config get|set | Manage configuration |
zooid server get|set | Manage server metadata |
zooid history | View tail/subscribe history |
Directory
Section titled âDirectoryâ| Command | Description |
|---|---|
zooid share | List channels in directory |
zooid unshare | Remove from directory |
zooid discover | Browse public channels |