Command reference
Complete reference for every lomi. CLI command, subcommand, and global flag.
All commands support global flags documented in Getting started.
Authentication
lomi login
Authenticate via browser device flow. Stores a CLI token globally.
lomi login
lomi login --no-browser
lomi login --profile sandboxlomi logout
Remove stored credentials for a profile.
lomi logout
lomi logout --profile sandboxlomi whoami
Show the active profile and account context.
lomi whoamilomi status
Verify login and API connectivity (GET /me + GET /accounts/balance).
lomi statuslomi list-profiles
List all saved auth profiles.
lomi list-profileslomi switch <profile>
Set the default active profile.
lomi switch sandboxProject setup
lomi init
Scaffold SDK client, examples, and .env. See Initialize a project.
lomi init
lomi init --yes -e sandbox -L ts --api-key lomi_sk_test_xxxlomi update
Update @lomi./sdk in the current project (runs your package manager).
lomi updatelomi ui
Install and update lomi. UI checkout components from the live docs registry. See lomi. UI commands.
lomi ui list
lomi ui add payment-provider-selector
lomi ui add --all
lomi ui update
lomi ui update --component payment-provider-selectorNo authentication required. Requires Node.js, npx, and a shadcn project (components.json).
| Subcommand | Description |
|---|---|
list | Fetch and print available registry components |
add <name> | Install one component via npx shadcn@latest add |
add --all | Install every registry item |
update | Re-install locked components from .lomi/ui-lock.json |
| Flag | Applies to | Description |
|---|---|---|
--path | add, update | Target project directory |
--yes | add, update | Skip shadcn init prompt |
--dry-run | add, update | Print commands without running |
--component | update | Update a single locked component |
lomi init --with-ui <name> installs a component after scaffold. See Initialize a project.
Development
lomi quickstart
Golden-path connectivity check and recommended next steps. See Quickstart command.
lomi quickstart
lomi quickstart --json
lomi quickstart --skip-probelomi listen
Cloud webhook relay (sandbox-first). See Listen for webhooks.
lomi listen
lomi listen http://localhost:3000/webhooks
lomi listen --allow-productionlomi probe
Run read-only integration health checks.
lomi probe
lomi probe --send-test-webhooklomi dev
Start a local webhook development server. See Local development server.
lomi dev
lomi dev --port 4242
lomi dev --verify-signature
lomi dev --env-file .env.local| Flag | Default | Description |
|---|---|---|
-p, --port | 4242 | HTTP port |
--env-file | .env | Path to dotenv file |
--verify-signature | auto | Verify X-Lomi-Signature header |
--skip-rules-install | - | Skip agent rules prompt |
Endpoints:
POST /webhook, receive webhook eventsGET /health, health check
Webhooks
lomi webhooks list
List configured webhook endpoints.
lomi webhooks listlomi webhooks test <id>
Send a test event to a webhook endpoint.
lomi webhooks test wh_xxxxxxxxCatalog and transactions
lomi products list
List products and prices in your organization.
lomi products listlomi transactions list
List recent transactions.
lomi transactions list
lomi transactions list --limit 25 --json| Flag | Default | Description |
|---|---|---|
--limit | 10 | Maximum transactions to return |
lomi transactions get <id>
Get a transaction by ID (GET /transactions/{id}).
lomi transactions get 123e4567-e89b-12d3-a456-426614174000
lomi transactions get 123e4567-e89b-12d3-a456-426614174000 --jsonlomi refunds create
Create a refund for a completed transaction (POST /refunds).
lomi refunds create
lomi refunds create \
--transaction-id 123e4567-e89b-12d3-a456-426614174000 \
--amount 5000 \
--reason duplicate_charge \
--refund-type partial \
--json| Flag | Description |
|---|---|
--transaction-id | Transaction UUID to refund |
--amount | Refund amount (same currency as transaction) |
--reason | Optional reason |
--refund-type | full or partial |
lomi refunds list
List refunds.
lomi refunds list
lomi refunds list --status completed --limit 20 --jsonlomi refunds get <id>
Get a refund by ID.
lomi refunds get ref_xxxxxxxx --jsonPayments
These commands require authentication and use your CLI token (no manual merchant ID).
lomi checkout create
Create a hosted checkout session via POST /checkout-sessions.
lomi checkout create
lomi checkout create \
--amount 10000 \
--currency XOF \
--success-url https://example.com/success \
--cancel-url https://example.com/cancel \
--jsonInteractive mode prompts for: price ID or amount, currency, success/cancel URLs, optional customer email.
Headless mode requires --currency, --success-url, --cancel-url, and either --amount or --price-id.
After creation, prints the checkout URL and a ready-to-paste HTML embed snippet using @lomi./embed:
<!-- npm install @lomi./embed -->
<script type="module">
import { loadLomiCheckout } from '@lomi./embed';
document.getElementById('pay').addEventListener('click', () => {
loadLomiCheckout({
checkoutUrl: 'https://checkout.lomi.africa/checkout/cs_...',
mode: 'modal',
onComplete: (p) => console.log(p),
});
});
</script>
<button id="pay">Pay</button>See Embed checkout widget for inline mode and self-hosted dist/lomi.js.
lomi payments create
Create a payment link via the payment links API.
lomi payments create
lomi payments create --title "Invoice #42" --amount 5000 --currency XOF --jsonInteractive mode prompts for: title, amount, currency. Headless mode requires all three flags.
AI agent rules
lomi install-rules
Install lomi. documentation for AI coding tools. See Install agent rules.
lomi install-rules
lomi install-rules --target cursor --target llms.txt
lomi install-rules --force| Target | Output |
|---|---|
cursor | .cursor/rules/lomi.*.mdc |
claude-code | CLAUDE.md |
codex | AGENTS.md |
vscode | .github/instructions/lomi-*.instructions.md |
llms.txt | Project-root llms.txt |
Typical workflows
New integration from scratch
npm install -g lomi.cli
lomi login
lomi quickstart
mkdir my-store && cd my-store
lomi init
lomi listen http://localhost:3000/webhooksSandbox vs production profiles
lomi login --profile sandbox
lomi login --profile production
lomi switch sandbox
lomi init --profile sandboxCI pipeline
export LOMI_ACCESS_TOKEN=$CLI_TOKEN
lomi status
lomi init --yes -e sandbox -L ts --api-key $LOMI_SECRET_KEY --skip-package-install --skip-rules-installHelp
lomi --help
lomi login --help
lomi init --help
lomi dev --help
lomi install-rules --helpMaintainers
The lomi docs command is hidden from default --help. It is for lomi. contributors working on documentation in the monorepo, not for merchant integrators.
lomi docs check
Run docs lint and OpenAPI drift checks from the monorepo root:
lomi docs checkEquivalent to cd apps/docs && pnpm lint && pnpm docs:drift. See Writing for lomi. docs.