Nexra CLI
Install the nexra command, sign in through the console and work with the API catalogue, connectors, Connect runs, SDKs and MCP tokens from your terminal.
Updated 7 Oct 2026
On this page
Install
The CLI needs Node.js 22 or later and has no other dependencies.
npm install -g https://usenexra.ai/downloads/nexra-cli-0.3.0.tgz
nexra --versionTo verify the download first, compare it with the published checksum:
curl -fsSLO https://usenexra.ai/downloads/nexra-cli-0.3.0.tgz
curl -fsSL https://usenexra.ai/downloads/nexra-cli-0.3.0.tgz.sha256 | shasum -a 256 -c
npm install -g ./nexra-cli-0.3.0.tgzSign in
nexra auth loginThe CLI starts a listener on 127.0.0.1 and opens your browser at the Nexra console. Use --no-browser to print the link instead, for example over SSH with port forwarding.
Sign in if needed, check the page says Nexra CLI on this computer, and choose Sign in the CLI.
The browser returns to the CLI, which exchanges a one-time code (protected with PKCE) for a session.
Your session acts with your current role in each workspace. The CLI holds a one-hour access token and a refresh token, and renews the access token automatically while you use it:
Renewal: each renewal replaces the refresh token, extending the session by 30 days, up to 90 days after you signed in. After that, run nexra auth login again.
Copied tokens: if a refresh token is ever reused, for example after being copied to another machine, Nexra ends the session immediately.
Workspace policies: sign-in policies such as the maximum session age, and an administrator's "revoke sessions", apply exactly as they do in the browser.
See and revoke: every signed-in computer is listed under Account → Nexra CLI sessions in the console, named after the computer, and can be revoked there.
| Command | What it does |
|---|---|
nexra auth status | Shows whether you are signed in, from where, until when, and whether the session renews |
nexra auth whoami | Shows your account, workspace and role |
nexra auth logout | Ends the session on the server and removes it from this computer |
The session (access and refresh tokens) is stored in credentials.json in the CLI's configuration directory, readable only by you (mode 0600). The directory is ~/.config/nexra on macOS and Linux, %APPDATA%\nexra on Windows, or NEXRA_CONFIG_DIR if you set it. Tokens are never printed, and secrets are never accepted as command-line flags.
In CI
Automation without a browser can set NEXRA_ACCESS_TOKEN from the CI secret store; it takes precedence over a stored session. To call MCP tools from CI, use nexra mcp token (below).
Choose a workspace and defaults
nexra context use --workspace <workspace-id> --environment sandbox
nexra context show
nexra context reset--workspace on any command overrides the default for that command and is sent as X-Workspace-Id. Use --profile <name> (or NEXRA_PROFILE) to keep separate sign-ins and defaults, for example for two organisations.
Commands
API catalogue
These commands need no sign-in.
| Command | What it does |
|---|---|
nexra catalogue list [--search <text>] [--category <c>] [--status <s>] | Published API products |
nexra catalogue get <product> | One product |
nexra catalogue endpoints <product> | Its operations |
nexra catalogue versions <product> | The current version and earlier versions from the changelog |
nexra catalogue openapi <product> [--version <v>] [--out <file>] | The OpenAPI document |
nexra catalogue artifact <product> <format> [--out <file>] | A download; <format> is openapi, postman, typescript, python, go, csharp or java |
Connectors
These commands need no sign-in.
| Command | What it does |
|---|---|
nexra connectors list [--search <text>] [--category <c>] | Implemented providers with read and write counts |
nexra connectors get <key> | Provider details and every operation |
Nexra Connect
| Command | What it does |
|---|---|
nexra connect connections list | Your connections with environment, status and health |
nexra connect connections test <id> | Runs a connection health check |
nexra connect integrations list | Integrations and their flow counts |
nexra connect runs list [--flow <id>] [--status <s>] [--limit <n>] | Recent runs |
nexra connect runs get <id> | One run with steps, errors and recovery options |
nexra connect flows run <flow-id> --environment <sandbox or production> | Starts a run |
flows run generates an idempotency key unless you pass --idempotency-key. Re-running with the same key returns the original run instead of starting a new one. Production runs need an approved deployment.
SDKs
| Command | What it does |
|---|---|
nexra sdk targets | Languages and runtimes |
nexra sdk generate --product <slug> --language <lang> [--api-version <v>] [--wait] | Starts a generation job; --wait polls until it finishes |
nexra sdk jobs, nexra sdk job <id>, nexra sdk cancel <id> | Track or cancel jobs |
nexra sdk artifacts | Generated files |
nexra sdk download <artifact-id> [--out <file>] | Downloads and verifies the SHA-256 checksum |
nexra sdk compatibility --product <slug> --from <v> --to <v> | Compares two API versions |
nexra sdk releases | Recorded SDK releases |
MCP
export NEXRA_MCP_CLIENT_ID=mcp_xxxxxxxxxxxx # credential prefix
export NEXRA_MCP_CLIENT_SECRET=... # from your secret store
export NEXRA_MCP_TOKEN=$(nexra mcp token)nexra mcp token exchanges an MCP credential for a one-hour access token (see MCP authentication) and prints only the token.
Output
Every command accepts --output table (the default), json, yaml or ndjson. Tables are bold when your terminal supports it; use --no-color or NO_COLOR=1 for plain text. Fields named like tokens, secrets or passwords are always shown as [REDACTED].
nexra connect runs list --status failed --output json | jq '.[].id'Diagnose problems
nexra doctordoctor reports the CLI version, profile, API and console addresses, whether the API is reachable, where your session comes from, when it expires and who you are signed in as.
| Exit code | Meaning |
|---|---|
0 | Success |
1 | The request failed |
2 | Usage error: unknown command, missing or invalid option |
3 | Not signed in, session expired, or the API returned 401 |
4 | Permission denied (403) |
5 | Not found (404) |
7 | The API could not be reached |
9 | A downloaded file failed its checksum |
Environment variables
| Variable | Purpose |
|---|---|
NEXRA_API_URL, NEXRA_PORTAL_URL | Override the API and console addresses |
NEXRA_PROFILE, NEXRA_CONFIG_DIR | Choose a profile or configuration directory |
NEXRA_WORKSPACE, NEXRA_APPLICATION, NEXRA_ENVIRONMENT | Defaults for the current shell |
NEXRA_ACCESS_TOKEN | CI only: a session token from your secret store |
NEXRA_MCP_CLIENT_ID, NEXRA_MCP_CLIENT_SECRET | For nexra mcp token |
Everything the CLI does is also available in the console and through the platform API.
Connect a provider account across interfaces
See Connect through MCP, APIs, CLI and SDKs for account setup, exact operation selection, authentication, copyable examples, sandbox boundaries and approval troubleshooting.