Reference
apex token
API tokens for scripts and CI: create one (approved in the browser), list yours, revoke one.
Also on the dashboard at /settings/tokens
apex token [command]Examples
Create a token held to one repository, approved in the browser, and print it once.
apex token create deploy-bot --repo acme/web --expires-in-days 30Every token you hold, expired and revoked ones included.
apex token list --allRevoke one token by the id apex token list shows; it stops working at once.
apex token revoke 0b6f1c2e-9d4a-4f7e-8a31-5c2d9e7b1a40Subcommands
apex token createCreate an API token for a script or CI system, approved in the browser; the token is printed once and not savedapex token listYour API tokens — names and last four characters, never the tokensapex token revokeRevoke one of your API tokens by id, or all of them; it stops working immediately
apex token create
Create an API token for a script or CI system, approved in the browser; the token is printed once and not saved
apex token create [options] <name>| Argument | Description |
|---|---|
<name> | what the token is for, as the token list will show it (1–100 characters) |
| Option | Description |
|---|---|
--expires-in-days <days> | days until the token expires, 1–90 (default 30) |
--repo <owner/repo> | hold the token to this repository (repeatable, up to 100); omit for every repository you administer |
--no-browser | print the approval URL instead of opening a browser |
--json | print the token and its details as JSON on stdout |
apex token list
Your API tokens — names and last four characters, never the tokens
apex token list [options]| Option | Description |
|---|---|
--all | include expired and revoked tokens |
--json | machine-readable output |
apex token revoke
Revoke one of your API tokens by id, or all of them; it stops working immediately
apex token revoke [options] [id]| Argument | Description |
|---|---|
[id] | the token id, from apex token list |
| Option | Description |
|---|---|
--all | revoke every token you hold, including the one this CLI is using |