Configuration
CLI configuration files, environment variables, and credential storage.
Configuration
alethia stores configuration and credentials in the user's config directory.
File Locations
| File | Purpose |
|---|---|
~/.config/alethia/auth.json | CLI authentication tokens (access + refresh JWT) |
~/.config/alethia/worker.json | Self-hosted Runner credentials (worker ID + token) |
auth.json
Created by alethia login. Contains JWT tokens for API authentication:
{
"access_token": "eyJ...",
"refresh_token": "eyJ...",
"expires_at": "2026-06-02T15:30:00Z"
}The access token is refreshed automatically before each API call if expired. See Authentication.
worker.json
Created by alethia worker register. Contains self-hosted Runner credentials:
{
"worker_id": "uuid",
"worker_token": "plaintext-token",
"api_url": "https://alethia.example.com"
}Used by alethia worker start to authenticate with the Alethia API.
Environment Variables
| Variable | Default | Purpose |
|---|---|---|
ALETHIA_WEB_ORIGIN | Production URL (baked at build time) | Override the Alethia API base URL |
This is the only environment variable alethia uses. All other configuration comes from the JSON files above or command-line flags.
Build-Time Configuration
The GoReleaser build injects ALETHIA_WEB_ORIGIN as an ldflags variable. The production build points to the production Alethia URL. For development, override with the environment variable:
export ALETHIA_WEB_ORIGIN=http://localhost:3000
alethia login # authenticates against local server