repoverlay
Overlay config files into git repositories without committing them.
repoverlay creates symlinks (or copies) of configuration files from an overlay source into your git repository, automatically excluding them from version control. This lets you maintain personal configuration (editor settings, environment files, local scripts) that stays out of the project history.
Installation
Homebrew (macOS/Linux)
Shell installer (macOS/Linux)
|
PowerShell installer (Windows)
irm https://github.com/tylerbutler/repoverlay/releases/latest/download/repoverlay-installer.ps1 | iex
Cargo
From source
Quick Start
# Apply a local overlay directory
# Apply from a GitHub repository
# Apply from a subdirectory of a GitHub repo
# Check status
# Remove an overlay
# Create an overlay from files in current repo
# Switch to a different overlay (removes existing, applies new)
Usage
Apply an overlay
# From local directory
# From GitHub (uses default branch)
# From GitHub with specific branch/tag
# From a subdirectory within a repo
# Apply to a specific target directory
# Use copy mode instead of symlinks
# Give the overlay a custom name
Remove overlays
# Interactive removal (lists applied overlays)
# Remove a specific overlay by name
# Remove all overlays
Check status
# Show all applied overlays
# Show a specific overlay
Update GitHub overlays
# Check for and apply updates to all GitHub overlays
# Check without applying
# Update a specific overlay
Restore after git clean
If you run git clean -fdx and lose your overlay files, restore them:
# Preview what would be restored
Create overlays from existing repos
Extract files from an existing repository to create a new overlay:
# Create an overlay with specific files
# Preview what would be created
# Specify a custom overlay name
Switch overlays
Replace all existing overlays with a new one (useful for switching between AI agent configurations):
# Switch to a different overlay (removes all existing, applies new)
# Switch to a GitHub-hosted overlay
# Switch with custom name
Manage cache
GitHub repositories are cached locally to avoid repeated downloads:
# List cached repositories
# Show cache location
# Clear entire cache
# Remove a specific cached repo
Overlay Configuration
Create a repoverlay.toml in your overlay directory to configure it:
[]
= "my-config"
= "Personal development configuration"
[]
# Rename files when applying
= ".envrc"
= ".vscode/settings.json"
Without a config file, all files in the overlay directory are symlinked with the same relative path.
How It Works
-
Symlinks (default): Files are symlinked from the overlay source to the target repository. Changes to the source are immediately reflected.
-
Copies (
--copy): Files are copied instead. Useful when the source might move or on systems without symlink support. -
Git exclusion: Applied files are automatically added to
.git/info/exclude, keeping them out of version control without modifying.gitignore. -
State tracking: Overlay state is stored in
.repoverlay/within the repository and backed up externally for recovery.
Multiple Overlays
You can apply multiple overlays to the same repository:
Each overlay's files must be unique - conflicts between overlays or with existing files will be rejected.
License
MIT