Skip to main content
Setup commands are shared by v1 and v2. A profile stores one API key and one host, and lago v2 commands reuse it: the CLI sends them to /api/v2 on the same host.

init

A wrong key writes nothing and exits 3. --region us --api-url https://api.eu.getlago.com is a usage error, exit 2, not a silent override. whoami prints RESOLVED_API_URL with the /api/v1 base the profile holds. lago v2 requests go to the same host under /api/v2. Add --dry-run to any lago v2 write to see the exact URL.

whoami and doctor

whoami prints the organization (name, id, default currency, timezone), the profile, the mode, and RESOLVED_API_URL. The organization timezone matters in v2: a Rate’s effective_from cannot be before today in that timezone. doctor checks configuration, permissions and authentication, and --bundle-path writes a sanitized archive to attach to a support ticket.

version and upgrade

SPEC_VERSION is the v1 OpenAPI version the binary was generated from. SPEC_V2_VERSION and SPEC_V2_SHA256 identify the pinned API v2 document behind lago v2. The binary does not self-update: upgrade prints the brew upgrade or go install command for the latest release.