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:
GRIND_GATEWAY_PORT=5174              # default: 5174
GRIND_GATEWAY_TOKEN=...              # shared secret for /hooks/inbound
GRIND_TELEGRAM_BOT_TOKEN=...         # for Telegram webhook verification
GRIND_DISCORD_PUBLIC_KEY=...         # for Discord Ed25519 verification
GRIND_WHATSAPP_APP_SECRET=...        # for WhatsApp HMAC verification
GRIND_GOOGLE_CALENDAR_CHANNEL_TOKEN=...
See Environment Reference for the full list.
  • Self-Hosting: expose the gateway publicly for webhooks via a reverse proxy