vis affected
Run tasks only on projects affected by recent git changes
vis affected
Detect which projects are affected by recent git changes and run a target only on those projects. Uses git diff to find changed files, maps them to projects, and includes transitively dependent projects.
Usage
vis affected <target> [options]Examples
vis affected build
vis affected test --base=main
vis affected lint --base=HEAD~5 --head=HEADOptions
| Option | Default | Description |
|---|---|---|
--base | HEAD~1 | Git base ref for comparison |
--head | HEAD | Git head ref for comparison |
--parallel | 3 | Maximum number of parallel tasks |
--cache | true | Enable caching (--no-cache to disable) |
--dry-run | false | Show what would run without executing |
How It Works
- Diff — Runs
git diffbetween--baseand--headto find changed files - Map — Maps changed files to the projects that contain them
- Expand — Includes any projects that depend on the changed projects (transitively)
- Execute — Runs the target on affected projects only, in dependency order
Use Cases
CI Pipelines
Only test what changed in a pull request:
vis affected test --base=origin/mainLocal Development
Run tests for recent changes:
vis affected test --base=HEAD~3