Project configuration
The CLI reads its settings from a few places: flags, environment variables, an optional per-project .revenexx.yaml, and the global files it writes itself. There is no revenexx.json project file and no init step. Knowing which source holds what makes the CLI predictable across a local workspace and a CI pipeline.
How credentials resolve
Any command that needs auth resolves three values — the API key, the endpoint, and the tenant — from the first source that has them. The order:
- CLI flag —
--token,--endpoint,--tenant - Environment variables —
REVENEXX_API_KEY,REVENEXX_API_URL,REVENEXX_TENANT - Project file — the nearest
.revenexx.yaml, walking up from the current directory - Global config —
~/.revenexx/prefs.json, written byrevenexx login - Built-in default — the endpoint defaults to
https://api.revenexx.com
The tenant slug has its own order: --tenant, then ~/.revenexx/tenant (set by tenants use), then REVENEXX_TENANT, then .revenexx.yaml. See Authentication for the full picture.
Configuration files
| File | Scope | Holds |
|---|---|---|
.revenexx.yaml | Project (nearest, walking up) | Endpoint, API key (token:), tenant, and the defaultMode for this workspace. You write this by hand; it's read during credential resolution. |
~/.revenexx/prefs.json | Global (per machine) | Saved login session and endpoint, written by revenexx login. |
~/.revenexx/tenant | Global (per machine) | The active tenant slug, written by revenexx tenants use. |
A .revenexx.yaml lets you commit per-project context (endpoint and tenant) to a repo and keep the key in the environment. A minimal one:
apiUrl: https://api.revenexx.com
tenant: acme
# token: rvxk_... # prefer REVENEXX_API_KEY in the environment for secrets
# defaultMode: tui # tui (default) | guided | help — see Default mode below
You can also set the global defaults with the client command instead of editing files:
revenexx client --endpoint https://api.revenexx.com
revenexx client --key <API_KEY>
revenexx client --self-signed true
Environment variables
For CI and scripts, set credentials in the environment instead of files. These override the config files during credential resolution:
| Variable | Sets |
|---|---|
REVENEXX_API_KEY | The gateway API key (the token used to authenticate). |
REVENEXX_API_URL | The API endpoint. Defaults to https://api.revenexx.com. |
REVENEXX_TENANT | The tenant slug. |
REVENEXX_SENSITIVE_TENANTS | Comma-separated list of tenant slugs always treated as production (same as revenexx client --sensitive-tenants). |
REVENEXX_NO_TUI | Set to 1 (any value other than 0/false) to stop a bare revenexx from launching the full-screen app — see Default mode. |
Default mode
On an interactive terminal, a bare revenexx — with no command and no --json or --help — launches the full-screen app (TUI) by default. Two settings change what that bare invocation does; explicit subcommands (repl, tui, any service command) always win regardless of either.
| Source | Value | Effect |
|---|---|---|
REVENEXX_NO_TUI env var | 1 / any value other than 0/false | A bare revenexx falls back to the guided picker. |
defaultMode: in .revenexx.yaml | tui | A bare revenexx launches the full-screen app (the default). |
guided | A bare revenexx opens the guided command picker. | |
help | A bare revenexx prints usage and exits. |
REVENEXX_NO_TUI takes precedence over the config file, and both apply only to an interactive terminal — a pipe, CI, --json, or --help always prints help and never opens an interactive surface.
defaultMode: guided
What's next
- Run the CLI non-interactively with these variables.
- Generate types from your tenant's schema.