Skip to main content
The gateway is an HTTP server that receives incoming webhooks and normalizes them into signals for the Forge to process.

Subcommands

gateway start

grindxp gateway start
Starts the gateway and enables autostart using the OS service manager when available (launchd, systemd --user, or Task Scheduler). Runtime state is tracked in ~/.grind/gateway-state.json.

gateway enable

grindxp gateway enable
Alias for gateway start.

gateway stop

grindxp gateway stop
Stops the running gateway process.

gateway disable

grindxp gateway disable
Disables gateway autostart and stops the gateway.

gateway restart

grindxp gateway restart
Stops and restarts the gateway.

gateway status

grindxp gateway status
Shows runtime status, autostart status, health, and endpoint.

gateway serve

grindxp gateway serve
Runs the gateway in the foreground (useful for debugging webhook delivery).

Webhook Endpoints

EndpointIntegration
GET /healthHealth check
POST /hooks/inboundGeneric inbound signal
POST /hooks/telegramTelegram Bot API
POST /hooks/discordDiscord webhook (Ed25519 signature verification)
POST /hooks/google-calendarGoogle Calendar push notifications
POST /hooks/whatsappWhatsApp Cloud API (HMAC signature verification)

Configuration

Configure via environment variables:
GATEWAY_PORT=3001            # default: 3001
GATEWAY_SECRET=...           # shared secret for generic hooks
TELEGRAM_BOT_TOKEN=...       # for Telegram webhook verification
DISCORD_PUBLIC_KEY=...       # for Discord Ed25519 verification
WHATSAPP_APP_SECRET=...      # for WhatsApp HMAC verification
GOOGLE_CALENDAR_WEBHOOK_TOKEN=...
See Environment Reference for the full list.