Install, authenticate, and choose a workspace
Install the Elva CLI to work with collections, MCP servers, and contracts from your terminal. Python 3.11 or later is required. The guides in this section use elva-cli 1.2.0 or later.
Install and upgrade
uv tool install elva-cli
uv tool upgrade elva-cli
elva --version
pipx install elva-cli
pipx upgrade elva-cli
elva --version
Run elva --help to see the commands in your installed version. Shell completion is available with elva --install-completion.
Sign in and choose a workspace
elva auth login
elva whoami
elva workspace list
elva workspace switch "Acme"
Complete the browser login shown by the CLI. The browser's selected workspace is independent of the CLI default; confirm the identity and workspace before changing resources. Use a workspace name or ID to avoid ambiguous selection.
No browser available? Run elva auth login --email you@example.com and enter the emailed code in the CLI. New users can create an account the same way with elva auth signup --email you@example.com.
Configuration
Settings resolve in this order: command-line flag, environment variable, project elva.json, selected profile, user configuration, built-in default.
- Profiles. Keep named sets of defaults, such as staging and production, and select one with --profile or ELVA_PROFILE.
- Environment variables. ELVA_TOKEN, ELVA_WORKSPACE, ELVA_COLLECTION, ELVA_PROFILE, and ELVA_TIMEOUT.
- Project file. elva.json can set workspace, collection, profile, and timeout. The CLI looks for it from the current directory up to the repository root. Use config set to write it, or add --global to write the user configuration instead.
- Credentials. elva auth login stores credentials in your operating system's keyring, with a fallback file readable only by you. Never put tokens in elva.json.
elva config set workspace "Acme"
elva config get workspace
elva config list
elva config path
elva auth logout
For unattended use, inject ELVA_TOKEN from a secret store. Global flags such as --workspace, --collection, --json, --quiet, and --yes go before the subcommand. --yes accepts the command's confirmation; use it only for changes you intend to make. Check exit codes and stderr as well as JSON output.
Every command and option is listed in the CLI command reference.
On this page
- Install, authenticate, and choose a workspace