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 devDefault URL: http://localhost:4242/webhook
Options
| Flag | Default | Description |
|---|---|---|
-p, --port | 4242 | Port for the HTTP server |
--env-file | .env | Dotenv file to load |
--verify-signature | auto when LOMI_WEBHOOK_SECRET is set | Verify X-Lomi-Signature using LOMI_WEBHOOK_SECRET |
--skip-rules-install | - | Skip agent rules install prompt |
lomi dev --port 3000
lomi dev --verify-signatureEndpoints
| Method | Path | Description |
|---|---|---|
POST | /webhook | Receives webhook event payloads |
GET | /health | Returns ok |
Testing locally
Start the dev server
lomi devSend 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.
Receive real sandbox events (recommended)
lomi listen http://localhost:4242/webhookSignature 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_hereFor 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.