zooid role
Manage role definitions in your local .zooid/workforce.json. Roles define named sets of scopes that can be used with zooid token mint --role and zooid credentials create --role.
role create
Section titled “role create”Creates a new role definition.
npx zooid role create <id> <scopes...> [options]Arguments
Section titled “Arguments”| Argument | Description |
|---|---|
id | Role identifier |
scopes | Scopes to grant (e.g. admin, pub:signals, sub:market-data) |
Options
Section titled “Options”| Option | Description |
|---|---|
--name <name> | Display name |
--description <desc> | Role description |
Examples
Section titled “Examples”# Create an admin rolenpx zooid role create admin admin
# Create a role with multiple scopesnpx zooid role create analyst pub:signals sub:market-data sub:alerts --name "Market Analyst"role list
Section titled “role list”Lists all role definitions in workforce.json.
npx zooid role listrole update
Section titled “role update”Updates an existing role definition.
npx zooid role update <id> [options]Arguments
Section titled “Arguments”| Argument | Description |
|---|---|
id | Role ID to update |
Options
Section titled “Options”| Option | Description |
|---|---|
--name <name> | Display name |
--description <desc> | Role description |
--scopes <scopes...> | Replace scopes |
Examples
Section titled “Examples”# Add subscribe-all scope to a rolenpx zooid role update analyst --scopes pub:signals sub:*role delete
Section titled “role delete”Deletes a role definition from workforce.json.
npx zooid role delete <id> [options]Options
Section titled “Options”| Option | Description |
|---|---|
-y, --yes | Skip confirmation prompt |
- Roles are local-only — they modify
.zooid/workforce.jsonbut do not contact the server. - Run
npx zooid deployafter making changes to sync roles to the server. - Scope format:
admin,pub:<channel>,sub:<channel>. Wildcards supported:pub:*,sub:prefix-*.