Get started with the CLI
Install lomi. CLI, log in, run quickstart checks, create a test checkout, and forward webhooks locally.
The lomi. CLI is the fastest way to authenticate, create test checkouts, listen for webhooks without ngrok, and install AI agent rules, all from your terminal.
Install the CLI
Requires Node.js 18+ (used only to download the native binary).
npm install -g lomi.cli
lomi --versionSee CLI installation for Homebrew and source builds.
Log in
lomi loginThis opens a browser device-authorization flow and saves a CLI token globally. See Authenticate for profiles and CI tokens.
Run quickstart
lomi quickstartChecks API connectivity, identity, and balance, then prints the recommended next commands. Use --json for machine-readable output:
lomi quickstart --jsonCreate a test checkout (headless)
lomi checkout create \
--amount 10000 \
--currency XOF \
--success-url https://example.com/success \
--cancel-url https://example.com/cancel \
--jsonOpen the checkout_url from the JSON response in your browser and pay with a sandbox test method.
Forward webhooks locally
In a second terminal:
lomi listen http://localhost:3000/webhooksSandbox-first, no ngrok required. See Listen for webhooks.
Install AI agent rules
lomi install-rulesInstalls Cursor, Claude Code, Codex, and llms.txt rules so coding agents understand lomi. APIs. See Install rules.
What to run next
| Goal | Command |
|---|---|
| Full integration check | lomi probe |
| List recent transactions | lomi transactions list --json |
| Refund a transaction | lomi refunds create --transaction-id <id> --amount 5000 --json |
| Scaffold a project | lomi init |
| Local webhook server | lomi dev |
Full reference: Command reference.
Two kinds of credentials
CLI token vs API key
lomi login stores a CLI token: used by CLI commands like checkout create, listen, and quickstart.
lomi init writes your secret API key (LOMI_SECRET_KEY) into the project .env, used by the SDK in your application code.
These are different credentials for different purposes.
Next steps
- Make a test payment: CLI and cURL paths
- Initialize a project: SDK scaffolding
- Choose an integration: hosted checkout, links, subscriptions