zcf 3.3.2 → 3.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -16,7 +16,7 @@
16
16
  <p align="center">
17
17
  <b>English</b> | <a href="README_zh-CN.md">中文</a> | <a href="README_ja-JP.md">日本語</a> | <a href="CHANGELOG.md">Changelog</a>
18
18
 
19
- **✨ Quick Links**: [Codex Support](#-codex-support-v300-new) | [BMad Workflow](#-bmad-workflow-v27-new-feature) | [Spec Workflow](#-spec-workflow-v2124-new-feature) | [Open Web Search](#-open-web-search-v2129-new-feature) | [CCR Router](#-ccr-claude-code-router-support-v28-enhanced) | [CCometixLine](#-ccometixline-support-status-bar-tool-v299-new) | [Output Styles](#-ai-output-styles-v212-new-feature) | [Multi-Configuration Management](#-multi-configuration-management-v320-new)
19
+ **✨ Full Documentation**: [ZCF Docs](https://zcf.ufomiao.com/)
20
20
 
21
21
  > Zero-config, one-click setup for Claude Code & Codex with bilingual support, intelligent agent system and personalized AI assistant
22
22
  </p>
@@ -29,905 +29,58 @@
29
29
 
30
30
  ---
31
31
 
32
+ [![GLM](./src/assets/GLM-en.png)](https://z.ai/subscribe?ic=8JVLJQFSKB)
33
+ This project is sponsored by Z.ai, supporting us with their GLM CODING PLAN.
34
+ GLM CODING PLAN is a subscription service designed for AI coding, starting at just $3/month. It provides access to their flagship GLM-4.6 model across 10+ popular AI coding tools (Claude Code, Cline, Roo Code, etc.), offering developers top-tier, fast, and stable coding experiences.
35
+ Get 10% OFF GLM CODING PLAN:https://z.ai/subscribe?ic=8JVLJQFSKB
36
+
37
+ ---
38
+
32
39
  <table>
40
+ <tbody>
33
41
  <tr>
34
42
  <td width="180"><a href="https://www.packyapi.com/register?aff=zcf"><img src="./src/assets/packycode.png" alt="PackyCode" width="150"></a></td>
35
43
  <td>Thanks to PackyCode for sponsoring this project! PackyCode is a reliable and efficient API relay service provider, offering relay services for Claude Code, Codex, Gemini, and more. PackyCode provides special discounts for our software users: register using <a href="https://www.packyapi.com/register?aff=zcf">this link</a> and enter the "zcf" promo code during recharge to get 10% off.</td>
36
44
  </tr>
45
+ <tbody>
37
46
  </table>
38
47
 
39
48
  ## 🚀 Quick Start
40
49
 
41
- ### 🎯 Recommended: Use Interactive Menu (v2.0 New)
42
-
43
- ```bash
44
- npx zcf # Open interactive menu and choose operations based on your needs
45
- ```
46
-
47
- Menu options include:
48
-
49
- - `1` Full initialization (equivalent to `zcf i`)
50
- - `2` Import workflows (equivalent to `zcf u`)
51
- - `3` Configure API or CCR - API configuration or CCR proxy setup
52
- - `4` Configure MCP - MCP service configuration and management
53
- - `5` Configure default model - Set default model (opus/sonnet/sonnet 1m/custom)
54
- - `6` Configure AI memory - Configure AI output language and global output style
55
- - `7` Configure environment permissions - Import environment variables and permissions
56
- - `R` Claude Code Router management (enhanced in v2.8.1)
57
- - `U` ccusage - Claude Code usage analysis
58
- - `L` CCometixLine - High-performance statusline tool with Git integration and real-time usage tracking (v2.9.9+ new)
59
- - `+` Check updates - Check and update Claude Code, CCR and CCometixLine versions (v2.9.9+ enhanced)
60
- - More features...
61
-
62
- #### 🎯 Key Configuration Features
63
-
64
- **Model Configuration (Option 5)**: Configure your default Claude model with flexible options:
65
- - **Default**: Let Claude Code automatically choose the best model for each task
66
- - **Opus**: Use Claude-4.1-Opus exclusively (high token consumption, use with caution)
67
- - **Sonnet 1M**: Use Sonnet with 1M context window for larger context tasks
68
- - **Custom**: Specify your own model names for both primary and fast tasks (supports any custom model)
69
-
70
- **AI Memory Configuration (Option 6)**: Personalize your AI assistant:
71
- - **AI Output Language**: Set the language for AI responses (Chinese, English, or custom)
72
- - **Global Output Style**: Configure AI personality and response style
73
-
74
- ### Or, use direct commands:
75
-
76
- #### 🆕 First time using Claude Code
77
-
78
- ```bash
79
- npx zcf i # Execute full initialization directly: Install Claude Code + Import workflows + Configure API + Set up MCP services
80
- # or
81
- npx zcf → select 1 # Execute full initialization via menu
82
- ```
83
-
84
- #### 🔄 Already have Claude Code installed
85
-
86
- ```bash
87
- npx zcf u # Update workflows only: Quick add AI workflows and command system
88
- # or
89
- npx zcf → select 2 # Execute workflow update via menu
90
- ```
91
-
92
- > **Note**:
93
- >
94
- > - Since v2.0, `zcf` opens the interactive menu by default, providing a visual operation interface
95
- > - You can choose operations through the menu or use commands directly for quick execution
96
- > - `zcf i` = full initialization, `zcf u` = update workflows only
97
-
98
- #### 🌐 Language Support
99
-
100
- ZCF supports bilingual operation with automatic language switching for all commands:
101
-
102
- ```bash
103
- # Use Chinese for all operations
104
- npx zcf --lang zh-CN # Interactive menu in Chinese
105
- npx zcf init --lang zh-CN # Initialize with Chinese interface
106
- npx zcf ccr --all-lang zh-CN # Configure CCR in Chinese
107
-
108
- # Language parameter priority (highest to lowest):
109
- # --all-lang > --lang > saved user preference > interactive prompt
110
- ```
111
-
112
- **Language Parameters:**
113
- - `--lang, -l`: ZCF interface language (applies to all commands)
114
- - `--all-lang, -g`: Set all language parameters at once (most convenient)
115
- - `--config-lang, -c`: Template files language (init/update commands only)
116
- - `--ai-output-lang, -a`: AI assistant output language (init command only)
117
-
118
- #### 🤖 Non-interactive Mode
119
-
120
- For CI/CD and automated setups, use `--skip-prompt` with parameters:
50
+ - Recommended: `npx zcf` opens the interactive menu and guides you through install/update.
51
+ - Common commands:
121
52
 
122
53
  ```bash
123
- # Using API provider preset (v3.3.0+ New - Simplified)
124
- npx zcf i -s -p 302ai -k "sk-xxx"
125
-
126
- # Shorthand version (traditional)
127
- npx zcf i -s -g zh-CN -t api_key -k "sk-xxx" -u "https://xxx.xxx"
128
-
129
- # Complete version (traditional)
130
- npx zcf i --skip-prompt --all-lang zh-CN --api-type api_key --api-key "sk-xxx" --api-url "https://xxx.xxx"
131
-
132
- # Using provider preset with custom models
133
- npx zcf i -s -p 302ai -k "sk-xxx" -M "claude-sonnet-4-5" -F "claude-haiku-4-5"
134
-
135
- # Complete version (with custom models)
136
- npx zcf i --skip-prompt \
137
- --api-type api_key \
138
- --api-key "sk-xxx" \
139
- --api-url "https://xxx.xxx" \
140
- --api-model "claude-sonnet-4-5" \
141
- --api-fast-model "claude-haiku-4-5"
142
-
143
- # Multiple API configurations (JSON string)
144
- npx zcf i -s --api-configs '[
145
- {"provider":"302ai","key":"sk-xxx"},
146
- {"provider":"glm","key":"sk-yyy"},
147
- {"name":"custom","type":"api_key","key":"sk-zzz","url":"https://custom.api.com","primaryModel":"claude-sonnet-4-5","fastModel":"claude-haiku-4-5","default":true}
148
- ]'
149
-
150
- # Multiple API configurations (JSON file)
151
- npx zcf i -s --api-configs-file ./api-configs.json
152
-
153
- # For Codex with multiple providers
154
- npx zcf i -s -T cx --api-configs '[
155
- {"provider":"302ai","key":"sk-xxx"},
156
- {"name":"custom","type":"api_key","key":"sk-yyy","url":"https://custom.api.com","primaryModel":"gpt-5","default":true}
157
- ]'
54
+ npx zcf i # Full initialization: install + workflows + API/CCR + MCP
55
+ npx zcf u # Update workflows only
56
+ npx zcf --lang zh-CN # Switch interface language (example)
158
57
  ```
159
58
 
160
- #### 🎯 API Provider Presets (v3.3.0+ New)
161
-
162
- ZCF now supports API provider presets that automatically configure baseUrl and models, simplifying configuration from 5+ parameters to just 2:
163
-
164
- **Supported Providers:**
165
- - `302ai` - [302.AI](https://share.302.ai/gAT9VG) API Service
166
- - `packycode` - [PackyCode](https://www.packyapi.com/register?aff=zcf) API Service
167
- - `glm` - GLM (z.ai)
168
- - `minimax` - MiniMax API Service
169
- - `kimi` - Kimi (Moonshot AI)
170
- - `custom` - Custom API endpoint (requires manual URL configuration)
171
-
172
- **Usage Examples:**
59
+ - Non-interactive example (provider preset):
173
60
 
174
61
  ```bash
175
- # Using 302.AI provider
176
- npx zcf i --skip-prompt --provider 302ai --api-key "sk-xxx"
177
- # or shorthand
178
62
  npx zcf i -s -p 302ai -k "sk-xxx"
179
-
180
- # Using PackyCode provider
181
- npx zcf i -s -p packycode -k "sk-xxx"
182
-
183
- # Using GLM provider
184
- npx zcf i -s -p glm -k "sk-xxx"
185
-
186
- # Using MiniMax provider
187
- npx zcf i -s -p minimax -k "sk-xxx"
188
-
189
- # Using Kimi provider
190
- npx zcf i -s -p kimi -k "sk-xxx"
191
-
192
- # Using custom provider (requires URL)
193
- npx zcf i -s -p custom -k "sk-xxx" -u "https://api.example.com"
194
-
195
- # For Codex
196
- npx zcf i -s -T cx -p 302ai -k "sk-xxx"
197
- ```
198
-
199
- **Benefits:**
200
- - ✅ Automatic baseUrl configuration
201
- - ✅ Automatic authType selection
202
- - ✅ Automatic model configuration (if available)
203
- - ✅ Reduces configuration from 5+ parameters to 2
204
- - ✅ Supports both Claude Code and Codex
205
-
206
- #### Non-interactive Mode Parameters
207
-
208
- When using `--skip-prompt`, the following parameters are available:
209
-
210
- | Parameter | Description | Values | Required | Default |
211
- | ---------------------------- | -------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | -------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------- |
212
- | `--skip-prompt, -s` | Skip all interactive prompts | - | Yes (for non-interactive mode) | - |
213
- | `--provider, -p` | API provider preset (v3.3.0+ New) | `302ai`, `packycode`, `glm`, `minimax`, `kimi`, `custom` | No | - (Simplifies configuration by auto-filling baseUrl and models) |
214
- | `--lang, -l` | ZCF display language (applies to all commands) | `zh-CN`, `en` | No | `en` or user's saved preference |
215
- | `--config-lang, -c` | Configuration language (template files language) | `zh-CN`, `en` | No | `en` |
216
- | `--ai-output-lang, -a` | AI output language | `zh-CN`, `en`, custom string | No | `en` |
217
- | `--all-lang, -g` | Set all language parameters (applies to all commands) | `zh-CN`, `en`, custom string | No | - (Priority: `--all-lang` > `--lang` > saved user preference > interactive prompt. Custom string sets AI output language to custom while interaction and config languages remain 'en') |
218
- | `--config-action, -r` | Config handling | `new`, `backup`, `merge`, `docs-only`, `skip` | No | `backup` |
219
- | `--api-type, -t` | API configuration type | `auth_token`, `api_key`, `ccr_proxy`, `skip` | No | `skip` (auto-set to `api_key` when `--provider` is specified) |
220
- | `--api-key, -k` | API key (for both API key and auth token types) | string | Required when `api-type` is not `skip` | - |
221
- | `--api-url, -u` | Custom API URL | URL string | No | official API (auto-filled when using `--provider`) |
222
- | `--api-model, -M` | Primary API model | string (e.g., `claude-sonnet-4-5`) | No | - (auto-filled when using `--provider` if available) |
223
- | `--api-fast-model, -F` | Fast API model (Claude Code only) | string (e.g., `claude-haiku-4-5`) | No | - (auto-filled when using `--provider` if available) |
224
- | `--mcp-services, -m` | MCP services to install (multi-select, comma-separated) | `context7`, `open-websearch`, `spec-workflow`, `mcp-deepwiki`, `Playwright`, `exa`, `serena`, or `skip` for none | No | `all` |
225
- | `--workflows, -w` | Workflows to install (multi-select, comma-separated) | `commonTools`, `sixStepsWorkflow`, `featPlanUx`, `gitWorkflow`, `bmadWorkflow`, or `skip` for none | No | `all` |
226
- | `--output-styles, -o` | Output styles to install (multi-select, comma-separated) | `engineer-professional`, `nekomata-engineer`, `laowang-engineer`, `ojousama-engineer`, or `skip` for none | No | `all` |
227
- | `--default-output-style, -d` | Default output style | Same as output styles plus built-in: `default`, `explanatory`, `learning` | No | `engineer-professional` |
228
- | `--install-cometix-line, -x` | Install CCometixLine statusline tool | `true`, `false` | No | `true` |
229
- | `--code-type, -T` | Target code tool type | `claude-code`, `codex`, `cc`, `cx` | No | Current active tool type from ZCF config |
230
- | `--api-configs` | Multiple API configurations (JSON string) | JSON array string of API configuration objects | No | - (Mutually exclusive with `--api-configs-file`) |
231
- | `--api-configs-file` | Multiple API configurations (JSON file path) | Path to JSON file containing API configuration array | No | - (Mutually exclusive with `--api-configs`) |
232
-
233
- #### 🤖 Codex Support (v3.0.0+ New)
234
-
235
- [Codex](https://www.npmjs.com/package/@openai/codex) is OpenAI's official code generation CLI tool. ZCF now supports complete Codex integration with the same configuration convenience as Claude Code.
236
-
237
- **Key Features:**
238
-
239
- - **Unified Tool Management**: Switch between Claude Code and Codex seamlessly through ZCF menu
240
- - **Intelligent Configuration**: Automatic Codex CLI installation, API provider setup, and MCP service integration
241
- - **Comprehensive Backup System**: All configuration changes include timestamped backups with recovery capabilities
242
- - **Multi-Provider Support**: Configure multiple API providers (OpenAI, custom endpoints) with easy switching
243
- - **System Prompt Integration**: Install professional AI personalities (Engineer, Nekomata Engineer, Laowang Engineer)
244
- - **Workflow Templates**: Import structured development workflows optimized for code generation tasks
245
- - **Advanced Uninstaller**: Selective removal of Codex components with conflict resolution
246
-
247
- **Getting Started with Codex:**
248
-
249
- Switch to Codex mode in ZCF main menu:
250
- ```bash
251
- npx zcf → Select S # Switch between Claude Code and Codex
252
- ```
253
-
254
- Or access Codex features directly:
255
- ```bash
256
- # Full Codex initialization
257
- npx zcf → Select 1 (after switching to Codex mode)
258
-
259
- # Individual Codex configuration
260
- npx zcf → Select 3 # Configure Codex API providers
261
- npx zcf → Select 4 # Configure Codex MCP services
262
- ```
263
-
264
- **Configuration Options:**
265
-
266
- 1. **API Provider Configuration**:
267
- - **Official Login**: Use OpenAI's official authentication system
268
- - **Custom Providers**: Configure multiple API endpoints with provider switching
269
- - **Incremental Management**: Add, edit, or remove providers without affecting existing configuration
270
-
271
- 2. **System Prompt Styles**:
272
- - **Engineer Professional**: SOLID, KISS, DRY, YAGNI principles for robust code
273
- - **Nekomata Engineer**: Cute catgirl engineer with rigorous technical standards
274
- - **Laowang Engineer**: Grumpy tech style that never tolerates substandard code
275
-
276
- 3. **Workflow Integration**:
277
- - **Six-Step Workflow**: Structured development process from research to optimization
278
- - **Custom Workflows**: Import and configure task-specific development templates
279
- - **⚠️ Important**: Due to Codex prompt limitations, `/workflow` commands cannot pass parameters directly. Use `/workflow` first, then provide task description in follow-up message
280
-
281
- 4. **MCP Services**: Full compatibility with existing MCP services including:
282
- - Context7, Open WebSearch, Spec Workflow
283
- - DeepWiki, Playwright, EXA search
284
- - Serena Assistant for semantic code retrieval and editing
285
- - Automatic service configuration with API key management
286
-
287
- **File Locations:**
288
-
289
- - Configuration: `~/.codex/config.toml`
290
- - Authentication: `~/.codex/auth.json`
291
- - System Prompts: `~/.codex/AGENTS.md`
292
- - Workflows: `~/.codex/prompts/`
293
- - Backups: `~/.codex/backup/`
294
-
295
- **Migration Between Tools:**
296
-
297
- ZCF allows seamless switching between Claude Code and Codex while preserving your preferences and workflow configurations. Both tools share the same MCP services and workflow templates for consistent development experience.
298
-
299
- #### 🎨 AI Output Styles (v2.12+ New Feature)
300
-
301
- ZCF now supports customizable AI output styles to personalize your Claude Code experience:
302
-
303
- <p align="center">
304
- <a href="https://github.com/Haleclipse">
305
- <img src="./src/assets/Haleclipse.webp" alt="Halley-chan" width="200"/>
306
- </a>
307
- <div align="center">Tsundere <a href="https://github.com/Haleclipse">Halley-chan</a> Ojou-sama ( ̄▽ ̄)ゞ</div>
308
- </p>
309
-
310
- **Available Output Styles:**
311
-
312
- - `engineer-professional`: Professional software engineer following SOLID, KISS, DRY, YAGNI principles
313
- - `nekomata-engineer`: Professional catgirl engineer UFO Nya, combining rigorous engineering with cute catgirl traits
314
- - `laowang-engineer`: Laowang grumpy tech style, never tolerates code errors and non-standard code
315
- - `ojousama-engineer`: Tsundere blonde ojou-sama programmer Halley-chan, combining rigorous engineering excellence with tsundere ojou-sama traits
316
- - Built-in styles: `default`, `explanatory`, `learning` (always available)
317
-
318
- **Features:**
319
-
320
- - Install multiple styles and switch between them
321
- - Set global default style for all projects
322
- - Automatic cleanup of legacy personality files
323
- - Template-based customization system
324
-
325
- **Usage Tips:**
326
-
327
- - Use `/output-style` command to switch project-level output styles anytime
328
- - Or modify global output styles in ZCF menu option 6
329
-
330
- **Important:**
331
-
332
- - Claude Code version must be greater than 1.0.81 to support output-style. Use `npx zcf check` to update.
333
- - Legacy global memory rules have been migrated to the `engineer-professional` output style, solving issues with excessive token usage and AI forgetting global memory.
334
-
335
- #### 🎯 BMad Workflow (v2.7 New Feature)
336
-
337
- [BMad](https://github.com/bmad-code-org/BMAD-METHOD) (BMad-Method: Universal AI Agent Framework) is an enterprise-grade workflow system that provides:
338
-
339
- - Complete team of specialized AI agents (PO, PM, Architect, Dev, QA, etc.)
340
- - Structured development process with quality gates
341
- - Automatic documentation generation
342
- - Support for both greenfield and brownfield projects
343
-
344
- After installation, use `/bmad-init` to initialize the BMad workflow in your project.
345
-
346
- #### 📋 Spec Workflow (v2.12.4+ New Feature)
347
-
348
- [Spec Workflow](https://github.com/Pimzino/spec-workflow-mcp) is a comprehensive MCP service that provides structured feature development workflow from requirements to implementation:
349
-
350
- - **Requirements Analysis**: Structured requirements gathering and documentation
351
- - **Design Phase**: Detailed technical design and architecture planning
352
- - **Task Management**: Automatic task breakdown and progress tracking
353
- - **Implementation Workflow**: Systematic approach from requirements to implementation
354
- - **Interactive Dashboard**: Built-in dashboard for workflow visualization and management
355
- - **Approval System**: Review and approval process for each development phase
356
-
357
- The Spec Workflow MCP provides an optional dashboard for workflow visualization. Users can manually launch the dashboard using:
358
- ```bash
359
- npx -y @pimzino/spec-workflow-mcp@latest --dashboard
360
- ```
361
-
362
- Alternatively, you can install the [VS Code extension](https://marketplace.visualstudio.com/items?itemName=Pimzino.spec-workflow-mcp) for integrated workflow management.
363
-
364
- **Usage Guide**: For detailed usage instructions and best practices, see the [official Spec Workflow documentation](https://github.com/Pimzino/spec-workflow-mcp/blob/main/README.md#quick-start).
365
-
366
- #### 🔍 Open Web Search (v2.12.9+ New Feature)
367
-
368
- [Open Web Search](https://github.com/Aas-ee/open-webSearch) is a versatile web search MCP service that provides access to multiple search engines:
369
-
370
- - **Multi-Engine Support**: Search across DuckDuckGo, Bing, and Brave search engines
371
- - **Privacy-Focused**: Uses privacy-respecting search engines as defaults
372
- - **Flexible Configuration**: Customizable search engine preferences
373
- - **No API Key Required**: Ready to use without additional authentication
374
- - **Search Aggregation**: Ability to combine results from multiple engines
375
-
376
- #### 🚀 CCR (Claude Code Router) Support (v2.8+ Enhanced)
377
-
378
- [CCR](https://github.com/musistudio/claude-code-router/blob/main/README.md) is a powerful proxy router that enables:
379
-
380
- - **Free Model Access**: Use free AI models (like Gemini, DeepSeek) through Claude Code interface
381
- - **Custom Routing**: Route different types of requests to different models based on your rules
382
- - **Cost Optimization**: Significantly reduce API costs by using appropriate models for different tasks
383
- - **Easy Management**: Interactive menu for CCR configuration and service control
384
- - **Auto Updates**: Automatic version checking and updates for CCR and Claude Code (v2.8.1+)
385
-
386
- To access CCR features:
387
-
388
- ```bash
389
- npx zcf ccr # Open CCR management menu
390
- # or
391
- npx zcf → select R
392
63
  ```
393
64
 
394
- CCR menu options:
395
-
396
- - Initialize CCR - Install and configure CCR with preset providers
397
- - Start UI - Launch CCR web interface for advanced configuration
398
- - Service Control - Start/stop/restart CCR service
399
- - Check Status - View current CCR service status
400
-
401
- After CCR setup, ZCF automatically configures Claude Code to use CCR as the API proxy.
402
-
403
-
404
- #### 📊 CCometixLine Support (Status Bar Tool) (v2.9.9+ New)
405
-
406
- [CCometixLine](https://github.com/Haleclipse/CCometixLine) is a high-performance Rust-based statusline tool that provides:
407
-
408
- - **Real-time Usage Tracking**: Monitor Claude Code API usage in real-time
409
- - **Git Integration**: Display Git status and branch information
410
- - **Status Line Display**: Native integration with your terminal statusline
411
- - **Performance Optimized**: Built with Rust for minimal resource usage
412
- - **TUI Configuration**: Interactive terminal UI for customizing themes, segments, and display options
413
- - **Auto Updates**: Included in ZCF's update checking system
414
-
415
- CCometixLine menu options (accessible via `npx zcf` → `L`):
416
-
417
- - `1` Install or Update - Install or update CCometixLine using npm
418
- - `2` Print Default Configuration - Display current CCometixLine configuration
419
- - `3` Custom Config - TUI Configuration Mode - Interactive terminal UI for customizing settings
420
-
421
- > **Important Note for v2.9.9 Users**: If you have previously used ZCF v2.9.9 to set up your environment, please re-run the initialization process to ensure CCometixLine configuration is properly added. Run `npx zcf` and select the appropriate setup option to update your configuration with CCometixLine support.
422
-
423
- #### 🚀 Check for updates (v2.8.1+, CCometixLine support v2.9.9+):
424
-
425
- ```bash
426
- npx zcf check-updates # Check and update Claude Code, CCR and CCometixLine to latest versions
427
- # or
428
- npx zcf → select +
429
- ```
430
-
431
- ### Setup Process
432
-
433
- Full initialization (`npx zcf`) will automatically:
434
-
435
- - ✅ Detect and install Claude Code
436
- - ✅ Select AI output language (new feature)
437
- - ✅ Configure API keys or CCR proxy
438
- - ✅ Select and configure MCP services
439
- - ✅ Set up all necessary configuration files
440
-
441
- ### Usage
442
-
443
- After configuration:
444
-
445
- - **For first-time project use, strongly recommend running `/init-project` to generate CLAUDE.md for better AI understanding of project architecture**
446
- - `<task description>` - Execute directly without workflow, following SOLID, KISS, DRY, and YAGNI principles, suitable for small tasks like bug fixes
447
- - `/feat <task description>` - Start new feature development, divided into plan and UI phases
448
- - `/workflow <task description>` - Execute complete development workflow, not automated, starts with multiple solution options, asks for user feedback at each step, allows plan modifications, maximum control
449
-
450
- > **PS**:
451
- >
452
- > - Both feat and workflow have their advantages, try both to compare
453
- > - Generated documents are located by default at `.claude/xxx.md` in project root, you can add `.claude/` to your project's `.gitignore`
454
-
455
- ## ✨ ZCF Tool Features
456
-
457
- ### 🌏 Multi-language Support
458
-
459
- - Script interaction language: Controls installation prompts language
460
- - Configuration file language: Determines which configuration set to install (zh-CN/en)
461
- - AI output language: Choose the language for AI responses (supports Chinese, English, and custom languages)
462
- - AI output styles: Support multiple preset styles (Professional Engineer, Nekomata Engineer, Laowang Engineer, Ojou-sama Engineer) for customized experience
463
-
464
- ### 🔧 Smart Installation
465
-
466
- - Auto-detects Claude Code installation status
467
- - Uses npm for automatic installation (ensures compatibility)
468
- - Cross-platform support (Windows/macOS/Linux/WSL/Termux)
469
- - Automatic MCP service configuration
470
- - Smart configuration merging and partial modification support (v2.0 new)
471
- - Enhanced command detection mechanism (v2.1 new)
472
- - Dangerous operation confirmation mechanism (v2.3 new)
473
-
474
- ### 📦 Complete Configuration
475
-
476
- - CLAUDE.md system instructions
477
- - settings.json configuration file
478
- - commands custom commands
479
- - agents AI agent configurations
480
-
481
- ### 🔐 API Configuration
482
-
483
- ZCF provides flexible API configuration options for both Claude Code and Codex:
484
-
485
- **Quick Setup with API Provider Presets (v3.3.0+ New):**
486
-
487
- Choose from popular API providers with pre-configured settings:
488
- - **302.AI** - Pay-as-you-go AI service with comprehensive model support
489
- - **PackyCode** - PackyCode API Service
490
- - **GLM (智谱AI)** - Zhipu AI's GLM models
491
- - **MiniMax** - MiniMax AI service
492
- - **Kimi (Moonshot AI)** - Moonshot's Kimi models
493
- - **Custom Configuration** - Full manual configuration for any provider
494
-
495
- When using a preset provider, you only need to:
496
- 1. Select the provider from the list
497
- 2. Enter your API key
498
-
499
- The system automatically configures:
500
- - API base URL
501
- - Authentication type (API Key or Auth Token)
502
- - Default models (if applicable)
503
- - Wire API protocol (for Codex)
504
-
505
- **Traditional Configuration Methods:**
506
-
507
- - **Official Login**: Use official authentication system (no API configuration needed)
508
- - **Auth Token**: For tokens obtained via OAuth or browser login
509
- - **API Key**: For API keys from Anthropic Console or custom providers
510
- - **CCR Proxy**: Configure Claude Code Router proxy
511
- - **Custom API URL**: Support for any compatible API endpoint
512
- - **Partial Modification**: Update only needed configuration items (v2.0+)
513
-
514
- ### 💾 Configuration Management
515
-
516
- - Smart backup of existing configurations (all backups saved in ~/.claude/backup/)
517
- - Configuration merge option (v2.0 enhanced: supports deep merge)
518
- - Safe overwrite mechanism
519
- - Automatic backup before MCP configuration changes
520
- - Default model configuration (v2.0 new)
521
- - AI memory management (v2.0 new)
522
- - ZCF cache cleanup (v2.0 new)
523
-
524
- ### 🧩 Multi-Configuration Management (v3.2.0 New)
525
-
526
- Unified, incremental, interactive management for both Claude Code and Codex:
527
-
528
- - Claude Code: Manage API profiles (add/edit/delete, default profile, duplicate detection)
529
- - Codex: Manage model providers (list/switch, official login via interactive)
530
- - Safe backups; prevents deleting the last profile (Claude Code)
531
- - Applies environment to `~/.claude/settings.json` and restarts CCR when needed
532
- - Config storage: `~/.ufomiao/zcf/config.toml` (backups `config.backup.YYYY-MM-DD_HH-mm-ss.toml`)
533
-
534
- Choose tool type explicitly:
535
-
536
- ```bash
537
- # -T accepts: claude-code|codex or short aliases cc|cx
538
- npx zcf cs --list -T cc # List Claude Code profiles
539
- npx zcf cs --list -T cx # List Codex providers
540
- npx zcf cs -l -T cc # Short option for --list
541
- npx zcf cs -l -T cx # Short option for --list
542
- ```
543
-
544
- Claude Code usage:
545
-
546
- ```bash
547
- # Quick switch
548
- npx zcf cs official -T cc # Switch to official login
549
- npx zcf cs ccr -T cc # Switch to CCR proxy
550
- npx zcf cs my-profile -T cc
551
- ```
552
-
553
- Codex usage:
554
-
555
- ```bash
556
- # List and switch providers
557
- npx zcf cs --list -T cx
558
- npx zcf cs my-provider -T cx
559
-
560
- # Switch to official login (interactive selection)
561
- npx zcf config-switch -T cx
562
- ```
563
-
564
- Notes:
565
- - ENV mapping (Claude Code): API Key → `ANTHROPIC_API_KEY`, Auth Token → `ANTHROPIC_AUTH_TOKEN`, Base URL → `ANTHROPIC_BASE_URL`.
566
- - Active code tool type is stored in ZCF config; use `-T cc/cx` only when targeting a different tool than the current one.
567
-
568
- ## 📖 Usage Instructions
569
-
570
- ### Interactive Menu (v2.0)
571
-
572
- ```bash
573
- $ npx zcf
574
-
575
- ZCF - Zero-Config Code Flow
576
-
577
- ? Select ZCF display language / 选择ZCF显示语言:
578
- ❯ 简体中文
579
- English
580
-
581
- Select function:
582
- -------- Claude Code --------
583
- 1. Full initialization - Install Claude Code + Import workflow + Configure API or CCR proxy + Configure MCP services
584
- 2. Import workflow - Import/update workflow-related files only
585
- 3. Configure API - Configure API URL and authentication (supports CCR proxy)
586
- 4. Configure MCP - Configure MCP services (includes Windows fix)
587
- 5. Configure default model - Set default model (opus/sonnet/sonnet 1m/custom)
588
- 6. Configure Claude global memory - Configure AI output language and output styles
589
- 7. Import recommended environment variables and permissions - Import privacy protection environment variables and system permissions
590
-
591
- --------- Other Tools ----------
592
- R. CCR - Claude Code Router management
593
- U. ccusage - Claude Code usage analysis
594
- L. CCometixLine - High-performance statusline tool with Git integration and real-time usage tracking
595
-
596
- ------------ ZCF ------------
597
- 0. Select display language / 更改显示语言 - Change ZCF interface language
598
- -. Uninstall - Remove Claude Code configurations and tools from system
599
- +. Check updates - Check and update Claude Code, CCR and CCometixLine versions
600
- Q. Exit
601
-
602
- Enter your choice: _
603
- ```
604
-
605
- ### Full Initialization Flow (Select 1 or use `zcf i`)
606
-
607
- ```bash
608
- ? Select Claude Code configuration language:
609
- ❯ English (en) - English (recommended, lower token consumption)
610
- 简体中文 (zh-CN) - Chinese (easier for Chinese users to customize)
611
- 日本語 (ja) - Japanese (日本のユーザー向け)
612
-
613
- ? Select AI output language:
614
- AI will respond to you in this language
615
- ❯ English
616
- 简体中文
617
- 日本語
618
- Custom
619
- (Supports French, German, and more)
620
-
621
- ? Claude Code not found. Install automatically? (Y/n)
622
-
623
- ✔ Claude Code installed successfully
624
-
625
- ? Existing config detected. How to proceed?
626
- ❯ Backup and overwrite - Backup existing config to ~/.claude/backup/
627
- Update docs only - Only update workflows and docs, keep existing API config
628
- Merge config - Merge with existing config, preserve user customizations
629
- Skip - Skip configuration update
630
-
631
- ? Select API authentication method
632
- ❯ Use Official Login
633
- Use official authentication system without API configuration
634
- Use Auth Token (OAuth authentication)
635
- For tokens obtained via OAuth or browser login
636
- Use API Key (Key authentication)
637
- For API keys from Anthropic Console
638
- Configure CCR Proxy (Claude Code Router)
639
- Use multiple AI models via proxy routing to reduce costs and explore possibilities
640
- Skip (configure manually later)
641
-
642
- ? Enter API URL: https://api.anthropic.com
643
- ? Enter Auth Token or API Key: xxx
644
-
645
- ? Select output styles to install:
646
- ❯ Engineer Professional - Professional software engineer following SOLID, KISS, DRY, YAGNI principles
647
- Nekomata Engineer - Professional catgirl engineer UFO Nya, combining rigorous engineering with cute catgirl traits
648
- Laowang Grumpy Tech - Laowang grumpy tech style, never tolerates code errors and non-standard code
649
- Ojou-sama Engineer - Tsundere blonde ojou-sama programmer Halley-chan, combining rigorous engineering excellence with tsundere ojou-sama traits
650
-
651
- ? Select global default output style:
652
- ❯ Engineer Professional
653
-
654
- ? Select workflows to install (space to select, enter to confirm):
655
- ❯ ◉ Common Tools (init-project + init-architect + get-current-datetime) - Essential project initialization and utility commands
656
- ◉ Six Steps Workflow (workflow) - Complete 6-phase development process
657
- ◉ Feature Planning and UX Design (feat + planner + ui-ux-designer) - Structured feature development
658
- ◉ Git Commands (commit + rollback + cleanBranches + worktree) - Streamlined Git operations
659
- ◉ BMAD-Method Extension Installer - Enterprise agile development workflow
660
-
661
- ✔ Installing workflows...
662
- ✔ Installed command: zcf/workflow.md
663
- ✔ Installed command: zcf/feat.md
664
- ✔ Installed agent: zcf/plan/planner.md
665
- ✔ Installed agent: zcf/plan/ui-ux-designer.md
666
- ✔ Installed command: zcf/git/git-commit.md
667
- ✔ Installed command: zcf/git/git-rollback.md
668
- ✔ Installed command: zcf/git/git-cleanBranches.md
669
- ✔ Installed command: zcf/git/git-worktree.md
670
- ✔ Installed command: zcf/bmad-init.md
671
- ✔ Workflow installation successful
672
-
673
- ? Configure MCP services? (Y/n)
674
-
675
- ? Select MCP services to install (space to select, enter to confirm):
676
- ❯ ◉ Context7 Documentation Query - Query latest library docs and code examples
677
- ◉ DeepWiki - Query GitHub repository docs and examples
678
- ◉ Playwright Browser Control - Direct browser automation control
679
- ◉ Exa AI Search - Web search using Exa AI
680
- ◉ Serena Assistant - Semantic code retrieval and editing akin to an IDE
681
- ◯ Install all services
682
-
683
- ✔ MCP services configured
684
-
685
- ? Install CCometixLine statusline tool? (Y/n)
686
-
687
- ✔ Setup complete! Claude Code environment is ready
688
-
689
- 🎉 Setup complete! Use 'claude' command to start.
690
-
691
- ```
692
-
693
- ### Command Line Options
694
-
695
- #### Commands Quick Reference
696
-
697
- | Command | Alias | Description |
698
- | ------------------- | ------- | ------------------------------------------------------------------------------------- |
699
- | `zcf` | - | Show interactive menu (v2.0 default command) |
700
- | `zcf init` | `zcf i` | Initialize Claude Code configuration |
701
- | `zcf update` | `zcf u` | Update workflow-related md files with backup |
702
- | `zcf ccu` | - | Run Claude Code usage analysis tool - [ccusage](https://github.com/ryoppippi/ccusage) |
703
- | `zcf ccr` | - | Open CCR (Claude Code Router) management menu |
704
- | `zcf config-switch` | `zcf cs` | API provider/config switching for Claude Code and Codex (`-T cc` / `-T cx`) |
705
- | `zcf uninstall` | - | Interactive uninstall tool for Claude Code configurations and tools |
706
- | `zcf check-updates` | - | Check and update Claude Code, CCR and CCometixLine versions |
707
-
708
- #### Common Options
709
-
710
- ```bash
711
- # Specify configuration language
712
- npx zcf --config-lang zh-CN
713
- npx zcf -c zh-CN # Using short option
714
-
715
- # Force overwrite existing configuration
716
- npx zcf --force
717
- npx zcf -f # Using short option
718
-
719
- # Update workflow-related md files with backup (preserve API and MCP configs)
720
- npx zcf u # Using update command
721
- npx zcf update # Full command
722
-
723
- # Show help information
724
- npx zcf --help
725
- npx zcf -h
726
-
727
- # Show version
728
- npx zcf --version
729
- npx zcf -v
730
- ```
731
-
732
- #### Usage Examples
733
-
734
- ```bash
735
- # Show interactive menu (default)
736
- npx zcf
737
-
738
- # First-time installation, complete initialization
739
- npx zcf i
740
- npx zcf init # Full command
741
-
742
- # Update workflow-related md files with backup, keep API and MCP configs
743
- npx zcf u
744
- npx zcf update # Full command
745
-
746
- # Force reinitialize with Chinese config
747
- npx zcf i --config-lang zh-CN --force
748
- npx zcf i -c zh-CN -f # Using short options
749
-
750
- # Update to English prompts (lower token consumption)
751
- npx zcf u --config-lang en
752
- npx zcf u -c en # Using short option
753
-
754
- # Run Claude Code usage analysis tool (powered by ccusage)
755
- npx zcf ccu # Daily usage (default), or use: monthly, session, blocks
756
-
757
- # Codex API provider switching (v3.0.0+ New)
758
- npx zcf config-switch # Interactive provider selection
759
- npx zcf cs # Using alias
760
- npx zcf cs provider-name # Direct switch to specified provider
761
- npx zcf cs --list # List all available providers
762
- ```
763
-
764
- ## 📁 Project Structure
765
-
766
- ```
767
- zcf/
768
- ├── README.md # Documentation
769
- ├── package.json # npm package configuration
770
- ├── bin/
771
- │ └── zcf.mjs # CLI entry point
772
- ├── src/ # Source code
773
- │ ├── cli.ts # CLI main logic
774
- │ ├── commands/ # Command implementations
775
- │ ├── utils/ # Utility functions
776
- │ └── constants.ts # Constant definitions
777
- ├── templates/ # Configuration templates
778
- │ ├── CLAUDE.md # Project level config (v2.0 new)
779
- │ ├── settings.json # Base configuration (with privacy env vars)
780
- │ ├── en/ # English version
781
- │ │ ├── rules.md # Core principles (formerly CLAUDE.md)
782
- │ │ ├── output-styles/ # AI output styles (v2.12+ new)
783
- │ │ ├── mcp.md # MCP services guide (v2.0 new)
784
- │ │ ├── agents/ # AI agents
785
- │ │ └── commands/ # Command definitions
786
- │ └── zh-CN/ # Chinese version
787
- │ └── ... (same structure)
788
- └── dist/ # Build output
789
- ```
790
-
791
- ## ✨ Core Features (v2.0 Enhanced)
792
-
793
- ### 🤖 Professional Agents
794
-
795
- - **Task Planner**: Breaks down complex tasks into executable steps
796
- - **UI/UX Designer**: Provides professional interface design guidance
797
- - **AI Personality**: Support multiple preset personalities and custom (v2.0 new)
798
- - **BMad Team** (New): Complete agile development team including:
799
- - Product Owner (PO): Requirements elicitation and prioritization
800
- - Project Manager (PM): Planning and coordination
801
- - System Architect: Technical design and architecture
802
- - Developer: Implementation and coding
803
- - QA Engineer: Testing and quality assurance
804
- - Scrum Master (SM): Process facilitation
805
- - Business Analyst: Requirements analysis
806
- - UX Expert: User experience design
807
-
808
- ### ⚡ Command System
809
-
810
- - **Feature Development** (`/feat`): Structured new feature development
811
- - **Workflow** (`/workflow`): Complete six-phase development workflow
812
- - **Git Commands**: Streamlined Git operations
813
- - `/git-commit`: Smart commit with automatic staging and message generation
814
- - `/git-rollback`: Safely rollback to previous commits with backup
815
- - `/git-cleanBranches`: Clean up merged branches and maintain repository hygiene
816
- - `/git-worktree`: Manage Git worktrees with IDE integration and content migration
817
- - **BMad Workflow** (`/bmad-init`): Initialize BMad workflow for enterprise development
818
- - Supports both greenfield (new projects) and brownfield (existing projects)
819
- - Provides comprehensive templates for PRDs, architecture docs, and user stories
820
- - Integrated quality gates and checklist system
821
-
822
- ### 🔧 Smart Configuration
823
-
824
- - API key management (supports partial modification)
825
- - Fine-grained permission control
826
- - Multiple Claude model support (configurable default model)
827
- - Interactive menu system (v2.0 new)
828
- - AI memory management (v2.0 new)
829
-
830
- ## 🎯 Development Workflow
831
-
832
- ### Six-Phase Workflow
833
-
834
- 1. [Mode: Research] - Understand requirements
835
- 2. [Mode: Ideate] - Design solutions
836
- 3. [Mode: Plan] - Create detailed plan
837
- 4. [Mode: Execute] - Implement development
838
- 5. [Mode: Optimize] - Improve quality
839
- 6. [Mode: Review] - Final assessment
840
-
841
- ## 🛠️ Development
842
-
843
- ```bash
844
- # Clone the project
845
- git clone https://github.com/UfoMiao/zcf.git
846
- cd zcf
847
-
848
- # Install dependencies (using pnpm)
849
- pnpm install
850
-
851
- # Build project
852
- pnpm build
853
-
854
- # Local testing
855
- node bin/zcf.mjs
856
- ```
857
-
858
- ## 💡 Best Practices
859
-
860
- 1. **Task Breakdown**: Keep tasks independent and testable
861
- 2. **Code Quality**: Follow SOLID, KISS, DRY, and YAGNI principles
862
- 3. **Documentation Management**: The plan will be stored in the `.claude/plan/` directory at the project root
863
-
864
- ## 🔧 Troubleshooting
865
-
866
- If you encounter issues:
867
-
868
- 1. Re-run `npx zcf` to reconfigure
869
- 2. Check configuration files in `~/.claude/` directory
870
- 3. Ensure Claude Code is properly installed
871
- 4. If paths contain spaces, ZCF will automatically handle quote wrapping
872
- 5. Use ripgrep (`rg`) preferentially for file searching for better performance
873
-
874
- ### Cross-Platform Support
875
-
876
- #### Windows Platform
877
-
878
- ZCF fully supports Windows platform:
879
-
880
- - **Auto-detection**: Automatically uses compatible `cmd /c npx` format on Windows systems
881
- - **Config repair**: Existing incorrect configurations are automatically fixed during updates
882
- - **Zero-config**: Windows users don't need any extra steps, same experience as macOS/Linux
883
-
884
- If you encounter MCP connection issues on Windows, running `npx zcf` will automatically fix the configuration format.
885
-
886
- #### WSL Support (v2.12.12+ new)
887
-
888
- ZCF now provides comprehensive support for Windows Subsystem for Linux (WSL):
889
-
890
- - **Smart Detection**: Multi-layered WSL environment detection using environment variables, system files, and mount points
891
- - **Distribution Recognition**: Automatically identifies WSL distribution (Ubuntu, Debian, etc.) for optimized configuration
892
- - **Seamless Installation**: Native Linux-style installation experience within WSL environment
893
- - **Path Management**: Intelligent handling of WSL-specific configuration paths and file locations
894
-
895
- If running in WSL, ZCF will automatically detect the environment and display appropriate installation messages.
896
-
897
- #### Termux Support (v2.1 new)
898
-
899
- ZCF now supports running in Android Termux environment:
900
-
901
- - **Auto-adaptation**: Automatically detects Termux environment and uses compatible configuration
902
- - **Enhanced detection**: Intelligently identifies available commands, ensuring normal operation in restricted environments
903
- - **Full functionality**: Enjoy the same complete features in Termux as on desktop systems
904
-
905
- ### Security Features (v2.3 new)
906
-
907
- #### Dangerous Operation Confirmation Mechanism
65
+ More usage, options, and workflows: see documentation.
908
66
 
909
- To protect user data security, the following operations require explicit confirmation:
67
+ ## 📖 Full Documentation
910
68
 
911
- - **File System**: Delete files/directories, bulk modifications, move system files
912
- - **Code Commits**: `git commit`, `git push`, `git reset --hard`
913
- - **System Config**: Modify environment variables, system settings, permissions
914
- - **Data Operations**: Database deletions, schema changes, bulk updates
915
- - **Network Requests**: Send sensitive data, call production APIs
916
- - **Package Management**: Global install/uninstall, update core dependencies
69
+ - https://zcf.ufomiao.com/
917
70
 
918
71
  ## 🙏 Acknowledgments
919
72
 
920
- This project is inspired by and incorporates the following open source projects:
73
+ This project is inspired by and incorporates work from:
921
74
 
922
- - [LINUX DO - The New Ideal Community](https://linux.do)
75
+ - [LINUX DO - New Ideal Community](https://linux.do)
923
76
  - [CCR](https://github.com/musistudio/claude-code-router)
924
77
  - [CCometixLine](https://github.com/Haleclipse/CCometixLine)
925
78
  - [ccusage](https://github.com/ryoppippi/ccusage)
926
79
  - [BMad Method](https://github.com/bmad-code-org/BMAD-METHOD)
927
80
 
928
- Thanks to these community contributors for sharing!
81
+ Thanks to these community contributors for sharing their amazing projects!
929
82
 
930
- ## ❤️ Support & Sponsorship
83
+ ## ❤️ Support & Sponsors
931
84
 
932
85
  If you find this project helpful, please consider sponsoring its development. Your support is greatly appreciated!
933
86
 
@@ -944,6 +97,7 @@ If you find this project helpful, please consider sponsoring its development. Yo
944
97
 
945
98
  A huge thank you to all our sponsors for their generous support!
946
99
  - [302.AI](https://share.302.ai/gAT9VG) (first corporate sponsorship 🤠)
100
+ - [GLM](https://z.ai/subscribe?ic=8JVLJQFSKB) (first AI model sponsorship 🤖)
947
101
  - [PackyCode](https://www.packyapi.com/register?aff=zcf) (first API proxy service sponsor 🧝🏻‍♀️)
948
102
  - Tc (first sponsor)
949
103
  - Argolinhas (first ko-fi sponsor ٩(•̤̀ᵕ•̤́๑))