Theme
Last updated: 2026-10-20
Use the same Even Realities account as the phone app and developer portal. Sign in once in an interactive terminal; authenticated commands reuse the saved credentials.
evenhub login
bash
evenhub login
evenhub login --email you@example.com| Option | Description |
|---|---|
-e, --email <email> | Supply the email address and skip that prompt |
The CLI prompts for your password. Login requires an interactive terminal, including with --json.
Create your Even Realities account in the phone app first. The CLI checks that the account exists before asking for a password, and enables developer access on login. An unknown account or a rejected password exits 2.
evenhub self-check
Shows the account, role and namespace associated with the saved credentials.
bash
evenhub self-check
evenhub self-check --jsonThe JSON role is numeric: 0 for a normal user, 1 for a developer and 42 for an admin. Check the signed-in account when a command reports an authentication or ownership error.
evenhub logout
bash
evenhub logoutRevokes the refresh token on the server and removes the local credentials. Use it when you intend to end the session.
The CLI attempts local removal even if server invalidation fails and reports that failure. Draft-cache cleanup errors produce a warning; they do not fail an otherwise successful login or logout.
CI jobs that reuse credentials should remove only their local copy. Calling logout also revokes the refresh token held in the CI secret, so later jobs may need a new human login.
Where credentials live
The default directory is ~/.config/evenhub/. XDG_CONFIG_HOME takes precedence when set; Windows otherwise uses %APPDATA%/evenhub/.
| File | Contents |
|---|---|
credentials.yaml | Access and refresh tokens; created with owner-only permissions |
qr.yaml | Last dev-server URL |
state.yaml | Cached upload drafts; see Builds |
The CLI refreshes expired access tokens automatically. If both tokens have expired, authenticated commands exit 2 and require another login. Refreshing updates the local credentials file.
Each device has its own credentials. The CLI does not coordinate concurrent login or logout operations in a shared config directory.
Signing in on CI
Prepare credentials before running a job:
- Run
evenhub logininteractively on a workstation. - Save the resulting
credentials.yamlas a protected file secret in your CI provider. - Set
XDG_CONFIG_HOMEto a directory owned by the job. Restore the secret to$XDG_CONFIG_HOME/evenhub/credentials.yamlwith owner-only permissions. - Run the authenticated commands, then delete the job's local credentials copy.
Use a separate config directory for concurrent jobs. When the stored refresh token expires or is revoked, log in again and replace the CI secret. The CI example assumes credentials are already available.
Pointing at another environment
| Variable | Effect |
|---|---|
EVENHUB_BASE_URL | API base; defaults to https://hub.evenrealities.com |
EVENHUB_API_URL | Override the API root directly |
Use a separate XDG_CONFIG_HOME and login for each environment. Drafts are keyed by API base URL; credentials are stored in one file per config directory. Clear both URL overrides to use production again.
Exit codes you will see here
| Code | Meaning | Next step |
|---|---|---|
| 2 | Missing or rejected credentials, expired tokens, or an unknown account | Check the account and log in again |
| 3 | Target missing or not owned by this account | Check both the package ID and the signed-in account |
See Scripting for all exit codes and partial-result handling.