Integrate official Z.AI GLM Claude Code documentation
- Add Claude Code installation prerequisite (npm install) - Update GLM configuration with official model mappings (glm-4.5-air, glm-4.7) - Add version verification (recommended 2.0.14+) - Include troubleshooting steps from Z.AI docs - Add /status command verification - Reference official Z.AI documentation: https://docs.z.ai/devpack/tool/claude - Update README with proper GLM model configuration
This commit is contained in:
@@ -11,6 +11,25 @@
|
|||||||
```
|
```
|
||||||
I want to install the Ultimate Claude Code & GLM Customization Suite with 40+ agents, MCP tools, and auto-triggering automation. Please perform the following integration:
|
I want to install the Ultimate Claude Code & GLM Customization Suite with 40+ agents, MCP tools, and auto-triggering automation. Please perform the following integration:
|
||||||
|
|
||||||
|
## Prerequisites: Install Claude Code
|
||||||
|
|
||||||
|
**Before installing agents and tools, ensure Claude Code is installed:**
|
||||||
|
|
||||||
|
```bash
|
||||||
|
# Install Claude Code (requires Node.js 18+)
|
||||||
|
npm install -g @anthropic-ai/claude-code
|
||||||
|
|
||||||
|
# Verify installation (recommended: 2.0.14+)
|
||||||
|
claude --version
|
||||||
|
|
||||||
|
# If needed, upgrade to latest
|
||||||
|
claude update
|
||||||
|
```
|
||||||
|
|
||||||
|
**Reference:** https://docs.anthropic.com/en/docs/claude-code/overview
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
## Step 1: Install Contains Studio Agents (37 agents with PROACTIVELY auto-triggering)
|
## Step 1: Install Contains Studio Agents (37 agents with PROACTIVELY auto-triggering)
|
||||||
|
|
||||||
Clone the contains-studio/agents repository:
|
Clone the contains-studio/agents repository:
|
||||||
@@ -50,26 +69,69 @@ This provides 15+ MCP tools including:
|
|||||||
|
|
||||||
## Step 3: Configure Model (Choose ONE)
|
## Step 3: Configure Model (Choose ONE)
|
||||||
|
|
||||||
Option A: Anthropic Claude (Official API)
|
### Option A: Anthropic Claude (Official API)
|
||||||
Visit: https://console.anthropic.com/
|
|
||||||
Create ~/.claude/settings.json with:
|
**Best for:** Production, highest quality, official support
|
||||||
|
|
||||||
|
1. Get your API key: https://console.anthropic.com/
|
||||||
|
2. Create ~/.claude/settings.json:
|
||||||
|
```json
|
||||||
{
|
{
|
||||||
"env": {
|
"env": {
|
||||||
"ANTHROPIC_AUTH_TOKEN": "sk-ant-your-actual-api-key-here",
|
"ANTHROPIC_AUTH_TOKEN": "sk-ant-your-actual-api-key-here",
|
||||||
"ANTHROPIC_BASE_URL": "https://api.anthropic.com"
|
"ANTHROPIC_BASE_URL": "https://api.anthropic.com"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
```
|
||||||
|
3. Verify installation: `claude --version`
|
||||||
|
|
||||||
Option B: Z.AI / GLM Coding Plan (90% cheaper)
|
### Option B: Z.AI / GLM Coding Plan (90% cheaper, Official Integration)
|
||||||
Visit: https://z.ai/
|
|
||||||
|
**Best for:** Development, testing, cost-sensitive projects
|
||||||
|
|
||||||
|
**Follow official Z.AI documentation:** https://docs.z.ai/devpack/tool/claude
|
||||||
|
|
||||||
|
1. **Get your GLM Coding Plan API key:**
|
||||||
|
- Visit: https://z.ai/
|
||||||
|
- Sign up for GLM Coding Plan
|
||||||
|
- Copy your API key
|
||||||
|
|
||||||
|
2. **Configure Claude Code for GLM:**
|
||||||
Create ~/.claude/settings.json with:
|
Create ~/.claude/settings.json with:
|
||||||
|
```json
|
||||||
{
|
{
|
||||||
"env": {
|
"env": {
|
||||||
"ANTHROPIC_AUTH_TOKEN": "your-zai-api-key-here",
|
"ANTHROPIC_AUTH_TOKEN": "your-zai-api-key-here",
|
||||||
"ANTHROPIC_BASE_URL": "https://api.z.ai/api/anthropic",
|
"ANTHROPIC_BASE_URL": "https://api.z.ai/api/anthropic",
|
||||||
"API_TIMEOUT_MS": "3000000"
|
"API_TIMEOUT_MS": "3000000",
|
||||||
|
"ANTHROPIC_DEFAULT_HAIKU_MODEL": "glm-4.5-air",
|
||||||
|
"ANTHROPIC_DEFAULT_SONNET_MODEL": "glm-4.7",
|
||||||
|
"ANTHROPIC_DEFAULT_OPUS_MODEL": "glm-4.7"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
3. **Verify and test:**
|
||||||
|
```bash
|
||||||
|
# Check Claude Code version (recommended: 2.0.14+)
|
||||||
|
claude --version
|
||||||
|
|
||||||
|
# Start Claude Code
|
||||||
|
claude
|
||||||
|
|
||||||
|
# Check model status (enter /status when prompted)
|
||||||
|
/status
|
||||||
|
```
|
||||||
|
|
||||||
|
4. **Troubleshooting (if configuration doesn't take effect):**
|
||||||
|
- Close all Claude Code windows
|
||||||
|
- Open new terminal and run `claude` again
|
||||||
|
- Or delete ~/.claude/settings.json and reconfigure
|
||||||
|
- Verify JSON format is correct (no missing/extra commas)
|
||||||
|
|
||||||
|
**GLM Models Available:**
|
||||||
|
- `glm-4.5-air` - Fast, efficient (Haiku equivalent)
|
||||||
|
- `glm-4.7` - High quality (Sonnet/Opus equivalent)
|
||||||
|
|
||||||
## Step 4: Configure Hooks-Based Auto-Triggering (Optional)
|
## Step 4: Configure Hooks-Based Auto-Triggering (Optional)
|
||||||
|
|
||||||
|
|||||||
37
README.md
37
README.md
@@ -130,6 +130,8 @@ echo "Hello, Claude!" | claude
|
|||||||
|
|
||||||
**Best for:** Development, testing, cost savings (up to 90% cheaper)
|
**Best for:** Development, testing, cost savings (up to 90% cheaper)
|
||||||
|
|
||||||
|
**Official Documentation:** https://docs.z.ai/devpack/tool/claude
|
||||||
|
|
||||||
#### 1.1 Get Your API Key
|
#### 1.1 Get Your API Key
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
@@ -137,7 +139,7 @@ echo "Hello, Claude!" | claude
|
|||||||
# Create an account and get your GLM Coding Plan API key
|
# Create an account and get your GLM Coding Plan API key
|
||||||
```
|
```
|
||||||
|
|
||||||
#### 1.2 Configure Claude Code
|
#### 1.2 Configure Claude Code for GLM
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
# Create/update your Claude Code settings
|
# Create/update your Claude Code settings
|
||||||
@@ -147,30 +149,45 @@ cat > ~/.claude/settings.json << 'EOF'
|
|||||||
"env": {
|
"env": {
|
||||||
"ANTHROPIC_AUTH_TOKEN": "your-zai-api-key-here",
|
"ANTHROPIC_AUTH_TOKEN": "your-zai-api-key-here",
|
||||||
"ANTHROPIC_BASE_URL": "https://api.z.ai/api/anthropic",
|
"ANTHROPIC_BASE_URL": "https://api.z.ai/api/anthropic",
|
||||||
"API_TIMEOUT_MS": "3000000"
|
"API_TIMEOUT_MS": "3000000",
|
||||||
|
"ANTHROPIC_DEFAULT_HAIKU_MODEL": "glm-4.5-air",
|
||||||
|
"ANTHROPIC_DEFAULT_SONNET_MODEL": "glm-4.7",
|
||||||
|
"ANTHROPIC_DEFAULT_OPUS_MODEL": "glm-4.7"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
EOF
|
EOF
|
||||||
```
|
```
|
||||||
|
|
||||||
#### 1.3 Install Claude Code
|
**GLM Models Available:**
|
||||||
|
- `glm-4.5-air` - Fast, efficient (Haiku equivalent)
|
||||||
|
- `glm-4.7` - High quality (Sonnet/Opus equivalent)
|
||||||
|
|
||||||
|
#### 1.3 Install Claude Code (if not installed)
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
# Install Claude Code
|
# Install Claude Code (requires Node.js 18+)
|
||||||
npm install -g @anthropic-ai/claude-code
|
npm install -g @anthropic-ai/claude-code
|
||||||
|
|
||||||
# Or use curl
|
# Verify version (recommended: 2.0.14+)
|
||||||
curl -fsSL https://claude.ai/install.sh | sh
|
claude --version
|
||||||
|
|
||||||
|
# Upgrade if needed
|
||||||
|
claude update
|
||||||
```
|
```
|
||||||
|
|
||||||
#### 1.4 Verify Installation
|
#### 1.4 Verify Installation
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
# Test Claude Code with Z.AI
|
# Start Claude Code
|
||||||
claude --version
|
claude
|
||||||
|
|
||||||
# Test connection
|
# Check model status (enter /status when prompted)
|
||||||
echo "Test connection" | claude
|
/status
|
||||||
|
|
||||||
|
# Troubleshooting:
|
||||||
|
# - Close all Claude Code windows and reopen
|
||||||
|
# - Or delete ~/.claude/settings.json and reconfigure
|
||||||
|
# - Verify JSON format is correct
|
||||||
```
|
```
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|||||||
Reference in New Issue
Block a user