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:
| Platform | Path |
|---|---|
| macOS | ~/Library/Application Support/lomi/config.json |
| Linux | ~/.config/lomi/config.json |
Override with:
export LOMI_CONFIG_DIR=/custom/path/lomiConfig 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
| Variable | Description |
|---|---|
LOMI_ACCESS_TOKEN | CLI token for CI/headless use (overrides stored profile token) |
LOMI_CONFIG_DIR | Override global config directory |
LOMI_SUPABASE_ANON_KEY | Override Supabase anon key for device auth (optional) |
Project SDK (via .env)
Set by lomi init in your project root:
| Variable | Description |
|---|---|
LOMI_SECRET_KEY | Secret API key for the SDK (lomi_sk_test_… / lomi_sk_live_…) |
LOMI_WEBHOOK_SECRET | Webhook signing secret for signature verification |
LOMI_API_URL | API 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| Flag | Description |
|---|---|
--profile | Profile name (default: default) |
-a, --api-url | API base URL override |
-l, --log-level | Log verbosity |
--skip-telemetry | Opt out of telemetry |
API URLs
| Environment | URL |
|---|---|
| Production | https://api.lomi.africa |
| Sandbox | https://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