Sign inSign up

ajeetraina777/sbx-grok-kits

By ajeetraina777

Updated about 2 months ago

Docker Sandboxes mixin adding the Grok CLI (xAI, DMR, OpenAI)

Sandbox Kit
0

536

ajeetraina777/sbx-grok-kits repository overview

Digest

sha256:bd4c8c3bd652…

Size

10.1 kB

Pushed

about 2 months ago


No spec available
This tag doesn't have an sbx-kit specification.

Grok CLI kit for Docker Sandboxes

A standalone Docker Sandboxes kit (kind: mixin) that adds the Grok CLI (@vibe-kit/grok-cli) to any sandbox agent. Grok CLI is an OpenAI-compatible client, so this image ships in three backend flavors, one per tag.

Source and full docs: https://github.com/ajeetraina/sbx-kits-grok

Image tags

TagBackendGROK_BASE_URLDefault modelCredential
latest, xaixAI (Grok)https://api.x.ai/v1grok-code-fast-1xAI key
dmrDocker Model Runner (local)http://host.docker.internal:12434/engines/v1ai/gemma3none
openaiOpenAIhttps://api.openai.com/v1gpt-4o-miniOpenAI key

xAI is the default because Grok CLI is, first and foremost, a Grok client. The DMR tag is the zero-key path (it runs an open-weights model locally through the same CLI); the OpenAI tag reuses the CLI's OpenAI compatibility.

Quick start

xAI (default). Store your key once with sbx, then run:

sbx secret set-custom -g --host api.x.ai --env GROK_API_KEY \
  --placeholder "xai-{rand}" --value "$XAI_API_KEY"
sbx run --kit docker.io/ajeetraina777/sbx-grok-kits:latest claude

Local (DMR). Enable Docker Model Runner and pull the model on the host - no key:

docker model pull ai/gemma3
sbx run --kit docker.io/ajeetraina777/sbx-grok-kits:dmr claude

OpenAI:

sbx secret set-custom -g --host api.openai.com --env GROK_API_KEY \
  --placeholder "sk-{rand}" --value "$OPENAI_API_KEY"
sbx run --kit docker.io/ajeetraina777/sbx-grok-kits:openai claude

The cloud tags hold no key. The sbx proxy injects it from the stored secret on the wire, so the key never enters the sandbox (sbx run has no -e flag).

How it works

Each tag installs @vibe-kit/grok-cli via npm, writes /home/agent/.grok/user-settings.json for the right backend, sets GROK_BASE_URL/GROK_MODEL, and (for the cloud tags) adds a narrow serviceDomains/serviceAuth rule so the proxy injects the stored key on outbound requests. Inside the sandbox, run grok for the interactive TUI or grok -p "..." for a headless one-off.

Per-backend setup notes, validation steps, and the raw spec.yaml for each kit live on GitHub: https://github.com/ajeetraina/sbx-kits-grok/tree/main/providers