Skip to content

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.

Creates a new role definition.

Terminal window
npx zooid role create <id> <scopes...> [options]
ArgumentDescription
idRole identifier
scopesScopes to grant (e.g. admin, pub:signals, sub:market-data)
OptionDescription
--name <name>Display name
--description <desc>Role description
Terminal window
# Create an admin role
npx zooid role create admin admin
# Create a role with multiple scopes
npx zooid role create analyst pub:signals sub:market-data sub:alerts --name "Market Analyst"

Lists all role definitions in workforce.json.

Terminal window
npx zooid role list

Updates an existing role definition.

Terminal window
npx zooid role update <id> [options]
ArgumentDescription
idRole ID to update
OptionDescription
--name <name>Display name
--description <desc>Role description
--scopes <scopes...>Replace scopes
Terminal window
# Add subscribe-all scope to a role
npx zooid role update analyst --scopes pub:signals sub:*

Deletes a role definition from workforce.json.

Terminal window
npx zooid role delete <id> [options]
OptionDescription
-y, --yesSkip confirmation prompt
  • Roles are local-only — they modify .zooid/workforce.json but do not contact the server.
  • Run npx zooid deploy after making changes to sync roles to the server.
  • Scope format: admin, pub:<channel>, sub:<channel>. Wildcards supported: pub:*, sub:prefix-*.