Step 1: Installing Crush
Select the appropriate installation method based on your system:- Homebrew (Recommended for macOS)
- NPM (Cross-Platform)
- Arch Linux
- Nix
Step 2: Configuring the GLM Model
1. Obtain Your Z.AI API Key
Visit Z.AI to get your API Key.2. Launch Crush and Select Model
Run the crush command to start the application:- glm-4.7 : Highest performance, strong coding version
- glm-4.7 : Standard version, suitable for complex tasks
- glm-4.5-air : Lightweight version, faster response
3. Enter your Z.AI API key
Enter the API Key obtained from Z.AI at the prompt.
Step 3: Modify Crush Configuration
1. Locate the Configuration File
Depending on your OS, the configuration file can be found at:2. Switch to the GLM Coding Plan Endpoint
Open the crush.json file and configure it as follows, making sure to replace with your API KEY:Step 4: Complete Configuration and Pick model
Pressctrl+p, choose “Switch Model”
After configuration, you can now:
- Generate and optimize code using GLM-4.7
- Conduct technical Q&A and debugging
- Execute complex programming tasks
- Experience the powerful capabilities of Z.AI