Anthropic 推出的 Claude Composer 展示了新的 AI 辅助代码编写交互模式,引发社区广泛讨论。
这意味着我将不再使用它。如果各位想 fork、继续使用、接手或进行其他能让他们快乐的活动,我祝大家好运。展望未来,我使用以下方案替代:
使用 Hooks 实现 YOLO 模式:
https://github.com/possibilities/claude-code-generic-hooks
使用权限模式启动 Plan Mode:
https://docs.anthropic.com/en/docs/claude-code/iam#permission-modes
使用 Dirty-Confirm 获得与 Claude Composer 相同的确认机制(处理非 Git 和 Dirty Git 目录):
https://github.com/possibilities/dirty-confirm
# Install
npm install -g claude-composer
# Initialize configuration
claude-composer cc-init
# Run with default settings
claude-composer
# Use YOLO mode (accept all prompts)
claude-composer --yolo
Node.js 18+、npm/yarn/pnpm、Claude Code 已安装
# Global install
pnpm add -g claude-composer
# or
yarn global add claude-composer
# or
npm install -g claude-composer
# Configuration
--yolo # Accept all prompts automatically
--toolset <name...> # Use specified toolsets
--mode <mode> # Start in 'act' or 'plan' mode
--ignore-global-config # Ignore global config
# Safety
--dangerously-allow-in-dirty-directory
--dangerously-allow-without-version-control
--dangerously-suppress-yolo-confirmation
# Notifications
--show-notifications / --no-show-notifications
--sticky-notifications / --no-sticky-notifications
# Debug
--quiet # Suppress preflight messages
--allow-buffer-snapshots # Enable Ctrl+Shift+S snapshots
--log-all-pattern-matches # Log to ~/.claude-composer/logs/
所有无法识别的选项会直接传递给 Claude Code。
完整参考见 docs/cli-reference.md。
运行 claude-composer cc-init 创建配置:
# Global config (default)
claude-composer cc-init
# Project-specific config
claude-composer cc-init --project
# config.yaml
yolo: false # Set to true to accept all prompts
toolsets:
- internal:core
- my-tools
roots:
- ~/projects/work
- ~/projects/personal
show_notifications: true
sticky_notifications: false
详见 docs/configuration.md。
使用 --yolo 标志或配置中 yolo: true 启用时,Claude Composer 会自动接受所有提示而无需确认。谨慎使用!
配置 Claude 可以使用的工具和 MCP 服务器连接。
详见 docs/toolsets.md。
使用可信根目录定义可信的父目录,自动接受初始信任提示。
详见 docs/roots-config.md。
详见 docs/environment-variables.md。
本项目置于公共领域。详见 UNLICENSE 文件。