grok-bridge

agent
Guvenlik Denetimi
Uyari
Health Uyari
  • License — License: MIT
  • Description — Repository has a description
  • Active repo — Last push 0 days ago
  • Low visibility — Only 7 GitHub stars
Code Uyari
  • process.env — Environment variable access in bin/grok-bridge.js
Permissions Gecti
  • Permissions — No dangerous permissions requested

Bu listing icin henuz AI raporu yok.

SUMMARY

Experimental task handoffs between Grok Bot, Codex, Claude Code, Cursor, and Antigravity. One CLI.

README.md

Grok Bridge

Grok Bot ↔ Codex, Claude Code, Cursor, Antigravity, and Muse Code. One CLI.

CI
MIT license
Node.js 22+

Website · Quick start · Plugins · Shared skill install · skills.sh pack · Release

Grok Bridge is an open-source command-line tool and set of agent skills for handing a task from one AI coding agent to another. Ask Grok Bot to run Codex, Claude Code, Cursor, Antigravity, or Muse Code on your repository, or send a task from any of those to a Grok Bot, and get the result back in the session you started from.

Use it to:

  • get a second opinion on a change from a different model or agent, with review mode as the read-only default
  • delegate one scoped coding task to another agent CLI and check its result before continuing
  • start a long-running Grok Bot task from your terminal or coding agent and wait for a correlated final answer

Grok Bridge packages a small shared runner, Codex, Claude Code, and Cursor plugins plus Antigravity and Muse Code skills, and a Grok Bot setup workflow. No runtime npm dependencies, separate bridge account, or custom remote-command server.

Experimental alpha. Three directions have live evidence: Codex to Grok Bot, Grok Bot to Codex, and Grok Bot to Antigravity. Native Codex and Antigravity reads and edits also passed. Claude provider access, Cursor login, Antigravity source-host command permissions, and actual host skill discovery still limit acceptance. The Muse Code routes, added in 0.1.0-alpha.2, have offline tests only and no live exchange yet. See the acceptance record.

From To How
Codex Grok Bot forward skill calls the shared CLI and community gbot
Claude Code Grok Bot The same forward skill and CLI
Grok Bot Codex Bot uses approved local execution to call run --to codex
Grok Bot Claude Code Bot uses approved local execution to call run --to claude
Cursor Grok Bot The shared forward skill and CLI
Grok Bot Cursor Bot calls run --to cursor through approved execution
Antigravity Grok Bot Its grok-bridge skill calls the shared CLI
Grok Bot Antigravity Bot calls run --to antigravity through approved execution
Muse Code Grok Bot Its grok-bridge skill calls the shared CLI
Grok Bot Muse Code Bot calls run --to muse through approved execution

Grok Bot's cloud computer is separate from your laptop. The reverse routes use its native local execution when available and approved. Running on the cloud computer instead requires the CLI, login, and repository on that computer. This project does not change that policy or copy your credentials.

Start with one task

Install Node.js 22 or newer, then install from this repository:

npm install -g https://github.com/niharnm/grok-bridge/releases/download/v0.1.0-alpha.2/grok-bridge-0.1.0-alpha.2.tgz
grok-bridge doctor

This installs the release package attached to the GitHub release, not an npm registry release. Avoid npm install -g github:niharnm/grok-bridge#v0.1.0-alpha.2 with npm 11: that tag still carries a build script that makes npm link the command to a temporary folder it then deletes, so grok-bridge stops working. Releases after alpha.2 install from either form. doctor checks executable availability only. Each destination needs its own working login. Existing account plans and usage limits apply.

To reach Grok Bot, also install the separately maintained client and sign in to the Grok Bot desktop app:

npm install -g [email protected]
gbot --gateway --json bots list

Choose an individual Bot UUID. Put one objective, relevant context, permitted actions, and expected output into task.txt, then:

grok-bridge send --agent BOT_UUID --task-file task.txt --wait --timeout 600

The forward adapter uses the community grok-bot-cli, which accesses private gateway endpoints using the app's session. It is not an official xAI Bot API. An xAI inference API key is not interchangeable with a Bot login.

For an authenticated coding CLI on the current computer:

grok-bridge run --to codex --cwd /absolute/repo --mode review --task-file task.txt
grok-bridge run --to claude --cwd /absolute/repo --mode work --task-file task.txt
grok-bridge run --to cursor --cwd /absolute/repo --mode review --task-file task.txt
grok-bridge run --to antigravity --cwd /absolute/repo --mode review --task-file task.txt
grok-bridge run --to muse --cwd /absolute/repo --mode review --task-file task.txt

review is the default. work explicitly permits edits within the task's scope. Supply --model only to select a particular destination model; otherwise its configured default applies. To continue a returned native session, use --session SESSION_UUID with the same target and repository. Nothing silently selects the most recent session.

Install the host plugins

For a single shared Agent Skill across Codex, Claude Code, Cursor, Antigravity, and Muse Code, use the Skills CLI installation. The canonical skills/grok-bridge entrypoint teaches the same CLI. Choose the shared skill or the host plugin for a given project.

For Claude Code, run in its interactive prompt:

/plugin marketplace add niharnm/[email protected]
/plugin install grok-bridge@grok-bridge

Use /grok-bridge:forward to delegate to a chosen Grok Bot. /grok-bridge:run delegates to an installed coding CLI. Install the shared executable separately using the command above, since plugin caches do not contain the runner.

For Codex, add the repository marketplace:

codex plugin marketplace add niharnm/grok-bridge --ref v0.1.0-alpha.2

Install Grok Bridge from the plugin browser and start a new session. Ask it to use the forward skill with a specific Bot and task. The repository includes the supported .codex-plugin compatibility manifest and .agents/plugins/marketplace.json.

For Cursor, follow the native plugin setup. The official agent CLI is the reverse destination. Cursor IDE access is not inferred from the Grok gateway.

For Antigravity, follow the CLI and skill setup. It uses the actual agy CLI, not the separate Gemini CLI.

For Muse Code, follow the CLI and skill setup. It uses Meta's muse CLI, not the separate Muse desktop or web app.

For Grok Bot, follow the setup guide, verify a small local execution, then save the documented workflow as a Bot skill. Grok Bot and Grok Build are different products; this is not a .grok filesystem installer.

Submission, completion, and cancellation

Without --wait, send returns immediately after acknowledgement:

{"status":"submitted","provider":"grok","requestId":"...","agent":"..."}

Continue waiting without submitting again:

grok-bridge wait --agent BOT_UUID --request REQUEST_UUID --timeout 600
grok-bridge thread --agent BOT_UUID

Waiting requires an exact final marker from a recognized Bot message correlated to the submitted request. A greeting, progress update, user echo, or silent transcript cannot complete a wait. completed means the destination returned its final answer; verify the work itself before accepting it.

  • A cloud timeout or Ctrl-C ends local waiting. It does not cancel the Bot.
  • An uncertain send is never retried automatically. Inspect the conversation first.
  • wait reads the latest 200 entries. If the request has fallen outside that window, it cannot establish completion.
  • Unknown gateway response formats fail explicitly. Provider changes can break this experimental adapter.
  • Local commands have a deadline, an 8 MiB combined output limit, and process-group cleanup on macOS/Linux. Detached descendants and Windows process cleanup have separate limits.

Use --task-file - to pipe a task through stdin. Tasks are limited to 64 KiB. The bridge emits JSON to stdout; send --wait emits its submission receipt to stderr so the request ID survives a later timeout. Exit codes are 0 for a successful command, 1 for failure, 2 for a reported blocker, and 130 for interruption.

Permissions and data

Codex uses its native read-only or workspace-write sandbox with noninteractive approvals disabled. Claude review exposes Read, Glob, and Grep; work also exposes Edit, Write, and Bash with acceptEdits. Claude child MCP servers, skills, and browser integration are disabled. Native user/project settings and hooks can still apply, so review mode is not a standalone operating-system sandbox for Claude.

Cursor review uses Ask mode with its sandbox enabled. Cursor work adds --force, which automatically allows commands unless explicitly denied; its sandbox remains enabled. Antigravity review requests plan mode, which is not a hard read-only boundary. Antigravity work requests accept-edits, with its sandbox enabled and without bypassing permissions. Neither adapter changes workspace trust or account policy. Muse Code review adds --disable-write --disable-shell. Both Muse modes use --approval-mode never with Muse's OS sandbox kept on; the bridge never adds --yolo or disables the sandbox.

The bridge stores no credentials or transcripts. Destination applications retain their own sessions. Task files and command output remain under your control. The gbot and Cursor CLIs receive prompts as command arguments, so those prompts can be visible to local process inspection. Codex, Claude, and Antigravity receive task content through stdin. Muse Code receives it through a private temporary file that is deleted after the run. Send only the context the task needs. See security and data boundaries.

The local child receives GROK_BRIDGE_CHILD=1; recursive bridge calls fail. Host skills and Grok prompts also instruct children to return once without reciprocal loops. Prompt instructions are not a security boundary against a deliberately disobedient destination.

Development and evidence

git clone --branch v0.1.0-alpha.2 https://github.com/niharnm/grok-bridge.git
cd grok-bridge
npm run check
npm test
npm pack --dry-run

There is no compilation step or runtime dependency install. CI exercises Node.js 22 and 24 on macOS and Linux. Windows execution and forward desktop-session authentication are not release-verified.

The design was informed by OpenAI's codex-plugin-cc. That plugin has a richer Codex app-server broker and native transcript transfer. This independent implementation uses bounded CLI calls and explicit task context; it does not import complete chat histories. Read the source study and design decisions, acceptance record, and contribution guide.

Feedback

Tried a route? Open an issue with what worked or failed. Reports from the Claude Code, Cursor, and Muse Code routes are the most useful right now, because none of them has live evidence yet. If the project is useful to you, starring the repository helps other people find it.

Independent community project. No affiliation with or endorsement by OpenAI, Anthropic, xAI, Cursor, or Google is claimed.

Yorumlar (0)

Sonuc bulunamadi