Before the `dxb` CLI can talk to your Doxbrix workspace, it needs a **token**. The CLI authenticates with a project API token you create in the app, supplied thr...
Before the `dxb` CLI can talk to your Doxbrix workspace, it needs a **token**. The CLI authenticates with a project API token you create in the app, supplied thr...
Before the dxb CLI can talk to your Doxbrix workspace, it needs a token. The CLI authenticates with a project API token you create in the app, supplied through an environment variable, a flag, or a saved profile — which makes it work the same on your laptop and in CI.
Create a token
Go to Settings → Project → API Tokens for the project you want to work with. (Project tokens can access only that project via the dxb CLI and /api/v1.)
Name it and create it.
The token is shown once. Store it in a secret manager — you can't view it again.
Provide the token
Supply the token via the DOXBRIX_TOKEN environment variable (preferred) or the --token flag:
# Environment variable (preferred — works for every command)
export DOXBRIX_TOKEN="<your-token>"
dxb status
# Or pass it explicitly on one command
dxb status --token "<your-token>"When DOXBRIX_TOKEN is set, every command uses it automatically.
Select a project
Most commands act on one project. Choose it with the -p / --project flag, the DOXBRIX_PROJECT environment variable, or dxb project use:
# Per command
dxb status -p my-docs
# Set a default for the session
export DOXBRIX_PROJECT="my-docs"
# Or persist the selected project
dxb project use my-docsConfiguration and profiles
The CLI stores its configuration — including saved profiles and the selected project — in ~/.doxbrix/config.json. Profiles let you keep credentials for more than one workspace and switch between them:
# Use a specific profile for a command
dxb status --profile client-acmeSelect a profile with --profile or the DOXBRIX_PROFILE environment variable. To point the CLI at a non-default API endpoint, set DOXBRIX_API_URL (or pass --api-url).
| Setting | Env var | Flag |
|---|---|---|
| Token | `DOXBRIX_TOKEN` | `--token` |
| Project | `DOXBRIX_PROJECT` | `-p`, `--project` |
| Profile | `DOXBRIX_PROFILE` | `--profile` |
| API URL | `DOXBRIX_API_URL` | `--api-url` |
Authentication in CI
In CI, store the token as a secret and expose it as DOXBRIX_TOKEN:
# GitHub Actions example
env:
DOXBRIX_TOKEN: ${{ secrets.DOXBRIX_TOKEN }}
DOXBRIX_PROJECT: my-docs
steps:
- run: npm install -g @doxbrix/cli
- run: dxb lint --strict
- run: dxb push --publishSee Publish from GitHub for a complete pipeline.