The CLI helper for configuring Claude Code with Qiniu AI API endpoints
็ฎไฝไธญๆ ยท Features ยท Quick Start ยท Commands ยท Configuration ยท FAQ
- ๐ฏ Interactive Wizard โ Guided step-by-step setup for language, endpoint, API Key, and model on first run
- ๐ Multi-Region Support โ Domestic (api.qnaigc.com) / International (openai.sufy.com) endpoints
- ๐ API Key Management โ Input, validate, save, and revoke API keys
- ๐ฆ Model Configuration โ Fetch available models from the API, with manual model ID input support
- โก Claude Code Integration โ Automatically writes environment variables to
~/.claude/settings.json - ๐ Health Check โ Built-in
doctorcommand to verify config, API Key, network, tools, Git, and Node.js - ๐ Internationalization โ Supports Chinese (zh_CN) and English (en_US)
Before you begin, ensure you have:
- Node.js 18 or later (Download)
- Claude Code CLI installed (Get it here)
- Qiniu API Key (Get one here)
No installation required โ just run:
npx qiniu-coding-helper- Select your language (Chinese / English)
- Choose your endpoint (Domestic / International)
- Enter and validate your API Key
- Pick a model
If Claude Code is running, restart it to apply changes.
claudeThat's it! You're now using Qiniu AI endpoints in Claude Code.
Run the interactive setup wizard (force re-initialization).
npx qiniu-coding-helper initManage your API Key authentication.
# Set API Key interactively
npx qiniu-coding-helper auth
# Set API Key directly
npx qiniu-coding-helper auth <token>
# Remove API Key
npx qiniu-coding-helper auth revoke
# Reload configuration to Claude Code
npx qiniu-coding-helper auth reload claudeManage interface language.
# Show current language
npx qiniu-coding-helper lang show
# Set to Chinese
npx qiniu-coding-helper lang set zh_CN
# Set to English
npx qiniu-coding-helper lang set en_USRun system health check to diagnose configuration issues.
npx qiniu-coding-helper doctorChecks: Config files ยท API Key validity ยท Network connectivity ยท Claude Code installation ยท Git ยท Node.js
Enter the interactive configuration menu.
# Main menu
npx qiniu-coding-helper enter
# Claude Code configuration menu
npx qiniu-coding-helper enter claude-code| Location | Path | Purpose |
|---|---|---|
| Coding Helper Config | ~/.coding-helper/config.yaml |
Language, endpoint, API Key, model settings |
| Claude Code Settings | ~/.claude/settings.json |
API endpoint environment variables |
| Claude Code Onboarding | ~/.claude.json |
Onboarding completion flag |
| Region | Base URL | Best For |
|---|---|---|
| ๐จ๐ณ Domestic | https://api.qnaigc.com |
Users in China |
| ๐ International | https://openai.sufy.com |
Users outside China |
When configuration is applied, these environment variables are set in ~/.claude/settings.json:
{
"env": {
"ANTHROPIC_BASE_URL": "https://api.qnaigc.com",
"ANTHROPIC_AUTH_TOKEN": "<your-api-key>",
"API_TIMEOUT_MS": "3000000",
"CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC": "1"
}
}Note: The tool also sets
API_TIMEOUT_MS(50 min, for long inference requests), disables non-essential traffic (telemetry not needed for third-party endpoints), and disables commit/PR attribution (inaccurate via proxy endpoints).
- Run
npx qiniu-coding-helper doctorto check configuration - Run
npx qiniu-coding-helper auth reload claudeto reapply settings - Restart Claude Code completely
- Ensure
ANTHROPIC_BASE_URLis not set in your shell environment (unset ANTHROPIC_BASE_URL)
- Verify your API Key: check
~/.coding-helper/config.yaml - Confirm the correct endpoint is selected (Domestic vs International)
- Ensure your API Key has remaining quota on the Qiniu Portal
chmod 600 ~/.claude/settings.json
chmod 600 ~/.coding-helper/config.yamlpnpm install # Install dependencies
pnpm build # Build (tsc + copy locales to dist/)
pnpm dev # Watch mode
pnpm start # Run CLI (node dist/cli.js)
pnpm clean # Clean dist/Verify after build:
node dist/cli.js --version
node dist/cli.js --help
node dist/cli.js doctorThis project is licensed under the AGPL-3.0 License.