Reference
CLI reference
Every apex command, generated from the CLI itself so it matches the version you install — grouped by what you are trying to do.
Install
The CLI needs Node.js 24 or later.
npm install -g @apex-actions/cli
apex --versionSign in
On your own machine, sign in through the browser. The CLI saves a token for your user only, and apex whoami tells you which credential it is using.
apex login
apex whoamiScripts and CI jobs use a token in APEX_TOKEN instead — see Tokens for scripts and CI. A token carries the permissions you give it, and each command below that reaches your repositories says which one it needs.
Sign in and tokens
apex loginSign the CLI in through the browser — on this machine, or on any device with a code; the token is saved for this user only and carries your Account's default permissions for your roleapex logoutRevoke the tokenapex loginsaved, and forget itapex whoamiWho the CLI is acting as, with which credential, and where it found itapex tokenAPI tokens for scripts and CI: create one with the permissions it needs (approved in the browser), edit, list or revoke yours.
Run locally
apex runRun a workflow locally with the same engine and executor as the service (wraps apex-runner --local)apex validateValidate workflow files against the engine (defaults to .github/workflows/*.yml)apex lspRun the workflow language server on stdio, for an editor to start as a child processapex migratePlan a migration from GitHub Actions: what runs, what does not, and what has to be re-entered
Runs and logs
apex logsStream or fetch logs for a run or jobapex searchSearch a repository’s log text across runsapex whyExplain why a run happened — or, with --delivery, why a webhook produced no run at allapex reproducePrint theapex runinvocation that reproduces a past run locally (secrets by name only)apex timingShow where a run spent its time, and which steps got slower than usualapex testsShow a run’s test results, or a repository’s unreliable tests with --flakyapex rerunRe-run a completed run — all of it, only what failed, or one job — optionally resuming from the step that failedapex dispatchTrigger workflow_dispatch with typed inputs
Repository configuration
apex secretSecrets: set a repository's secrets from the terminal, values write-onlyapex variableVariables: set a repository's non-secret configuration from the terminalapex environmentEnvironments: the protection rules a workflow can only nameapex deploymentDeployments: what is waiting for an approval, and giving oneapex approvalRuns from forks: what is waiting for approval, deciding it, and which ones waitapex scheduleSchedules: whaton: schedulewill fire, and whenapex notifyNotification routing: where a repository’s outcome changes are sentapex actionsThe action supply chain: what a repository pulls in, the policy over it, and pinningapex oidcOIDC: what this issuer publishes, and what a token says it is