@@ -32,6 +32,51 @@ Install the command-line tool globally:
3232dotnet tool install --global Incrementalist.Cmd
3333```
3434
35+ Or install locally in your project:
36+
37+ ``` shell
38+ # From your repository root
39+ dotnet new tool-manifest # if you haven't already created a .config/dotnet-tools.json
40+ dotnet tool install Incrementalist.Cmd
41+ ```
42+
43+ ### Running as a Global Tool
44+
45+ When installed globally, run commands directly using the ` incrementalist ` command:
46+
47+ ``` shell
48+ # Get list of affected projects
49+ incrementalist -b dev -f ./affected-projects.txt
50+
51+ # Run tests for affected projects
52+ incrementalist -b dev -r -- test -c Release --no-build --nologo
53+ ```
54+
55+ ### Running as a Local Tool
56+
57+ When using Incrementalist as a local tool, you need to use ` dotnet tool run ` with an additional ` -- ` before the Incrementalist commands:
58+
59+ ``` shell
60+ # Get list of affected projects
61+ dotnet tool run incrementalist -- -b dev -f ./affected-projects.txt
62+
63+ # Build affected projects
64+ dotnet tool run incrementalist -- -b dev -r -- build -c Release --nologo
65+
66+ # Run tests with coverage
67+ dotnet tool run incrementalist -- -b dev -r -- test -c Release --no-build --logger:trx --collect:" XPlat Code Coverage" --results-directory ./testresults
68+
69+ # Run in parallel mode
70+ dotnet tool run incrementalist -- -b dev -r --parallel -- build -c Release --nologo
71+
72+ # Save affected projects AND run commands
73+ dotnet tool run incrementalist -- -b dev -f ./affected-projects.txt -r -- build -c Release --nologo
74+ ```
75+
76+ Note the command structure when using as a local tool:
77+ - First ` -- ` after ` dotnet tool run incrementalist ` is for Incrementalist options
78+ - Second ` -- ` (if using ` -r ` ) is for the dotnet command to run on affected projects
79+
3580## 🚀 Quick Start Examples
3681
3782``` shell
0 commit comments