@lee_ai/coding-helper
v0.2.0
Published
GLM Coding Plan Helper for managing multi coding tools (enhanced fork with dynamic model selection)
Readme
Coding Tool Helper (ai-helper)
An enhanced fork of @z_ai/coding-helper — a multi-provider CLI helper for managing coding tools like Claude Code, with dynamic model selection and support for 11 AI providers.
Currently supported coding tools:
- Claude Code
- OpenCode
- Crush
- Factory Droid
Currently supported AI providers:
| Provider | API Format | Auth Type | |---|---|---| | GLM Coding Plan (Global) | Anthropic | API Key | | GLM Coding Plan (China) | Anthropic | API Key | | OpenAI | OpenAI | API Key | | Anthropic (Claude) | Anthropic | API Key | | xAI (Grok) | OpenAI-Compatible | API Key | | GitHub Copilot | OpenAI-Compatible | OAuth | | Google Gemini | OpenAI-Compatible | API Key | | Amazon Bedrock | Anthropic | API Key | | DeepSeek | OpenAI-Compatible | API Key | | Mistral AI | OpenAI-Compatible | API Key |
Features
- Multi-provider support — Connect and manage 11 AI providers, not just GLM Coding Plan
- Dynamic model selection — Automatically fetches available models from the provider API and lets you choose
- Interactive wizard — Friendly onboarding guidance on first launch
- Provider management — Connect, activate, update, and disconnect providers with ease
- Auto-detection — Detects providers from environment variables (e.g.
OPENAI_API_KEY,ANTHROPIC_API_KEY) - Tool management — Automatically detects, installs, and configures CLI tools
- MCP configuration — Easily manage MCP services
- Secure credential storage — Credentials stored in a separate
auth.yamlwith restricted file permissions (0600) - Local storage — All settings are stored securely on your machine
- Internationalization support — Chinese and English bilingual interface
- Legacy migration — Automatically migrates configs from the original
@z_ai/coding-helper
Quick Start
Prerequisite: make sure Node.js 18 or later is installed.
Install and launch
Option 1
## Run directly with npx
npx @lee_ai/coding-helperOption 2
## Install @lee_ai/coding-helper globally first
npm install -g @lee_ai/coding-helper
## Then run ai-helper
ai-helperComplete the wizard
Once you enter the wizard UI, use the Up/Down arrow keys to navigate and press Enter to confirm each action, following the guided initialization flow.
The wizard will help you complete:
- Selecting the UI language
- Connecting an AI provider (choosing provider, entering API key, selecting model)
- Selecting the tools to manage
- Automatically installing tools (if needed)
- Loading the provider configuration into the tools
- Managing MCP services (optional)
Command list
Besides the interactive wizard, ai-helper also supports executing every feature directly through CLI arguments:
# Show help
ai-helper -h
ai-helper --help
# Show version
ai-helper -v
ai-helper --version
# Run the initialization wizard
ai-helper init
# Language management
ai-helper lang show # Display the current language
ai-helper lang set zh_CN # Switch to Chinese
ai-helper lang set en_US # Switch to English
ai-helper lang --help # Show help for language commands
# API key management
ai-helper auth # Interactively set the key
ai-helper auth revoke # Delete the saved key
ai-helper auth reload claude # Load the latest provider config into the Claude Code tool
ai-helper auth --help # Show help for auth commands
# Health check
ai-helper doctor # Inspect system configuration and tool statusConfiguration files
Main config: ~/.chelper/config.yaml
lang: zh_CN # UI language
active_provider: glm-global # Currently active provider ID
providers: # Per-provider configuration
glm-global:
model: glm-5.1
openai:
model: gpt-4oCredential storage: ~/.chelper/auth.yaml
Credentials are stored separately with restricted file permissions (0600):
glm-global:
api_key: your-api-key-here
openai:
api_key: sk-xxxDifferences from @z_ai/coding-helper
This project is an enhanced fork based on @z_ai/[email protected]. Below is a summary of all differences:
1. Multi-Provider Architecture (Core Change)
| Aspect | Original (@z_ai/coding-helper) | This Fork (@lee_ai/coding-helper) |
|---|---|---|
| Provider count | 2 (GLM Global, GLM China) | 11 (GLM + OpenAI, Anthropic, xAI, GitHub Copilot, Gemini, Bedrock, DeepSeek, Mistral) |
| Auth model | Plan-based (glm_coding_plan_global / glm_coding_plan_china) | Provider-based (any provider ID) |
| Credential storage | Single config.yaml with api_key field | Separate auth.yaml with restricted permissions (0600) |
| Config structure | plan + api_key + model | active_provider + providers[id] + per-provider model |
2. Dynamic Model Selection
- Original: No model selection — user must manually edit
~/.claude/settings.jsonto changeANTHROPIC_MODEL - Fork: Automatically fetches available models from the provider's API (
/v4/modelsor equivalent) and presents an interactive selection list. Falls back to "default (unspecified)" if the API call fails.
3. Environment Variable Auto-Detection
- Original: None
- Fork: Automatically detects providers from environment variables:
GLM_API_KEY-> GLM providersOPENAI_API_KEY-> OpenAIANTHROPIC_API_KEY-> AnthropicXAI_API_KEY-> xAIGITHUB_COPILOT_TOKEN-> GitHub CopilotGOOGLE_API_KEY/GEMINI_API_KEY-> Google GeminiAWS_ACCESS_KEY_ID/AWS_SECRET_ACCESS_KEY-> Amazon BedrockDEEPSEEK_API_KEY-> DeepSeekMISTRAL_API_KEY-> Mistral
4. Package & CLI Naming
| Item | Original | Fork |
|---|---|---|
| Package name | @z_ai/coding-helper | @lee_ai/coding-helper |
| CLI binary | chelper / coding-helper | ai-helper / chelper |
| Author | Z.AI | LEE.AI |
| Version | 0.0.7 | 0.1.0 |
5. New Files
dist/lib/auth-store.js— Centralized credential storage with per-provider management and legacy migration supportdist/lib/provider-registry.js— Provider registry defining 11 built-in providers with their API formats, base URLs, auth types, and supported tools
6. Refactored Files
| File | Summary of Changes |
|---|---|
| dist/lib/wizard.js | Replaced plan-based flow with provider management menu (connect, activate, manage, disconnect providers) |
| dist/lib/config.js | Added provider-based config methods (getActiveProvider, setActiveProvider, getProviderConfig, custom provider support), legacy migration |
| dist/lib/api-validator.js | Provider-aware model fetching and API key validation |
| dist/lib/claude-code-manager.js | loadGLMConfig() -> loadConfig(providerId, apiKey, model), supports Anthropic/OpenAI API formats |
| dist/lib/opencode-manager.js | loadGLMConfig() -> loadConfig(providerId, apiKey, model), dynamic base URLs for OpenAI-compatible providers |
| dist/lib/crush-manager.js | loadGLMConfig() -> loadConfig(providerId, apiKey, model), multi-provider tagging |
| dist/lib/factory-droid-manager.js | loadGLMConfig() -> loadConfig(providerId, apiKey, model), per-provider model entries |
| dist/lib/tool-manager.js | loadGLMConfig() -> loadConfig(toolName, providerId, apiKey, model), provider-aware delegation |
| dist/lib/command.js | CLI name changed to ai-helper, removed legacy enter subcommand |
| dist/commands/auth.js | Provider-aware auth management, uses authStore and providerRegistry |
| dist/locales/zh_CN.json | Added provider-related keys, removed hardcoded plan/model keys |
| dist/locales/en_US.json | Same structure as zh_CN, English translations |
7. Unchanged Files
The following files remain identical to the original:
- All
.d.tsTypeScript definition files cli.js,index.js(entry points)dist/utils/logger.js,dist/utils/string-width.jsdist/commands/doctor.js,dist/commands/config.js,dist/commands/lang.jsdist/lib/mcp-manager.jsdist/commands/index.js
8. Backward Compatibility
- Existing GLM configs are automatically migrated to the new provider format
- Plan ID mapping:
glm_coding_plan_global->glm-global,glm_coding_plan_china->glm-china - API keys and model preferences are preserved during migration
- When no model is selected, behavior is identical to the original (no
ANTHROPIC_MODELwritten) unloadConfig()cleans up both the config and theANTHROPIC_MODELenvironment variable
License
Apache License 2.0. Based on @z_ai/coding-helper (Copyright 2025 Zhipu AI). Modifications follow the same license.
