CLI integrationsGrok CLI
Install Grok CLI on macOS, Linux or Windows, add a custom model in ~/.grok/config.toml and point base_url at Framewharf.
curl -fsSL https://x.ai/cli/install.sh | bash
echo 'export PATH="$HOME/.grok/bin:$PATH"' >> ~/.bashrc
source ~/.bashrc
grok --helpmacOS uses zsh by default, so add the PATH line to ~/.zshrc. On WSL, follow the Linux steps.
macOS / Linux: ~/.grok/config.toml. Windows: %USERPROFILE%\.grok\config.toml. Each [model.*] block maps to one id in the catalog. Declare the key one way only: env_key or api_key.
[models]
default = "claude-haiku-5-5"
[model.claude-haiku-5-5]
model = "claude-haiku-5-5"
base_url = "https://api.framewharf.com/v1"
name = "Claude Haiku 5 5"
description = "Claude Haiku 5 5 via Framewharf"
env_key = "FRAMEWHARF_API_KEY"
api_backend = "chat_completions"
[model.gpt-6-1-sol]
model = "gpt-6.1-sol"
base_url = "https://api.framewharf.com/v1"
name = "Gpt 6.1 Sol"
description = "Gpt 6.1 Sol via Framewharf"
env_key = "FRAMEWHARF_API_KEY"
api_backend = "chat_completions"
[model.gemini-4-hydrogen]
model = "gemini-4-hydrogen"
base_url = "https://api.framewharf.com/v1"
name = "Gemini 4 Hydrogen"
description = "Gemini 4 Hydrogen via Framewharf"
env_key = "FRAMEWHARF_API_KEY"
api_backend = "chat_completions"
[model.kimi-k3]
model = "kimi-k3"
base_url = "https://api.framewharf.com/v1"
name = "Kimi K3"
description = "Kimi K3 via Framewharf"
env_key = "FRAMEWHARF_API_KEY"
api_backend = "chat_completions"
[model.deepseek-v4-1-flash]
model = "deepseek-v4.1-flash"
base_url = "https://api.framewharf.com/v1"
name = "Deepseek V4.1 Flash"
description = "Deepseek V4.1 Flash via Framewharf"
env_key = "FRAMEWHARF_API_KEY"
api_backend = "chat_completions"With env_key, the key lives in the environment variable FRAMEWHARF_API_KEY and is never written to a file.
echo 'export FRAMEWHARF_API_KEY="sk-your_api_key"' >> ~/.bashrc
source ~/.bashrcPaste the exact id from GET /v1/models. A few ids available right now:
| Model id | Details | Copy |
|---|---|---|
claude-haiku-5-5 | Claude Haiku 5 5 | |
gpt-6.1-sol | Gpt 6.1 Sol | |
gemini-4-hydrogen | Gemini 4 Hydrogen | |
kimi-k3 | Kimi K3 | |
deepseek-v4.1-flash | Deepseek V4.1 Flash |
api_backend = "chat_completions" calls Chat Completions.
cd ~/your-project
grok
grok -m claude-haiku-5-5
grok -m claude-haiku-5-5 -p "Explain this repository"
grok inspectIn the TUI, switch models with /model claude-haiku-5-5. If the CLI opens a login page in the browser, exit and check config.toml and your key.