Package Exports
- zcf
- zcf/dist/index.mjs
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (zcf) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
ZCF - Zero-Config Claude-Code Flow
Zero-config, one-click setup for Claude Code with bilingual support, intelligent agent system and personalized AI assistant
๐ Quick Start
๐ฏ Recommended: Use Interactive Menu (v2.0 New)
npx zcf # Open interactive menu and choose operations based on your needs
Menu options include:
1
Full initialization (equivalent tozcf i
)2
Import workflows (equivalent tozcf u
)3-7
Configuration management (API/CCR, MCP, Model settings, AI personality, etc.)R
Claude Code Router management (enhanced in v2.8.1)U
ccusage - Claude Code usage analysisL
CCometixLine - High-performance statusline tool with Git integration and real-time usage tracking (v2.9.9+ new)+
Check updates - Check and update Claude Code, CCR and CCometixLine versions (v2.9.9+ enhanced)- More features...
Or, use direct commands:
๐ First time using Claude Code
npx zcf i # Execute full initialization directly: Install Claude Code + Import workflows + Configure API + Set up MCP services
# or
npx zcf โ select 1 # Execute full initialization via menu
๐ Already have Claude Code installed
npx zcf u # Update workflows only: Quick add AI workflows and command system
# or
npx zcf โ select 2 # Execute workflow update via menu
Note:
- Since v2.0,
zcf
opens the interactive menu by default, providing a visual operation interface- You can choose operations through the menu or use commands directly for quick execution
zcf i
= full initialization,zcf u
= update workflows only
๐ฏ BMad Workflow (v2.7 New Feature)
BMad (BMad-Method: Universal AI Agent Framework) is an enterprise-grade workflow system that provides:
- Complete team of specialized AI agents (PO, PM, Architect, Dev, QA, etc.)
- Structured development process with quality gates
- Automatic documentation generation
- Support for both greenfield and brownfield projects
After installation, use /bmad-init
to initialize the BMad workflow in your project.
๐ CCR (Claude Code Router) Support (v2.8+ Enhanced)
CCR is a powerful proxy router that enables:
- Free Model Access: Use free AI models (like Gemini, DeepSeek) through Claude Code interface
- Custom Routing: Route different types of requests to different models based on your rules
- Cost Optimization: Significantly reduce API costs by using appropriate models for different tasks
- Easy Management: Interactive menu for CCR configuration and service control
- Auto Updates: Automatic version checking and updates for CCR and Claude Code (v2.8.1+)
To access CCR features:
npx zcf ccr # Open CCR management menu
# or
npx zcf โ select R
CCR menu options:
- Initialize CCR - Install and configure CCR with preset providers
- Start UI - Launch CCR web interface for advanced configuration
- Service Control - Start/stop/restart CCR service
- Check Status - View current CCR service status
After CCR setup, ZCF automatically configures Claude Code to use CCR as the API proxy.
Important Notice for v2.9.9 Users: If you previously installed CCometixLine using ZCF v2.9.9, please rerun the installation process to ensure that the CCometixLine configuration is correctly added. Run npx zcf
-> Select L
-> Select 1
to add the CCometixLine configuration.
๐ CCometixLine Support (Status Bar Tool) (v2.9.9+ New)
CCometixLine is a high-performance Rust-based statusline tool that provides:
- Real-time Usage Tracking: Monitor Claude Code API usage in real-time
- Git Integration: Display Git status and branch information
- Status Line Display: Native integration with your terminal statusline
- Performance Optimized: Built with Rust for minimal resource usage
- Auto Updates: Included in ZCF's update checking system
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.
๐ Check for updates (v2.8.1+, CCometixLine support v2.9.9+):
npx zcf check-updates # Check and update Claude Code, CCR and CCometixLine to latest versions
# or
npx zcf โ select +
Setup Process
Full initialization (npx zcf
) will automatically:
- โ Detect and install Claude Code
- โ Select AI output language (new feature)
- โ Configure API keys or CCR proxy
- โ Select and configure MCP services
- โ Set up all necessary configuration files
Usage
After configuration:
- For first-time project use, strongly recommend running
/init
to generate CLAUDE.md for better AI understanding of project architecture <task description>
- Execute directly without workflow, following SOLID, KISS, DRY, and YAGNI principles, suitable for small tasks like bug fixes/feat <task description>
- Start new feature development, divided into plan and UI phases/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
PS:
- Both feat and workflow have their advantages, try both to compare
- Generated documents are located by default at
.claude/xxx.md
in project root, you can add.claude/
to your project's.gitignore
โจ ZCF Tool Features
๐ Multi-language Support
- Script interaction language: Controls installation prompts language
- Configuration file language: Determines which configuration set to install (zh-CN/en)
- AI output language: Choose the language for AI responses (supports Chinese, English, and custom languages)
- AI personality: Support multiple preset personalities (Professional, Catgirl, Friendly, Mentor) or custom
๐ง Smart Installation
- Auto-detects Claude Code installation status
- Uses npm for automatic installation (ensures compatibility)
- Cross-platform support (Windows/macOS/Linux/Termux)
- Automatic MCP service configuration
- Smart configuration merging and partial modification support (v2.0 new)
- Enhanced command detection mechanism (v2.1 new)
- Dangerous operation confirmation mechanism (v2.3 new)
๐ฆ Complete Configuration
- CLAUDE.md system instructions
- settings.json configuration file
- commands custom commands
- agents AI agent configurations
๐ API Configuration
- Supports two authentication methods:
- Auth Token: For tokens obtained via OAuth or browser login
- API Key: For API keys from Anthropic Console
- Custom API URL support
- Support for manual configuration later
- Partial modification: Update only needed configuration items (v2.0 new)
๐พ Configuration Management
- Smart backup of existing configurations (all backups saved in ~/.claude/backup/)
- Configuration merge option (v2.0 enhanced: supports deep merge)
- Safe overwrite mechanism
- Automatic backup before MCP configuration changes
- Default model configuration (v2.0 new)
- AI memory management (v2.0 new)
- ZCF cache cleanup (v2.0 new)
๐ Usage Instructions
Interactive Menu (v2.0)
$ npx zcf
ZCF - Zero-Config Claude-Code Flow
? Select ZCF display language / ้ๆฉZCFๆพ็คบ่ฏญ่จ:
โฏ ็ฎไฝไธญๆ
English
Select function:
-------- Claude Code --------
1. Full initialization - Install Claude Code + Import workflow + Configure API or CCR proxy + Configure MCP services
2. Import workflow - Import/update workflow-related files only
3. Configure API - Configure API URL and authentication (supports CCR proxy)
4. Configure MCP - Configure MCP services (includes Windows fix)
5. Configure default model - Set default model (opus/sonnet)
6. Configure Claude global memory - Configure AI output language and personality
7. Import recommended environment variables and permissions - Import privacy protection environment variables and system permissions
--------- Other Tools ----------
R. CCR - Claude Code Router management
U. ccusage - Claude Code usage analysis
L. CCometixLine - High-performance statusline tool with Git integration and real-time usage tracking
------------ ZCF ------------
0. Select display language / ๆดๆนๆพ็คบ่ฏญ่จ - Change ZCF interface language
-. Clear preference cache - Clear preference language and other caches
+. Check updates - Check and update Claude Code, CCR and CCometixLine versions
Q. Exit
Enter your choice: _
Full Initialization Flow (Select 1 or use zcf i
)
? Select Claude Code configuration language:
โฏ ็ฎไฝไธญๆ (zh-CN) - Chinese (easier for Chinese users to customize)
English (en) - English (recommended, lower token consumption)
? Select AI output language:
AI will respond to you in this language
โฏ ็ฎไฝไธญๆ
English
Custom
(Supports Japanese, French, German, and more)
? Select AI personality:
โฏ Professional Assistant(Default)
Catgirl Assistant
Friendly Assistant
Mentor Mode
Custom
? Claude Code not found. Install automatically? (Y/n)
โ Claude Code installed successfully
? Select API authentication method
โฏ Use Auth Token (OAuth authentication)
For tokens obtained via OAuth or browser login
Use API Key (Key authentication)
For API keys from Anthropic Console
Configure CCR Proxy (Claude Code Router)
Use free models and custom routing to reduce costs and explore the possibilities of Claude Code
Skip (configure manually later)
? Enter API URL: https://api.anthropic.com
? Enter Auth Token or API Key: xxx
? Existing config detected. How to proceed?
โฏ Backup and overwrite all
Update workflow-related md files only with backup
Merge config
Skip
โ All config files backed up to ~/.claude/backup/xxx
โ Config files copied to ~/.claude
? Select workflows to install (space to select, enter to confirm)
โฏ โ Six Steps Workflow (workflow) - Complete 6-phase development process
โ Feature Planning and UX Design (feat + planner + ui-ux-designer) - Structured feature development
โ Git Commands (commit + rollback + cleanBranches + worktree) - Streamlined Git operations
โ BMAD-Method Extension Installer - Enterprise agile development workflow
โ Installing workflows...
โ Installed command: zcf/workflow.md
โ Installed command: zcf/feat.md
โ Installed agent: zcf/plan/planner.md
โ Installed agent: zcf/plan/ui-ux-designer.md
โ Installed command: zcf/git/git-commit.md
โ Installed command: zcf/git/git-rollback.md
โ Installed command: zcf/git/git-cleanBranches.md
โ Installed command: zcf/git/git-worktree.md
โ Installed command: zcf/bmad-init.md
โ Workflow installation successful
โ API configured
? Configure MCP services? (Y/n)
? Select MCP services to install (space to select, enter to confirm)
โฏ โฏ Install all
โฏ Context7 Documentation Query - Query latest library docs and code examples
โฏ DeepWiki - Query GitHub repository docs and examples
โฏ Playwright Browser Control - Direct browser automation control
โฏ Exa AI Search - Web search using Exa AI
? Enter Exa API Key (get from https://dashboard.exa.ai/api-keys)
โ MCP services configured
๐ Setup complete! Use 'claude' command to start.
Command Line Options
Commands Quick Reference
Command | Alias | Description |
---|---|---|
zcf |
- | Show interactive menu (v2.0 default command) |
zcf init |
zcf i |
Initialize Claude Code configuration |
zcf update |
zcf u |
Update workflow-related md files with backup |
zcf ccu |
- | Run Claude Code usage analysis tool - ccusage |
zcf ccr |
- | Open CCR (Claude Code Router) management menu |
Common Options
# Specify configuration language
npx zcf --config-lang zh-CN
npx zcf -c zh-CN # Using short option
# Force overwrite existing configuration
npx zcf --force
npx zcf -f # Using short option
# Update workflow-related md files with backup (preserve API and MCP configs)
npx zcf u # Using update command
npx zcf update # Full command
# Show help information
npx zcf --help
npx zcf -h
# Show version
npx zcf --version
npx zcf -v
Usage Examples
# Show interactive menu (default)
npx zcf
# First-time installation, complete initialization
npx zcf i
npx zcf init # Full command
# Update workflow-related md files with backup, keep API and MCP configs
npx zcf u
npx zcf update # Full command
# Force reinitialize with Chinese config
npx zcf i --config-lang zh-CN --force
npx zcf i -c zh-CN -f # Using short options
# Update to English prompts (lower token consumption)
npx zcf u --config-lang en
npx zcf u -c en # Using short option
# Run Claude Code usage analysis tool (powered by ccusage)
npx zcf ccu # Daily usage (default), or use: monthly, session, blocks
๐ Project Structure
zcf/
โโโ README.md # Documentation
โโโ package.json # npm package configuration
โโโ bin/
โ โโโ zcf.mjs # CLI entry point
โโโ src/ # Source code
โ โโโ cli.ts # CLI main logic
โ โโโ commands/ # Command implementations
โ โโโ utils/ # Utility functions
โ โโโ constants.ts # Constant definitions
โโโ templates/ # Configuration templates
โ โโโ CLAUDE.md # Project level config (v2.0 new)
โ โโโ settings.json # Base configuration (with privacy env vars)
โ โโโ en/ # English version
โ โ โโโ rules.md # Core principles (formerly CLAUDE.md)
โ โ โโโ personality.md # AI personality (v2.0 new)
โ โ โโโ mcp.md # MCP services guide (v2.0 new)
โ โ โโโ agents/ # AI agents
โ โ โโโ commands/ # Command definitions
โ โโโ zh-CN/ # Chinese version
โ โโโ ... (same structure)
โโโ dist/ # Build output
โจ Core Features (v2.0 Enhanced)
๐ค Professional Agents
- Task Planner: Breaks down complex tasks into executable steps
- UI/UX Designer: Provides professional interface design guidance
- AI Personality: Support multiple preset personalities and custom (v2.0 new)
- BMad Team (New): Complete agile development team including:
- Product Owner (PO): Requirements elicitation and prioritization
- Project Manager (PM): Planning and coordination
- System Architect: Technical design and architecture
- Developer: Implementation and coding
- QA Engineer: Testing and quality assurance
- Scrum Master (SM): Process facilitation
- Business Analyst: Requirements analysis
- UX Expert: User experience design
โก Command System
- Feature Development (
/feat
): Structured new feature development - Workflow (
/workflow
): Complete six-phase development workflow - Git Commands: Streamlined Git operations
/git-commit
: Smart commit with automatic staging and message generation/git-rollback
: Safely rollback to previous commits with backup/git-cleanBranches
: Clean up merged branches and maintain repository hygiene/git-worktree
: Manage Git worktrees with IDE integration and content migration
- BMad Workflow (
/bmad-init
): Initialize BMad workflow for enterprise development- Supports both greenfield (new projects) and brownfield (existing projects)
- Provides comprehensive templates for PRDs, architecture docs, and user stories
- Integrated quality gates and checklist system
๐ง Smart Configuration
- API key management (supports partial modification)
- Fine-grained permission control
- Multiple Claude model support (configurable default model)
- Interactive menu system (v2.0 new)
- AI memory management (v2.0 new)
๐ฏ Development Workflow
Six-Phase Workflow
- [Mode: Research] - Understand requirements
- [Mode: Ideate] - Design solutions
- [Mode: Plan] - Create detailed plan
- [Mode: Execute] - Implement development
- [Mode: Optimize] - Improve quality
- [Mode: Review] - Final assessment
๐ ๏ธ Development
# Clone the project
git clone https://github.com/UfoMiao/zcf.git
cd zcf
# Install dependencies (using pnpm)
pnpm install
# Build project
pnpm build
# Local testing
node bin/zcf.mjs
๐ก Best Practices
- Task Breakdown: Keep tasks independent and testable
- Code Quality: Follow SOLID, KISS, DRY, and YAGNI principles
- Documentation Management: The plan will be stored in the
.claude/plan/
directory at the project root
๐ง Troubleshooting
If you encounter issues:
- Re-run
npx zcf
to reconfigure - Check configuration files in
~/.claude/
directory - Ensure Claude Code is properly installed
- If paths contain spaces, ZCF will automatically handle quote wrapping
- Use ripgrep (
rg
) preferentially for file searching for better performance
Cross-Platform Support
Windows Platform
ZCF fully supports Windows platform:
- Auto-detection: Automatically uses compatible
cmd /c npx
format on Windows systems - Config repair: Existing incorrect configurations are automatically fixed during updates
- Zero-config: Windows users don't need any extra steps, same experience as macOS/Linux
If you encounter MCP connection issues on Windows, running npx zcf
will automatically fix the configuration format.
Termux Support (v2.1 new)
ZCF now supports running in Android Termux environment:
- Auto-adaptation: Automatically detects Termux environment and uses compatible configuration
- Enhanced detection: Intelligently identifies available commands, ensuring normal operation in restricted environments
- Full functionality: Enjoy the same complete features in Termux as on desktop systems
Security Features (v2.3 new)
Dangerous Operation Confirmation Mechanism
To protect user data security, the following operations require explicit confirmation:
- File System: Delete files/directories, bulk modifications, move system files
- Code Commits:
git commit
,git push
,git reset --hard
- System Config: Modify environment variables, system settings, permissions
- Data Operations: Database deletions, schema changes, bulk updates
- Network Requests: Send sensitive data, call production APIs
- Package Management: Global install/uninstall, update core dependencies
๐ Acknowledgments
This project is inspired by and incorporates the following open source projects:
Thanks to these community contributors for sharing!
โค๏ธ Support & Sponsorship
If you find this project helpful, please consider sponsoring its development. Your support is greatly appreciated!
![]() |
![]() |
Our Sponsors
A huge thank you to all our sponsors for their generous support!
- Tc (first sponsor)
- 16ยฐC ๅๅก (My best friend๐คช, offered Claude Code max $200 package)
๐ License
MIT License
If this project helps you, please give me a โญ๏ธ Star!