vibe-coding
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseVibe Coding
Vibe 编码
Use the shared CLI instead of repo-specific scripts.
vibe使用共享的 CLI替代仓库专属脚本。
vibeInstall
安装
From the skill directory:
bash
npm linkOr call directly: .
node scripts/vibe.js <command>在技能目录下执行:
bash
npm link或者直接调用:。
node scripts/vibe.js <command>Workflow
工作流
- Run inside the repo.
vibe setup --committer-name "..." --committer-email "..." - Define repo preview defaults with .
vibe repo init --preview-cmd ... --preview-port ... - Create a task worktree with .
vibe worktree create <branch> --author-name ... --author-email ... - Work inside the worktree.
- Commit with , never plain
vibe commit ....git commit - Launch previews with .
vibe preview start
- 在仓库内运行。
vibe setup --committer-name "..." --committer-email "..." - 使用定义仓库预览默认配置。
vibe repo init --preview-cmd ... --preview-port ... - 执行创建任务工作树。
vibe worktree create <branch> --author-name ... --author-email ... - 在工作树内开展工作。
- 使用提交代码,绝对不要使用普通的
vibe commit ...。git commit - 执行启动预览。
vibe preview start
Commands
命令
vibe setup Configure repo for vibe coding
--committer-name <name> Bot/agent name (required on first setup)
--committer-email <email> Bot/agent email (required on first setup)
--worktrees-root <path> Base dir for worktrees (default: /root/projects/.worktrees)
--preview-base-domain <domain> Base domain (default: ondomain.dev)
vibe repo init Set preview defaults in .vibe.json
--preview-cmd <command> App start command (required)
--preview-port <port> App port (required)
--preview-base-domain <domain> Base domain (default: ondomain.dev)
vibe worktree create <name> Create a new worktree
--author-name <name> Git author name (required)
--author-email <email> Git author email (required)
--base <branch> Base branch (default: main)
vibe commit [git-commit-args...] Commit with enforced author/committer
vibe preview start Start app + ngrok preview
--port <port> Override preview port
--cmd <command> Override preview command
--base-domain <domain> Override base domain
vibe hook pre-commit Pre-commit hook (installed by setup)vibe setup 为Vibe编码配置仓库
--committer-name <name> 机器人/Agent名称(首次设置时必填)
--committer-email <email> 机器人/Agent邮箱(首次设置时必填)
--worktrees-root <path> 工作树的基础目录(默认值:/root/projects/.worktrees)
--preview-base-domain <domain> 基础域名(默认值:ondomain.dev)
vibe repo init 在.vibe.json中设置预览默认值
--preview-cmd <command> 应用启动命令(必填)
--preview-port <port> 应用端口(必填)
--preview-base-domain <domain> 基础域名(默认值:ondomain.dev)
vibe worktree create <name> 创建新的工作树
--author-name <name> Git作者名称(必填)
--author-email <email> Git作者邮箱(必填)
--base <branch> 基础分支(默认值:main)
vibe commit [git-commit-args...] 以强制的作者/提交者身份提交代码
vibe preview start 启动应用 + ngrok预览
--port <port> 覆盖预览端口
--cmd <command> 覆盖启动命令
--base-domain <domain> 覆盖基础域名
vibe hook pre-commit 提交前钩子(由setup命令安装)Contract
约定
- Committer is the bot/agent doing the work — set its name and email during .
vibe setup - Author is the human who directed the work — set per worktree via .
vibe worktree create - Worktree metadata lives in git worktree config: and
vibe.worktreeName.vibe.previewSlug - Repos declare preview defaults in .
.vibe.json - Preview URL is always .
https://<preview-slug>.<base-domain>
- 提交者是执行工作的机器人/Agent —— 在期间设置其名称和邮箱。
vibe setup - 作者是指导工作的人员 —— 通过为每个工作树单独设置。
vibe worktree create - 工作树元数据存储在git工作树配置中:和
vibe.worktreeName。vibe.previewSlug - 仓库在中声明预览默认配置。
.vibe.json - 预览URL始终为。
https://<preview-slug>.<base-domain>
Configuration
配置
Git config keys (set via ):
git config| Key | Scope | Default | Description |
|---|---|---|---|
| repo | — (required) | Bot/agent name |
| repo | — (required) | Bot/agent email |
| repo | | Base directory for worktrees |
| repo | | Default preview domain |
| worktree | branch name | Worktree display name |
| worktree | — | Author name for commits |
| worktree | — | Author email for commits |
| worktree | slugified name | Subdomain for preview URL |
Git配置项(通过设置):
git config| 配置项 | 作用域 | 默认值 | 描述 |
|---|---|---|---|
| 仓库 | —(必填) | 机器人/Agent名称 |
| 仓库 | —(必填) | 机器人/Agent邮箱 |
| 仓库 | | 工作树的基础目录 |
| 仓库 | | 默认预览域名 |
| 工作树 | 分支名称 | 工作树显示名称 |
| 工作树 | — | 提交的作者名称 |
| 工作树 | — | 提交的作者邮箱 |
| 工作树 | 别名化的名称 | 预览URL的子域名 |
Repo Manifest
仓库清单
Create a tracked file with preview defaults:
.vibe.jsonjson
{
"preview": {
"command": "cd feed && bun run server.ts",
"port": 4000,
"baseDomain": "ondomain.dev"
}
}Only put repo-specific behavior in the manifest. Keep the author/committer and worktree policy in the shared CLI.
创建一个被追踪的文件,配置预览默认值:
.vibe.jsonjson
{
"preview": {
"command": "cd feed && bun run server.ts",
"port": 4000,
"baseDomain": "ondomain.dev"
}
}仅将仓库专属行为放入清单中。将作者/提交者和工作树策略保留在共享CLI中。
Resources
资源
- — shared cross-repo CLI
scripts/vibe.js
- —— 跨仓库共享CLI
scripts/vibe.js