Skip to main content
This tool is not recommended for Agent workflows. For better results, we suggest using Claude Code or Cursor.

Install Grok CLI

Use npm to install the Grok CLI globally:
npm install -g @vibe-kit/grok-cli

Configure MiniMax API

Important: Clear OpenAI Environment Variables Before ConfigurationBefore configuring, ensure you clear the following OpenAI-related environment variables to avoid conflicts with MiniMax API:
  • OPENAI_API_KEY
  • OPENAI_BASE_URL
  1. Set the base URL and API key using environment variables.
  • The GROK_BASE_URL should be set based on your location: for international users, use https://api.minimax.io/v1; for users in China, use https://api.minimaxi.com/v1.
  • Use the API key obtained from the MiniMax Developer Platform (For users in China, visit MiniMax Developer Platform) as the value for MINIMAX_API_KEY.
export GROK_BASE_URL="https://api.minimax.io/v1"  
export GROK_API_KEY="<MINIMAX_API_KEY>"
  1. Start the Grok CLI with a specified model: MiniMax-M2.1
grok --model MiniMax-M2.1