Skip to main content
Grok CLI is a streamlined command-line AI assistant that enables quick access to Z.AI’s GLM models for conversation and code generation.

Step 1: Installing Grok CLI

Install Grok CLI globally via npm:

Step 2: Environment Configuration

Set the API base URL and API Key:

Step 3: Getting Started

Launch Grok CLI with a specified model:
Description

Notes

Important Note: Grok CLI currently has limited compatibility with thinking models, and thinking content will be displayed in full. Recommendations:
  • Wait for Grok CLI to improve compatibility with thinking models
  • Or use non-thinking versions of the models