Skip to content

.vibe.toml

The .vibe.toml file contains shared configuration that is typically committed to git and shared with your team.

Copy individual files from the origin repository to the worktree:

[copy]
files = [".env", "config.json"]

The files array supports glob patterns for flexible file selection:

[copy]
files = [
"*.env", # All .env files in root
"**/*.json", # All JSON files recursively
"config/*.txt", # All .txt files in config/
".env.production" # Exact paths still work
]

Supported patterns:

PatternDescription
*Matches any characters except /
**Matches any characters including / (recursive)
?Matches any single character
[abc]Matches any character in brackets

Copy entire directories recursively:

[copy]
dirs = [
"node_modules", # Exact directory path
".cache", # Hidden directories
"packages/*" # Glob pattern for multiple directories
]

Copy Performance Optimization v0.4.0+

Section titled “Copy Performance Optimization ”

vibe automatically selects the best copy strategy based on your system:

StrategyWhen UsedPlatform
Clone (CoW)Directory copy on APFSmacOS
Clone (reflink)Directory copy on Btrfs/XFSLinux
rsyncDirectory copy when clone unavailablemacOS/Linux
StandardFile copy, or fallbackAll

How it works:

  • File copy: Always uses Deno’s native copyFile() for best single-file performance
  • Directory copy: Automatically uses the fastest available method

Benefits:

  • Copy-on-Write is extremely fast as it only copies metadata, not actual data
  • No configuration needed - the best strategy is auto-detected
  • Automatic fallback ensures copying always works

See Hooks for details on configuring pre/post hooks.

[copy]
files = [
".env",
".env.local",
"**/*.secret"
]
dirs = [
"node_modules",
".cache",
"vendor"
]
[hooks]
pre_start = ["echo 'Preparing worktree...'"]
post_start = [
"pnpm install",
"pnpm db:migrate",
"pnpm build"
]
pre_clean = ["git stash"]
post_clean = ["echo 'Cleanup complete'"]