CLI configuration

Configure the Vex CLI once, then keep context explicit

Vex stores control-plane authentication and defaults locally, while repository workspace policy stays with the repository. Keep tokens out of shell history and project files.

Sign in and inspect

vex login opens the browser flow and writes the successful control-plane login to ~/.config/vex/config.toml. It also makes a best-effort update to your JJ user identity. Use a prompted token rather than placing a token in shell history.

vex login
vex whoami
vex settings show --format json

For a headless login, use vex login --no-browser and complete the printed verification URL elsewhere. To replace or remove a local login, use vex login again or vex logout.

Choose an organization context

An organization default makes org-scoped commands predictable without guessing from the current directory. Switch by an accessible slug, exact name, or id, then inspect the resolved context.

vex context switch <org>
vex context show --format json
vex context clear

Set a datacenter default when you need one

Infrastructure-aware commands can use a saved default datacenter. Set it deliberately, inspect the resolved config, or clear it to return to command-level selection.

vex settings set-default-datacenter lon1
vex settings show --format json
vex settings clear-default-datacenter

Know which configuration wins

Per-command flags

Use flags such as --api-base-url or --api-token for a one-off override.

Environment

VEX_API_BASE_URL, VEX_API_TOKEN, and default-context variables override local file values.

Local config file

~/.config/vex/config.toml holds API and defaults for your current OS or WSL distribution.

Do not copy the config file between machines or commit it. On Windows + WSL, the WSL profile is separate from Windows desktop configuration.

Keep workspace policy with the repository

Local multi-workspace behavior is configured in .vex/workspace.toml, not in the global CLI config. Scaffold it from the repository, review the generated policy, then create an isolated workspace outside the checkout by default.

cd ~/src/home
vex ws config --init
vex ws config --format json
vex ws create feature-name