lomi.

Configuration

Global CLI config, project environment variables, profiles, and CI settings for lomi.. CLI.

lomi. CLI uses two layers of configuration: global (authentication and profiles) and project-level (SDK keys and app settings).

Global CLI config

Stored after lomi login:

PlatformPath
macOS~/Library/Application Support/lomi/config.json
Linux~/.config/lomi/config.json

Override with:

export LOMI_CONFIG_DIR=/custom/path/lomi

Config file shape

{
  "version": 2,
  "current_profile": "default",
  "profiles": {
    "default": {
      "cli_token": "lomi_sk_...",
      "api_url": "https://api.lomi.africa"
    },
    "sandbox": {
      "cli_token": "lomi_sk_test_...",
      "api_url": "https://sandbox.api.lomi.africa"
    }
  },
  "settings": {
    "has_seen_rules_install_prompt": true,
    "last_rules_install_version": "1.0.0"
  }
}

Manage profiles with lomi list-profiles, lomi switch, and lomi logout.

Environment variables

CLI authentication

VariableDescription
LOMI_ACCESS_TOKENCLI token for CI/headless use (overrides stored profile token)
LOMI_CONFIG_DIROverride global config directory
LOMI_SUPABASE_ANON_KEYOverride Supabase anon key for device auth (optional)

Project SDK (via .env)

Set by lomi init in your project root:

VariableDescription
LOMI_SECRET_KEYSecret API key for the SDK (lomi_sk_test_… / lomi_sk_live_…)
LOMI_WEBHOOK_SECRETWebhook signing secret for signature verification
LOMI_API_URLAPI base URL (https://api.lomi.africa or sandbox)

Two credential types

LOMI_ACCESS_TOKEN: authenticates the CLI (from lomi login).

LOMI_SECRET_KEY: authenticates your application SDK (from the Merchant Portal, stored in .env by lomi init).

Project config file

lomi init creates lomi.config.ts for project-level settings used by examples and tooling.

Global CLI flags

Override config per command:

lomi --profile sandbox status
lomi -a https://sandbox.api.lomi.africa checkout create
lomi --log-level debug dev
FlagDescription
--profileProfile name (default: default)
-a, --api-urlAPI base URL override
-l, --log-levelLog verbosity
--skip-telemetryOpt out of telemetry

API URLs

EnvironmentURL
Productionhttps://api.lomi.africa
Sandboxhttps://sandbox.api.lomi.africa

Profiles sandbox and default map to the appropriate URL automatically during login.

CI example

export LOMI_ACCESS_TOKEN="${{ secrets.LOMI_CLI_TOKEN }}"
export LOMI_SECRET_KEY="${{ secrets.LOMI_SECRET_KEY }}"

lomi status
lomi init --yes \
  --environment sandbox \
  --language ts \
  --api-key "$LOMI_SECRET_KEY" \
  --skip-package-install \
  --skip-rules-install

Next steps

On this page