Skip to main content

Monorepo Path Filter

v1.0.3

Generate path filter configurations for monorepo CI pipelines.

Generates path filter configurations for monorepo CI pipelines — maps package directories to affected job conditions for GitHub Actions (paths:), GitLab CI (changes:), and Nx affected.

How to use
  • List your monorepo packages and their directory paths.
  • Select the CI platform and the tool generates the correct changed-files filter syntax.
  • Copy the filter block into your CI workflow to run only affected package jobs.

Path inside the monorepo to extract

Extraction commands
# Requires git-filter-repo: pip install git-filter-repo

# 1. Clone the monorepo
git clone <monorepo-url> my-lib
cd my-lib

# 2. Filter to keep only the target path
git filter-repo --path packages/my-lib --path-rename packages/my-lib/:

# 3. Push to the new standalone remote
git remote add origin git@github.com:org/my-lib.git
git push origin main --force