gw-config-management

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

gw Configuration Management

gw 配置管理

Configure gw-tools for optimal workflows across different project types and team environments.
针对不同项目类型和团队环境,配置gw-tools以实现最优工作流。

Rules

规则

RuleDescription
fundamentalsHIGH - Config file location, creation, and precedence
options-referenceHIGH - Complete reference for all config options
setupHIGH - Initial setup flow, secrets, team onboarding
auto-copyHIGH - File patterns to copy, what to include/exclude
team-configMEDIUM - Sharing config, documentation, onboarding
advancedLOW - Multiple sources, secret management integration
troubleshootingHIGH - Common issues and solutions
规则描述
fundamentals高优先级 - 配置文件的位置、创建及优先级规则
options-reference高优先级 - 所有配置选项的完整参考文档
setup高优先级 - 初始设置流程、密钥管理、团队入职引导
auto-copy高优先级 - 需复制的文件规则、包含/排除项配置
team-config中优先级 - 配置共享、文档编写、团队入职引导
advanced低优先级 - 多源配置、密钥管理集成
troubleshooting高优先级 - 常见问题及解决方案

Project-Type Patterns

项目类型配置模板

PatternDescription
nextjsMEDIUM - Next.js with Vercel deployment
nodejs-apiMEDIUM - Node.js backend/API services
monorepoMEDIUM - pnpm/Yarn/npm workspaces
react-spaMEDIUM - React Single Page Applications
模板描述
nextjs中优先级 - 适配Vercel部署的Next.js配置
nodejs-api中优先级 - Node.js后端/API服务配置
monorepo中优先级 - pnpm/Yarn/npm工作区配置
react-spa中优先级 - React单页应用配置

Quick Reference

快速参考

TaskCommand
Initialize config
gw init
Initialize with options
gw init --auto-copy-files .env,secrets/
Interactive setup
gw init --interactive
Clone and initialize
gw init git@github.com:user/repo.git
Sync files to worktree
gw sync feature-branch
Show setup command
gw show-init
任务命令
初始化配置
gw init
带参数初始化
gw init --auto-copy-files .env,secrets/
交互式设置
gw init --interactive
克隆并初始化
gw init git@github.com:user/repo.git
同步文件到工作区
gw sync feature-branch
查看设置命令
gw show-init

Configuration Options

配置选项

OptionPurposeDefault
root
Repository root pathAuto-detected
defaultBranch
Source for file copying
"main"
autoCopyFiles
Files to auto-copy
[]
updateStrategy
merge or rebase
"merge"
cleanThreshold
Days before stale
7
autoClean
Prompt for cleanup
false
选项用途默认值
root
仓库根目录路径自动检测
defaultBranch
文件复制的源分支
"main"
autoCopyFiles
自动复制的文件列表
[]
updateStrategy
合并或变基策略
"merge"
cleanThreshold
过期文件清理阈值(天数)
7
autoClean
是否提示清理过期文件
false

Key Principles

核心原则

  • Set up secrets in defaultBranch first: Source must exist before auto-copy works.
  • Commit config to version control: Team gets it automatically.
  • Copy secrets, not dependencies:
    .env
    yes,
    node_modules
    no.
  • Use
    gw show-init
    for documentation
    : Generate setup command.
  • 先在defaultBranch中配置密钥:自动复制功能生效前,源文件必须已存在。
  • 将配置提交到版本控制:团队成员可自动获取最新配置。
  • 复制密钥文件,而非依赖包:允许复制
    .env
    ,禁止复制
    node_modules
  • 使用
    gw show-init
    生成文档
    :自动生成项目设置命令。

Related Skills

相关技能

  • git-worktree-workflows - Using worktrees effectively
  • autonomous-workflow - Autonomous development workflows
  • git-worktree-workflows - 高效使用工作区
  • autonomous-workflow - 自主开发工作流

Resources

资源

  • Project-Type Guides - Configuration guides for common project types
  • Next.js Setup Example
  • Monorepo Setup Example
  • Troubleshooting Guide
  • 项目类型指南 - 常见项目类型的配置指南
  • Next.js 配置示例
  • 单体仓库配置示例
  • 配置排查指南