{"id":19931788,"url":"https://github.com/petabridge/incrementalist","last_synced_at":"2025-04-12T19:47:26.148Z","repository":{"id":34289758,"uuid":"174412838","full_name":"petabridge/Incrementalist","owner":"petabridge","description":"Git-based incremental build and testing platform for .NET and .NET Core.","archived":false,"fork":false,"pushed_at":"2025-04-10T12:27:05.000Z","size":457,"stargazers_count":74,"open_issues_count":11,"forks_count":5,"subscribers_count":6,"default_branch":"dev","last_synced_at":"2025-04-11T18:07:22.814Z","etag":null,"topics":["build-tools","dotnet","dotnet-cli","incrementalist","msbuild"],"latest_commit_sha":null,"homepage":"","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/petabridge.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-03-07T20:09:57.000Z","updated_at":"2025-04-10T13:12:26.000Z","dependencies_parsed_at":"2023-11-22T17:32:19.253Z","dependency_job_id":"f78c4b41-6c4d-4185-ac5a-c93b6d250527","html_url":"https://github.com/petabridge/Incrementalist","commit_stats":{"total_commits":165,"total_committers":6,"mean_commits":27.5,"dds":0.406060606060606,"last_synced_commit":"0681f63924daca98c0c8a4a44d956e06ccc17737"},"previous_names":[],"tags_count":23,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/petabridge%2FIncrementalist","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/petabridge%2FIncrementalist/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/petabridge%2FIncrementalist/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/petabridge%2FIncrementalist/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/petabridge","download_url":"https://codeload.github.com/petabridge/Incrementalist/tar.gz/refs/heads/dev","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248625497,"owners_count":21135513,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["build-tools","dotnet","dotnet-cli","incrementalist","msbuild"],"created_at":"2024-11-12T23:08:04.320Z","updated_at":"2025-04-12T19:47:26.142Z","avatar_url":"https://github.com/petabridge.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 🔄 Incrementalist\n\n\u003cimg src=\"https://raw.githubusercontent.com/petabridge/Incrementalist/refs/heads/dev/docs/incrementalist-logo-dark.svg\" width=\"90\" alt=\"Incrementalist Logo\" /\u003e\n\nIncrementalist is a .NET tool that leverages [libgit2sharp](https://github.com/libgit2/libgit2sharp/) and [Roslyn](https://docs.microsoft.com/en-us/dotnet/csharp/roslyn-sdk/) to compute incremental build steps for large .NET solutions. It helps optimize your CI/CD pipeline by building and testing only the projects affected by your changes.\n\n## 🎯 When to Use Incrementalist\n\nIncrementalist is particularly valuable for:\n\n- 🏗️ **Large Solutions**: If your solution contains dozens or hundreds of projects, Incrementalist can significantly reduce build times by only building what's necessary.\n- 📦 **Monorepos**: When managing multiple applications or services in a single repository, Incrementalist helps identify and build only the affected components.\n- 🌐 **Microservice Architectures**: In repositories containing multiple microservices, build only the services impacted by your changes.\n- 🔗 **Complex Dependencies**: When projects have intricate dependencies, Incrementalist automatically determines the complete build graph.\n- ⚡ **CI/CD Optimization**: Reduce CI/CD pipeline execution time by skipping unnecessary builds and tests.\n\n## ⚙️ Requirements\n\n- .NET 8.0 SDK or later\n- Git installed and available in the system PATH\n\n## 📥 Installation\n\nIncrementalist is available in two forms:\n\n1. [Incrementalist Library](https://www.nuget.org/packages/Incrementalist/) - a .NET 8 library for programmatic use\n2. [Incrementalist.Cmd](https://www.nuget.org/packages/Incrementalist.Cmd/) - a `dotnet tool` for command-line use (recommended)\n\nInstall the command-line tool globally:\n\n```shell\ndotnet tool install --global Incrementalist.Cmd\n```\n\nOr install locally in your project:\n\n```shell\n# From your repository root\ndotnet new tool-manifest # if you haven't already created a .config/dotnet-tools.json\ndotnet tool install Incrementalist.Cmd\n```\n\n### Running as a Global Tool\n\nWhen installed globally, run commands directly using the `incrementalist` command:\n\n```shell\n# Get list of affected projects\nincrementalist -b dev -f ./affected-projects.txt\n\n# Run tests for affected projects\nincrementalist -b dev -r -- test -c Release --no-build --nologo\n```\n\n### Running as a Local Tool\n\nWhen using Incrementalist as a local tool, you need to use `dotnet tool run` with an additional `--` before the Incrementalist commands:\n\n```shell\n# Get list of affected projects\ndotnet tool run incrementalist -- -b dev -f ./affected-projects.txt\n\n# Build affected projects\ndotnet tool run incrementalist -- -b dev -r -- build -c Release --nologo\n\n# Run tests with coverage\ndotnet tool run incrementalist -- -b dev -r -- test -c Release --no-build --logger:trx --collect:\"XPlat Code Coverage\" --results-directory ./testresults\n\n# Run in parallel mode\ndotnet tool run incrementalist -- -b dev -r --parallel -- build -c Release --nologo\n\n# Save affected projects AND run commands\ndotnet tool run incrementalist -- -b dev -f ./affected-projects.txt -r -- build -c Release --nologo\n```\n\nNote the command structure when using as a local tool:\n- First `--` after `dotnet tool run incrementalist` is for Incrementalist options\n- Second `--` (if using `-r`) is for the dotnet command to run on affected projects\n\n## 📄 Configuration Files\n\nIncrementalist supports JSON configuration files to store commonly used settings. This eliminates the need to specify the same command-line arguments repeatedly.\n\n```shell\n# Use default configuration file (.incrementalist/incrementalist.json)\nincrementalist -r -- build\n\n# Specify a custom configuration file\nincrementalist -c my-config.json -r -- build\n```\n\nCreate a configuration file in your repository:\n\n```json\n{\n  \"gitBranch\": \"master\",\n  \"solutionFilePath\": \"src/MySolution.sln\",\n  \"verbose\": true,\n  \"runInParallel\": true\n}\n```\n\nCommand-line arguments take precedence over configuration file settings. See [Configuration Documentation](docs/config.md) for complete details.\n\n## 🚀 Quick Start Examples\n\n```shell\n# Get list of affected projects and save to file\nincrementalist -b dev -f ./affected-projects.txt\n\n# Specify solution explicitly\nincrementalist -s ./src/MySolution.sln -b dev -f ./affected-projects.txt\n\n# Get list of affected folders\nincrementalist -b dev -l -f ./affected-folders.txt\n\n# Build only affected projects\nincrementalist -b dev -r -- build -c Release --nologo\n\n# Run tests for affected projects\nincrementalist -b dev -r -- test -c Release --no-build --nologo\n\n# Run tests with code coverage\nincrementalist -b dev -r -- test -c Release --no-build --nologo /p:CollectCoverage=true /p:CoverletOutputFormat=cobertura /p:CoverletOutput=./coverage/\n\n# Save affected projects AND run commands\nincrementalist -b dev -f ./affected-projects.txt -r -- build -c Release --nologo\n```\n\n## 📄 Output Files\n\nIncrementalist can generate two types of output files using `-f, --file`:\n\n1. **Project Lists** (default):\n   ```\n   D:\\src\\Project1\\Project1.csproj,D:\\src\\Project2\\Project2.csproj\n   ```\n\n2. **Folder Lists** (with `-l, --folders-only`):\n   ```\n   D:\\src\\Project1,D:\\src\\Project2\\SubFolder\n   ```\n\nThese files can be used in build scripts, CI/CD pipelines, or other automation tools.\n\n## 🛠️ Command-Line Options\n\n```\n  -s, --sln             Optional. Solution file to analyze. Uses first .sln in\n                        current directory if not specified.\n\n  -f, --file            Optional. Write output to the specified file.\n\n  -l, --folders-only    Optional. List affected folders instead of projects.\n\n  -b, --branch          Optional. (Default: dev) Git branch to compare against\n                        (e.g., 'dev' or 'master').\n\n  -d, --dir             Optional. Working directory. Defaults to current directory.\n\n  --verbose             Optional. (Default: false) Enable debug logging.\n\n  -t, --timeout         Optional. (Default: 2) Solution load timeout in minutes.\n\n  -r, --run             Optional. Run dotnet CLI command against affected projects.\n                        All arguments after -- are passed to dotnet.\n\n  --continue-on-error   Optional. (Default: true) Continue executing commands even\n                        if some fail.\n\n  --parallel            Optional. (Default: false) Execute commands in parallel.\n\n  --fail-on-no-projects Optional. (Default: false) Fail if no projects are affected.\n\n  --no-cache            Optional. (Default: false) Ignore any existing cache file\n                        and perform a full Roslyn analysis.\n                        \n  -c, --config          Optional. Path to the configuration file. Defaults to \n                        .incrementalist/incrementalist.json in the current directory.\n\n  --help                Display help screen.\n\n  --version             Display version information.\n```\n\n## ⚡ Running Commands\n\nExecute dotnet CLI commands against affected projects:\n\n```shell\n# Build affected projects\nincrementalist -b dev -r -- build -c Release --nologo\n\n# Run tests\nincrementalist -b dev -r -- test -c Release --no-build --nologo\n\n# Run in parallel\nincrementalist -b dev -r --parallel -- build -c Release --nologo\n\n# Stop on first error\nincrementalist -b dev -r --continue-on-error=false -- build -c Release --nologo\n```\n\n## 📚 Documentation\n\n- 🔍 [How It Works](docs/how-it-works.md) - Technical details and architecture\n- 🏗️ [Building from Source](docs/building.md) - Build instructions and development setup\n- ⚡ [Dependency Graph Caching](docs/caching.md) - Cache system explanation and best practices\n- ⚙️ [Configuration Files](docs/config.md) - Using JSON configuration files\n\n## 📜 License\n\nLicensed under the Apache License, Version 2.0: http://www.apache.org/licenses/LICENSE-2.0\n\nCopyright 2015-2025 [Petabridge](https://petabridge.com/)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpetabridge%2Fincrementalist","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpetabridge%2Fincrementalist","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpetabridge%2Fincrementalist/lists"}