Alethia Labs

Configuration

CLI configuration files, environment variables, and credential storage.

Configuration

alethia stores configuration and credentials in the user's config directory.

File Locations

FilePurpose
~/.config/alethia/auth.jsonCLI authentication tokens (access + refresh JWT)
~/.config/alethia/worker.jsonSelf-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

VariableDefaultPurpose
ALETHIA_WEB_ORIGINProduction 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

On this page