Automagically update NuGet packages in all .NET projects.
Note: This project was originally archived. See Why is NuKeeper Archived for context.
- Modernized to .NET 10 - Now targets the latest .NET runtime
- Improved async patterns - Added
ConfigureAwait(false)throughout for better performance - Enhanced error handling - Consistent error reporting across all platform providers
- Updated dependencies - All NuGet packages updated to latest versions
- .NET 10 SDK or later
- Git installed and available in PATH
- Platform-specific access token (GitHub, Azure DevOps, GitLab, Bitbucket, or Gitea)
Note: For updating legacy .NET Framework projects on Linux/macOS, Mono is required.
dotnet tool install nukeeper --globalnukeeper --versiondotnet tool update nukeeper --globaldotnet tool uninstall nukeeper --globalCheck what packages can be updated without making changes:
nukeeper inspect /path/to/your/solutionApply package updates to your local project:
nukeeper update /path/to/your/solutionAutomatically create PRs for a GitHub repository:
nukeeper repo https://github.com/owner/repo --token YOUR_GITHUB_TOKENScans local projects and reports available NuGet package updates without making changes.
# Inspect current directory
nukeeper inspect
# Inspect specific path
nukeeper inspect /path/to/solution
# Output as CSV
nukeeper inspect --output csv
# Only show major version updates
nukeeper inspect --change MajorApplies NuGet package updates to local projects.
# Update all packages in current directory
nukeeper update
# Update specific path
nukeeper update /path/to/solution
# Limit number of updates
nukeeper update --maxpackageupdates 5
# Only apply patch updates (safest)
nukeeper update --change Patch
# Update specific package only
nukeeper update --include PackageNameCreates pull requests with package updates for a single repository.
# GitHub
nukeeper repo https://github.com/owner/repo --token ghp_xxxxx
# Azure DevOps
nukeeper repo https://dev.azure.com/org/project/_git/repo --token pat_xxxxx
# GitLab
nukeeper repo https://gitlab.com/owner/repo --token glpat_xxxxx
# Bitbucket
nukeeper repo https://bitbucket.org/owner/repo --token xxxxx
# Gitea
nukeeper repo https://gitea.example.com/owner/repo --token xxxxxCommon Options:
# Limit PRs created
nukeeper repo URL --token TOKEN --maxpackageupdates 3
# Target specific branch
nukeeper repo URL --token TOKEN --targetbranch develop
# Only update specific packages
nukeeper repo URL --token TOKEN --include Newtonsoft.Json
# Exclude packages from updates
nukeeper repo URL --token TOKEN --exclude Microsoft.Extensions.*
# Add labels to PRs
nukeeper repo URL --token TOKEN --label dependencies --label automated
# Set PR reviewers (Azure DevOps)
nukeeper repo URL --token TOKEN --reviewer [email protected]Creates pull requests for all repositories in a GitHub organization.
nukeeper org MyOrganization --token ghp_xxxxx
# Limit to specific repos
nukeeper org MyOrganization --token TOKEN --include repo1,repo2
# Exclude repos
nukeeper org MyOrganization --token TOKEN --exclude legacy-repoCreates pull requests for all repositories the token has access to.
nukeeper global --token ghp_xxxxxControl which types of updates to apply:
| Level | Description | Example |
|---|---|---|
Major |
Major version updates | 1.0.0 → 2.0.0 |
Minor |
Minor version updates | 1.0.0 → 1.1.0 |
Patch |
Patch version updates | 1.0.0 → 1.0.1 |
None |
No updates | - |
nukeeper update --change PatchOnly update packages that have been published for a certain period (reduces risk from newly published packages):
# Only update packages published at least 14 days ago
nukeeper update --age 14# Include only specific packages
nukeeper update --include Newtonsoft.Json,Serilog
# Include packages matching pattern
nukeeper update --include Microsoft.*
# Exclude specific packages
nukeeper update --exclude EntityFramework
# Exclude packages matching pattern
nukeeper update --exclude *.PreviewUpdate the same package across all projects in a solution to the same version:
nukeeper update --consolidatenukeeper update --verbosity Detailed
nukeeper update --verbosity Quiet| Project Type | Supported |
|---|---|
| .NET 8/9/10 | Yes |
| .NET Core 3.1+ | Yes |
| .NET Standard | Yes |
| .NET Framework | Yes |
| Private NuGet Feeds | Yes |
| Platform | Supported | Token Type |
|---|---|---|
| GitHub | Yes | Personal Access Token |
| Azure DevOps | Yes | Personal Access Token |
| GitLab | Yes | Personal Access Token |
| Bitbucket Cloud | Yes | App Password |
| Bitbucket Server | Yes | Personal Access Token |
| Gitea | Yes | Access Token |
Run NuKeeper in a container:
# Pull the image
docker pull nukeeper/nukeeper:latest
# Run inspection
docker run --rm -v /path/to/solution:/repo nukeeper/nukeeper inspect /repo
# Create PRs
docker run --rm nukeeper/nukeeper repo https://github.com/owner/repo --token TOKENdocker build -t nukeeper -f Docker/SDK10.0/Dockerfile .- .NET 10 SDK
# Clone repository
git clone https://github.com/NuKeeperDotNet/NuKeeper.git
cd NuKeeper
# Build
dotnet build
# Run tests
dotnet test
# Create NuGet package
dotnet pack NuKeeper/NuKeeper.csproj -o ./artifacts
# Install local build
dotnet tool install nukeeper --global --add-source ./artifacts- name: Update NuGet Packages
run: |
dotnet tool install nukeeper --global
nukeeper repo ${{ github.repository }} --token ${{ secrets.GITHUB_TOKEN }}- script: |
dotnet tool install nukeeper --global
nukeeper repo $(System.TeamFoundationCollectionUri)$(System.TeamProject)/_git/$(Build.Repository.Name) --token $(System.AccessToken)
displayName: 'Update NuGet Packages'# Use custom NuGet source
nukeeper update --source https://nuget.example.com/v3/index.json
# Multiple sources
nukeeper update --source https://api.nuget.org/v3/index.json --source https://nuget.example.com/v3/index.jsonCreate a scheduled job to check for updates weekly:
# Cron job example (every Monday at 9am)
0 9 * * 1 /usr/local/bin/nukeeper repo https://github.com/owner/repo --token TOKEN --maxpackageupdates 5"Unable to find package"
- Ensure you have access to the NuGet feed
- Check if the package requires authentication
"401 Unauthorized"
- Verify your token has the correct permissions
- For GitHub: needs
reposcope - For Azure DevOps: needs
Code (Read & Write)scope
"No updates found"
- Try with
--verbosity Detailedto see what's happening - Check your
--changelevel setting - Verify packages aren't excluded by age threshold
nukeeper update --verbosity Detailed --logfile nukeeper.logNuKeeper is licensed under the Apache License
- LibGit2Sharp - MIT
- Octokit - MIT
- NuGet.Protocol - Apache 2.0
- McMaster.Extensions.CommandLineUtils - Apache 2.0
