Setup CLI environment
Install the Parix CLI, sign in, and verify your session for production use.
Use this guide to prepare a workstation for the published Parix CLI. It covers the latest @parix/cli package. See the Parix CLI overview for the release these docs track.
Requirements
You need:
- Node.js 20 or newer
- npm for global installation
- a Parix account with access to an organization
- a browser for the OAuth login flow
Install the CLI
Install the CLI globally:
npm install -g @parix/cli@latestVerify the command and version:
parix --version
parix --helpThe top-level command groups are:
auth
api
database
tbSign in
The CLI targets production by default:
https://parix.ioSign in with the browser OAuth flow:
parix auth loginThe CLI stores the local session at:
~/.config/parix/session.jsonThat session includes the signed-in user, token, scopes, active organization, and the base URL used for later commands. Typical production usage needs no base URL override.
After login, confirm the session:
parix auth statusStatus output includes the signed-in user, base URL, token expiry, scopes, active organization, member role, and session file path.
Continue with Authentication for session lifecycle and organization selection, then Database and TigerBeetle for day-to-day commands.
Base URL resolution
Most workstations only need the production default. Commands that call Parix can override the origin with:
--base-url <url>or with the PARIX_BASE_URL environment variable. Use either only when you deliberately target a trusted non-default origin. Never send credentials or requests to an origin you do not trust.
API, database, TigerBeetle, and auth status resolve the target in this order:
--base-url- the base URL stored in
~/.config/parix/session.json PARIX_BASE_URLhttps://parix.io
Because a stored session wins over the environment variable, a one-shot --base-url changes the request origin for that command only. It does not obtain a new credential for that origin; the CLI still attaches the current stored bearer token. Authenticate to an origin before relying on it:
parix auth login --base-url <trusted-origin>parix auth login intentionally ignores the base URL from an existing session so a stale session cannot silently pin a new login. Login resolves --base-url, then PARIX_BASE_URL, then https://parix.io.