Skip to main content
Grok CLI is a third-party terminal client that works with OpenAI-compatible endpoints. Routeway provides a compatible endpoint, so you can use Grok CLI with your Routeway API key to access Grok models and many others.
Requires a valid Routeway API key. Get yours from the dashboard.

Setup

1

Install Grok CLI

Requires Node.js 18 or newer:
Verify the installation:
If you encounter permission issues, try sudo (macOS/Linux) or run the command prompt as administrator (Windows).
2

Configure environment variables

Grok CLI reads GROK_BASE_URL and GROK_API_KEY from your environment:
To make these persistent, add them to your shell profile (e.g. ~/.zshrc or ~/.bashrc).
3

Start using Grok CLI

Launch with a specific model:
Since you’re connected to Routeway, you can use any available model:
Browse all available models at routeway.ai/models.

Available Grok Models


Known Limitations

Grok CLI has limited compatibility with thinking/reasoning models. When you use a thinking model, the full reasoning content may be shown in the output. If you want first-party CLI support for Routeway, consider Claude Code or Codex.

Troubleshooting