Grok CLI Integration with DataEyesAI#
Grok CLI is a lightweight terminal command-line power tool. By configuring OpenAI-compatible interface environment variables, you can easily switch Grok CLI's underlying AI to the high-performance model service provided by DataEyesAI.
1. Prerequisites (3 Core Parameters)#
Before starting the configuration, have the following 3 core parameters ready — they will be used directly in the terminal setup:| Parameter | Value | Notes |
|---|
| API Key | sk-xxxxxxxxxxxxxxxx | Enter the raw plaintext key — do not add a Bearer prefix. |
| Base URL | https://platform.dataeyes.ai | Do NOT include /v1. |
| Model Name | A model name supported by DataEyesAI | Must be a model that genuinely exists on the platform and your account has permission to call. |
2. Install Grok CLI#
Grok CLI requires Node.js. Make sure your machine has Node.js installed.Open a terminal (PowerShell recommended on Windows, Terminal on Mac) and run the following command to install globally:After the installation completes, type grok --help in the terminal. If a usage guide is printed, the installation was successful and you can proceed to the next step.
3. One-Command Launch (Replace with Your Key)#
Copy and run the following command. Note: the --base-url value must not end with /v1.-p 3001: Specifies the port to run on (avoids conflicts with the default port 3000).
-k: Your API Key. (Only needs to be entered once — subsequent launches can omit this flag after it is saved.)
--base-url: The DataEyesAI API root URL (recommended: https://platform.dataeyes.ai).
To avoid typing the full command every time, save the configuration to your system:Windows (PowerShell)#
Open the PowerShell profile file by running:At the end of the file that opens, paste the following snippet (replace the model names with your own):function grok-short {
grok -p 3001 --base-url "https://platform.dataeyes.ai" --reasoning-model "your-model-name" --completion-model "your-model-name"
}
Set-Alias grok grok-short
Save and close Notepad. After restarting your terminal, you only need to type grok to launch.If the above does not work, run the following in your terminal instead:$content = @'
function grok-short {
# Use grok.cmd to avoid infinite loops; use -p 3001 to avoid port conflicts
grok.cmd -p 3001 --base-url "https://platform.dataeyes.ai" --reasoning-model "deepseek-v3.2-251201" --completion-model "deepseek-v3.2-251201"
}
# Use -Force to overwrite without extra conditional logic
Set-Alias grok grok-short -Force
'@
Set-Content -Path $PROFILE -Value $content
. $PROFILE
The model name in "model" "" can be replaced with any of the many models supported by your console.macOS / Linux#
5. FAQ#
Q: Why does the interface show "Claude Code" after launching?A: This is normal. Grok CLI is essentially a high-performance proxy that borrows the excellent interactive interface of Claude Code, but all the underlying models and compute power come from the DataEyes configuration you set.Q: After sending a question, it returns "404 Not Found" or "model does not exist"?A: Check your --base-url. Make sure the URL does not end with /v1.Incorrect: https://platform.dataeyes.ai/v1
Correct: https://platform.dataeyes.ai
Q: Port conflict error (EADDRINUSE)?A: Port 3001 is already in use. Change -p 3001 in the command to -p 3002 or any other available four-digit port number.Modified at 2026-10-19 10:10:04