Maintaining CLI and MCP
Guide for lomi. contributors and operators who develop or deploy apps/cli and apps/mcp, not for merchant integrators.
The lomi. CLI and MCP server are integrator tools: they help developers build on the hosted merchant API. This page is for people who maintain those packages in the monorepo or deploy the hosted MCP server.
If you are integrating lomi. into your product, use CLI and MCP instead.
Who should read this
| Role | Use CLI/MCP to… | Use this page for… |
|---|---|---|
| Merchant developer | Integrate checkout, webhooks, SDK | No, use Build docs |
| Contributor | Dogfood integration flows while building features | Yes, when changing apps/cli or apps/mcp |
| Operator | - | Yes, deploy MCP, regenerate tools, release CLI |
CLI/MCP are not for operating apps/admin, self-hosting payment processing, or general monorepo maintenance (migrations, API deploy, etc.).
CLI (apps/cli)
Maintainer docs: apps/cli/CONTRIBUTING.md
| Task | Command / location |
|---|---|
| Local dev | cd apps/cli && cargo build && cargo test |
| Docs drift | lomi docs check or dt check (from monorepo root) |
| Docs scan / graph | lomi docs scan, lomi docs graph (delegates to apps/tools/doctool) |
| Docs i18n | lomi docs sync-i18n, lomi docs translate-i18n |
| Docs improve / diff | lomi docs improve, lomi docs diff |
| Agent rules | ./apps/cli/scripts/generate-rules.sh |
| Release | Tag cli-v*, see CONTRIBUTING.md |
doctool (dt)
Documentation tooling CLI (CORE-38). Standalone repo: github.com/lomiafrica/doctool, checked out as a submodule at apps/tools/doctool.
Initialize for local dev:
git submodule update --init apps/tools/doctool
cd apps/tools/doctool && cargo buildMaintainer docs: apps/tools/doctool/CONTRIBUTING.md
| Task | Command / location |
|---|---|
| Local dev | cd apps/tools/doctool && cargo build && cargo test |
| Index monorepo | dt scan --root . → .doctool/index.json |
| Drift report | dt drift --root . |
| Knowledge graph | dt graph --root . |
| Scaffold REST MDX | dt scaffold --root . |
| i18n sync (deterministic) | dt sync-i18n --check |
| i18n translate (LLM) | dt translate-i18n --dry-run (set DOCTOOL_LLM_API_KEY or DOCTOOL_LLM_MOCK=1) |
| Improve MDX | dt improve --path build/usage-billing.mdx --stdout |
| Diff proposed MDX | dt diff --path build/usage-billing.mdx --proposed .doctool/out/... |
| CI | .github/workflows/app-ci-doctool.yml |
MCP (apps/mcp)
Maintainer docs: apps/mcp/CONTRIBUTING.md
| Task | Command / location |
|---|---|
| Local HTTP server | cd apps/mcp && pnpm run start:http |
| Regenerate tools | pnpm run generate → commit src/generated/tools-manifest.json |
| Drift CI | pnpm docs:drift (OpenAPI ↔ MDX, MCP manifest, agent contracts) |
| Agent OpenAPI | cd apps/api && pnpm run openapi:export:agent → apps/docs/agent-openapi.json (agent, provisioning, partners) |
| OAuth / agent connect env | API: LOMI_OAUTH_ISSUER, LOMI_DASHBOARD_BASE_URL: MCP: LOMI_OAUTH_ISSUER, LOMI_MCP_RESOURCE_URL |
| Deploy | .env.example, railway.json |
| Tests | pnpm test |
Integrators should use https://mcp.lomi.africa or npx @lomi./mcp, not a self-deployed instance unless they work on lomi. engineering.