avr token
Create and manage scoped access tokens.
avr token [OPTIONS] COMMAND [ARGS]...A scoped access token is a credential bound to one organization that expires within seven days. It reaches only the repositories and VMs it names, and it cannot create further tokens. To use one, set AVR_TOKEN to the credential and AVR_ORG to the organization ID.
Subcommands
Section titled “Subcommands”avr token create
Section titled “avr token create”Create a scoped token and print its credential.
avr token create [OPTIONS]The credential is shown once and cannot be retrieved later. A token needs at least one of --repo, --vm or --allow-vm-create. Repository grants are read-only and VM grants are admin; an optional level suffix (--repo acme/api:read, --vm cvm-abc123:admin) must name that level.
The command prints export lines for AVR_TOKEN and AVR_ORG. A scoped token needs the org-... ID in AVR_ORG or --org, ignores the stored organization and cannot create further tokens. Pass run IDs rather than console URLs, whose organization slug a scoped token cannot resolve. If the request is interrupted or the server answers with a 5xx error, a token may already exist: check avr token list before retrying. A 404 names its reason; if scoped tokens are not enabled for the organization, contact support@avrea.com.
Examples: avr token create --name ci-read --repo acme/api --repo acme/web avr token create --name agent --vm cvm-abc123 --ttl 30m avr token create --name sandbox --allow-vm-create --vm-create-limit 3 avr token create --name ci-read --repo acme/api --json token --jq .tokenJSON FIELDS allow_vm_create, created_at, expires_at, grants, id, last_used_at, name, organization_id, revoked_at, revoked_reason, token, user_id, vm_create_count, vm_create_limitOptions
--name<TEXT>— Token name (1-100 characters). (required)--repo, -R<TEXT>— Grant read access to a repository (org/repo or rep-xxx). Repeatable. (repeatable)--vm<TEXT>— Grant admin access to a VM, by VM ID. Repeatable. (repeatable)--allow-vm-create— Let the token create VMs.--vm-create-limit<INTEGER RANGE>— Max VMs the token may create; needs --allow-vm-create. The server default is 1.--ttl<TEXT>— Lifetime: e.g. 30m, 8h, 7d, or a number of seconds. 60 seconds to 7 days; the server default is 8 hours.--org, -o<TEXT>— Organization ID or slug. Uses default org if not specified (see: avr config set org).--json<TEXT>— Output JSON. Pass comma-separated field names, "*" for all fields, or "?" to list available fields.-q, --jq<TEXT>— Filter --json output through a jq expression.
avr token list
Section titled “avr token list”List live tokens, newest first.
avr token list [OPTIONS]Shows your own tokens, or every member's when you are an organization
admin. Revoked and expired tokens are not listed; avr token view still
reads them by ID.
Examples: avr token list avr token list --json id,name,expires_atJSON FIELDS allow_vm_create, created_at, expires_at, grants, id, last_used_at, name, organization_id, revoked_at, revoked_reason, user_id, vm_create_count, vm_create_limitOptions
--org, -o<TEXT>— Organization ID or slug. Uses default org if not specified (see: avr config set org).-L, --limit<INTEGER RANGE>— Max tokens to return. (default:50)--json<TEXT>— Output JSON. Pass comma-separated field names, "*" for all fields, or "?" to list available fields.-q, --jq<TEXT>— Filter --json output through a jq expression.
avr token revoke
Section titled “avr token revoke”Revoke a token.
avr token revoke [OPTIONS] TOKEN_IDRequests made with the token are refused from then on. Revoking a token that is already revoked succeeds.
Examples: avr token revoke <token-id> avr token revoke <token-id> --yesArguments
TOKEN_ID
Options
--org, -o<TEXT>— Organization ID or slug. Uses default org if not specified (see: avr config set org).--yes, -y— Skip the confirmation prompt.
avr token view
Section titled “avr token view”Show a token's details and grants, including a revoked or expired one.
avr token view [OPTIONS] TOKEN_IDThe credential itself is never shown again after avr token create.
Examples: avr token view <token-id> avr token view <token-id> --json grantsJSON FIELDS allow_vm_create, created_at, expires_at, grants, id, last_used_at, name, organization_id, revoked_at, revoked_reason, user_id, vm_create_count, vm_create_limitArguments
TOKEN_ID
Options
--org, -o<TEXT>— Organization ID or slug. Uses default org if not specified (see: avr config set org).--json<TEXT>— Output JSON. Pass comma-separated field names, "*" for all fields, or "?" to list available fields.-q, --jq<TEXT>— Filter --json output through a jq expression.