simplybychris

Claude Glm Alias — Development skill for Claude Code

Development community

Tiny shell alias to run Claude Code on GLM 5.2 via OpenRouter — no extra tooling, just one function in your shell profile (macOS + Windows).

How to install Claude Glm Alias

This entry records only its repository, not the path inside it, so there is no exact command to give. Open simplybychris/claude-glm-alias and copy the folder into ~/.claude/skills/, or the file into ~/.claude/agents/.

What Claude Glm Alias does

Tiny shell alias to run Claude Code on GLM 5.2 via OpenRouter — no extra tooling, just one function in your shell profile (macOS + Windows).

Alternatives in Development

  • Lumenx Build — LumenX Studio 桌面应用构建流程 - macOS DMG 和 Windows EXE 打包 1.2k ★
  • Claude Code Zh Cn — Claude Code CLI 简体中文本地化 / 汉化插件;支持 macOS、Linux、WSL、Windows 与新版 native,一行安装,更新后自动修复 721 ★
  • Claude Keysmith — Managed Claude Code instruction deployment with safe CLI recovery and an unsigned macOS/Windows desktop beta 696 ★

README

claude-glm-alias

A tiny shell alias that launches **Claude Code** wired to **GLM 5.2** through **OpenRouter** — no extra tooling, no proxy, no router. Just one function in your shell profile.

Run `claude_glm` instead of `claude`, and your whole Claude Code session (main model, sub-agents, background tasks) runs on GLM 5.2.

How it works

OpenRouter exposes an Anthropic-compatible endpoint, so Claude Code can talk to it directly. The function just points Claude Code at OpenRouter and overrides every model role to GLM 5.2:

Variable Role
ANTHROPIC_BASE_URL OpenRouter endpoint
ANTHROPIC_AUTH_TOKEN your OpenRouter API key
ANTHROPIC_API_KEY="" blanked, so it doesn't clash with a native Claude login
ANTHROPIC_MODEL main model
ANTHROPIC_DEFAULT_OPUS_MODEL Opus-class tasks (complex reasoning)
ANTHROPIC_DEFAULT_SONNET_MODEL Sonnet-class tasks (general coding)
ANTHROPIC_DEFAULT_HAIKU_MODEL Haiku-class tasks (quick completions)
ANTHROPIC_SMALL_FAST_MODEL background / fast tasks
CLAUDE_CODE_SUBAGENT_MODEL sub-agents

macOS — `claude-glm.macos.zsh`

Key is read from the macOS Keychain at runtime (never stored in plaintext).

# 1) store your OpenRouter key once
security add-generic-password -a api-key -s openrouter_glm -w "sk-or-v1-..." -U

# 2) paste the function from claude-glm.macos.zsh into ~/.zshrc, then:
source ~/.zshrc

# 3) use it
claude_glm
claude_glm -p "write a function"

Windows — `claude-glm.windows.ps1`

Key is read from a user environment variable at runtime.

# 1) store your OpenRouter key once (then open a NEW window)
setx OPENROUTER_KEY "sk-or-v1-..."

# 2) paste the function from claude-glm.windows.ps1 into $PROFILE, then:
. $PROFILE

# 3) use it
claude_glm
claude_glm -p "write a function"

Notes

  • Get an API key at openrouter.ai. Any OpenRouter model slug works — swap z-ai/glm-5.2 for another if yo