lomi.

Local development server

Run lomi dev to receive and inspect webhook events on your machine during development.

The lomi dev command starts a lightweight local HTTP server that receives webhook POST requests and prints events in the terminal.

For real sandbox webhooks without ngrok, prefer lomi listen.

Requires lomi login.

Usage

lomi dev

Default URL: http://localhost:4242/webhook

Options

FlagDefaultDescription
-p, --port4242Port for the HTTP server
--env-file.envDotenv file to load
--verify-signatureauto when LOMI_WEBHOOK_SECRET is setVerify X-Lomi-Signature using LOMI_WEBHOOK_SECRET
--skip-rules-install-Skip agent rules install prompt
lomi dev --port 3000
lomi dev --verify-signature

Endpoints

MethodPathDescription
POST/webhookReceives webhook event payloads
GET/healthReturns ok

Testing locally

Start the dev server

lomi dev

Send a test event

curl -X POST http://localhost:4242/webhook \
  -H "Content-Type: application/json" \
  -d '{"type":"test.event","data":{}}'

The CLI prints the event type and payload in the terminal.

lomi listen http://localhost:4242/webhook

Signature verification

When verification is enabled, the server validates the X-Lomi-Signature header against LOMI_WEBHOOK_SECRET from your .env file.

Ensure LOMI_WEBHOOK_SECRET is set before enabling verification:

LOMI_WEBHOOK_SECRET=whsec_your_secret_here

For production webhook handling patterns, see Handling webhooks and Webhooks reference.

Relationship to lomi init

Running lomi dev after lomi init loads credentials from the project .env. The generated examples/webhook-handler.ts shows how to implement verification in your own application code.

Next steps

On this page