Unofficial TypeScript SDK for the Grok Bot HTTP gateway (Tailscale / remote / internal)

I’ve been wrapping the private HTTP gateway I wrote about here: Grok Bot: Can I send it a message from outside?

Unofficial TypeScript client: @adam91holt/grokbot-sdk

What it’s for:

  • Hook into the live Grok Bot host over HTTP (GET /health, POST /api/<command>) from a script, another machine, or another bot
  • On the same computer as the host: new GrokBot() reads sand-data/gateway.json
  • From elsewhere: GROKBOT_GATEWAY_URL + SAND_GATEWAY_TOKEN. A tailnet (Tailscale) or an SSH tunnel works. Do not put port 1340 on the public internet
  • Helpers so agents can automate more without touching live seats: throwaway runOnce / discussOnce, sendAsAgent, decide-only jobs, and { type: "once", at } (the SDK translates that to a dated cron because the host has no one-shot trigger)

Same caveats as the curl post: this is an undocumented internal API, not an official Cursor product. Command names come from the host. Treat the gateway token like a password.

Happy for people to try it and file issues on the repo.