The in-repo library
The library is a directory of overlays inside a repository. Its default location is .repoverlay/library/. Unlike applied overlay files, library overlays are tracked by git. Commit them so everyone who clones the repository gets them.
Use the library when:
- Your team wants optional configuration, such as editor settings or AI configuration, in the repository instead of a separate overlay repository.
- You want overlays that extend or include other overlays. Only library overlays support this.
Applying library overlays
Section titled “Applying library overlays”Use the overlay name alone to apply a library overlay. repoverlay checks the library before configured sources:
repoverlay apply my-overlayIf .repoverlay/library/my-overlay/ exists, repoverlay applies it.
Adding overlays to the library
Section titled “Adding overlays to the library”Create a new overlay directly in the library:
# Create into the library and apply itrepoverlay create my-overlay --into library
# Create into the library without applyingrepoverlay create my-overlay --into library --no-applyTo import an existing overlay, specify a path, GitHub URL, org/repo/name reference, or applied overlay name:
repoverlay library import ./path/to/overlayrepoverlay library import org/repo/overlay-name --name shared-configOr move an applied overlay's source into the library:
repoverlay move my-overlay --to libraryIf .gitignore excludes the library path, repoverlay adds a negation pattern such as !.repoverlay/library/. This lets git track the library.
Listing, exporting, and removing
Section titled “Listing, exporting, and removing”# List overlays in the libraryrepoverlay library list
# Copy a library overlay out to a directoryrepoverlay library export my-overlay --to ../shared-overlays/my-overlay
# Delete a library overlay (--force if it's currently applied)repoverlay library remove my-overlayCustom library location
Section titled “Custom library location”Set library_path in the repository configuration (.repoverlay/config.ccl) to change the library location. The path must be relative to the repository root:
library_path = tools/overlays