grok-bot-cli

Manage Grok Bot agents, groups, and messages from your terminal.

Watch the MP4
Install
npm install --global grok-bot-cli
Requires Node.js 22.19.0+ and the Grok Bot desktop app on macOS, Linux, or Windows. Open Grok Bot and sign in once; gbot automatically uses the app's encrypted session and routing credentials. No token copying is required. If the app removes its cached gateway route while the cloud computer sleeps, the CLI uses the active account in sand-secrets.json to request a fresh route through EnsureSandBox. Signed-out and inactive saved accounts are never selected. Backend requests use the installed Grok Bot app version, read from the app's desktop-status.json (or the macOS app bundle); SAND_CLIENT_VERSION remains an explicit override. On Linux the app keeps its session under ~/.config/Grok Bot (or $XDG_CONFIG_HOME); when it is stored in the system keyring, gbot reads the key with secret-tool (package libsecret-tools). On Windows the session lives under %APPDATA%\\Grok Bot and decrypts with the app's DPAPI-wrapped Safe Storage key.
Use
gbot bots list
gbot bots create --name Researcher
gbot bots update Researcher --description "Research the launch" --notify on
gbot bots create --name Writer
gbot groups create --name Launch --member Researcher --member Writer --description "Ship together"
gbot groups update Launch --title "Launch room" --hidden off
gbot send Researcher "Summarize the launch status."
gbot send Launch "Share your updates."
gbot thread Researcher
gbot thread Researcher --after <last-entry-id> --json
gbot skills list
gbot skills add ./skills/poteto-mode
gbot skills remove poteto-mode
gbot groups delete Launch
gbot bots delete Researcher
gbot bots delete Writer
update fields: --name --description --title --avatar-shape --avatar-color --notify on|off --hidden on|off. --description is the UI Instructions field.
gbot skills manages the skill library over the gateway. Grok Bot keeps one
library per account; every bot reads the same list, and there is no per-bot
attach. add posts a SKILL.md (or a directory holding one) and every bot sees
it. list shows each entry's source: workflow is your library, managed is
team-published, plugin comes from a marketplace install, automation is a
scheduled routine. remove deletes a workflow skill by id or exact name, for
every bot, and refuses the other sources. Adding the same file twice yields two
same-named skills; remove by id then. There is no --files mode for skills.
gbot thread --after ID filters the bounded tail locally and returns entries strictly
after that opaque entry ID. Its JSON includes cursor, entryCount, and gapReset.
An unchanged poll has entryCount: 0; an unknown or expired ID returns one bounded
snapshot with gapReset: true. The gateway request remains limit-only.
Run gbot --help for every command.
Options are command-local (for example, gbot send --history-dir DIR ...);
--json prints the canonical JSON result; send and the codex commands also report failures as
a JSON document on stdout with exitCode (see below), every other command
prints the failure message on stderr and exits 1.
Messaging a live Claude Code session
Claude Code has a native Channels API,
so this integration needs no desktop shim. The Claude plugin includes an opt-in
claude-channel MCP server; Codex and Grok callers can use claude_send, or the
local CLI, to send a message and receive Claude's explicit reply.
Claude channels live on the user's registered machine (the same host that runs
Claude Code), not on the Grok Bot agent box (HOME=/home/box). gbot has no remote
transport: from the box, use Grok Bot Shell with a machineId to run
gbot claude send on that computer. Auth stays with that machine's native Claude login.
After installing this version of the Claude plugin, launch a named session:
GROK_BOT_CLAUDE_CHANNEL=review claude --dangerously-load-development-channels plugin:gbot@gbot-marketplace
# From another terminal on the same machine and user account:
gbot claude send review "Reply with GBOT_CLAUDE_OK" --json