nugetc 1.0.0

dotnet tool install --global nugetc --version 1.0.0
                    
This package contains a .NET tool you can call from the shell/command line.
dotnet new tool-manifest
                    
if you are setting up this repo
dotnet tool install --local nugetc --version 1.0.0
                    
This package contains a .NET tool you can call from the shell/command line.
#tool dotnet:?package=nugetc&version=1.0.0
                    
nuke :add-package nugetc --version 1.0.0
                    

NuGet Config Creator 🚀

The Ultimate Tool for Creating Perfect NuGet.config Files!

Tired of manually crafting NuGet.config files? Sick of copying and pasting the same configuration over and over again? Look no further! NuGet Config Creator is here to revolutionize how you manage your NuGet package sources!

🎯 Why You'll Love This Tool

This isn't just another boring configuration generator - this is a game-changer for .NET developers! Whether you're working solo or managing enterprise-level projects, this tool will save you hours of tedious configuration work and eliminate those frustrating "where did I put that feed URL?" moments.

Key Features That Will Blow Your Mind

🔥 Zero-Friction Setup - Create a perfect NuGet.config with a single command!
🎨 Fully Customizable - Add unlimited feeds, rename commands, and make it YOURS!
Lightning Fast - No more waiting around for complex setup processes!
🛠️ Developer-Friendly - Clean, intuitive commands that just make sense!
🔄 Hot Reload - Change your configuration and see results instantly!
🎯 Smart Defaults - Comes with sensible configurations out of the box!
🚀 Extensible - Add company feeds, dev environments, staging servers - the sky's the limit!
🧠 Smart Config Management - Detects existing configs and prevents duplicates!
🎭 Enable/Disable Magic - Temporarily disable feeds with XML commenting!
🗑️ Easy Cleanup - Remove keys when you're done debugging!

🎉 What You Get

When you run this tool, you'll get a beautifully formatted, production-ready NuGet.config file that includes:

  • Official NuGet.org feed with proper protocol versioning
  • Two extra feeds one for a local feed at C:\nuget, and one for NUnit's myget feed. (Yeah, we love NUnit)
  • Custom feed sources Add any feed you like, MyGet, Azure Devops, Github, local feeds, company reposits.
  • Clean XML structure that follows Microsoft's best practices
  • Proper configuration that works with all NuGet clients
  • No more typos or missing attributes in your config files!
  • Smart overwrites - You can update the paths of existing feeds!
  • Temporary disabling - comment out feeds after debugging, then re-enable for debugging!
  • Easy cleanup - remove keys when you're done with them!

And for configuration

  • Command Flexibility The Command property defines the CLI command name
  • Easy Customization Add new feeds by adding entries to NuGetFeeds
  • User-Friendly Commands Choose command names that make sense for your organization
  • Multiple Feeds Add as many custom feeds as needed

Seriously, this tool is so good, you'll wonder how you ever lived without it! 🎊

🚀 Real-World Usage Scenarios

Creating the nuget.config file

nugetc create

Debugging Workflow

nugetc add local                # Add local feed, default to C:\nuget
nugetc add myget                # Add debug feed to Myget for NUnit(preconfigured in appsettings.json)
# ... do your debugging magic ...
nugetc disable myget            # Temporarily disable
# ... continue development ...
nugetc enable myget             # Re-enable when needed
nugetc remove myget             # Clean up when done
nugetc remove local

Smart Duplicate Prevention:

nugetc add myget    # First time: "NuGet.config with MyGet.org feed created successfully!"
nugetc add myget    # Second time: "NuGet.config already exists and contains the 'myget' key."

Installation

dotnet tool install --global nugetc

Usage

After installation, you can use the tool with the following commands:

# Show help and available commands
nugetc --help

# View the README in your browser
nugetc readme

# Create or add a standard NuGet.config with only nuget.org feed
nugetc add default    # primary name (alternate: 'standard')
nugetc add standard   # alternate name

# Alternatively, the top-level 'create' command does the same as 'add default'
nugetc create

# Create or add a NuGet.config with local feed (default path: C:\nuget)
nugetc add local

# Create or add a NuGet.config with local feed at custom path 
nugetc add local --path "D:\MyNuGetFeed"

# Create or add a NuGet.config with MyGet.org feed  (default path goes to NUnit's Myget feed,override path if you like)
nugetc add myget

# Update existing feed URLs or paths
nugetc update local "D:\NewLocalPath"
nugetc update myget "https://new-myget-url/api/v3/index.json"
nugetc update github "https://nuget.pkg.github.com/YOUR-USERNAME/index.json"  # For custom feeds

# Add arbitrary feeds directly to NuGet.config (without adding to config first)
nugetc add CustomFeed "https://custom.example.com/v3/index.json"
nugetc add LocalFeed2 "C:\MyLocalFeeds"

🛠️ Management Commands - The Game Changers!

# Remove a feed from existing NuGet.config
nugetc remove local    # Remove local feed
nugetc remove myget    # Remove MyGet feed
nugetc remove default  # Remove nuget.org feed
nugetc remove CustomFeed  # Remove any arbitrary feed

# Update existing feed URLs or paths
nugetc update local "D:\NewPath"            # Change local feed path
nugetc update myget "https://new-url.com"   # Change MyGet URL
nugetc update default "https://custom.org"  # Change nuget.org URL
nugetc update github "https://new-gh.com"   # Update custom feeds
nugetc update CustomFeed "https://new.url"  # Update any arbitrary feed

# Temporarily disable a feed (comments it out)
nugetc disable local
nugetc disable myget
nugetc disable default
nugetc disable CustomFeed  # Disable any arbitrary feed

# Re-enable a disabled feed (uncomments it)
nugetc enable local
nugetc enable myget
nugetc enable default
nugetc enable CustomFeed  # Enable any arbitrary feed

# Show feed URLs or paths
nugetc show              # Show all feeds
nugetc show local        # Show local feed: local: C:\nuget
nugetc show myget        # Show MyGet feed
nugetc show default      # Show nuget.org feed
nugetc show CustomFeed   # Show any arbitrary feed

# Validate configuration (check for collisions and invalid URLs)
nugetc config validate

# Reset tool configuration to factory defaults
nugetc config reset

# Reset project NuGet.config (if it exists) to only nuget.org
nugetc reset

Configuration Types

The tool comes with three built-in feed configurations:

Default Configuration

  1. default (alias: standard) - https://api.nuget.org/v3/index.json
  2. local - C:\nuget (customizable via --path)
  3. myget - https://www.myget.org/F/nunit/api/v3/index.json

Add more Custom feeds

You can add your own feeds to the tool's configuration (appsettings.json) for convenience, or add them directly to NuGet.config.

E.g. a GitHub Packages feed:

# Add a custom feed to appsettings.json (name is used as command in lowercase)
# Specify the URL or local path as the second argument
nugetc config add GitHub "https://nuget.pkg.github.com/NAMESPACE/index.json"
nugetc config add MyLocal "C:\\Feeds\\Company"

# Then use it to add the feed to NuGet.config
nugetc add github

You can remove it from the tool configuration later:

nugetc config remove GitHub

You can list and rename custom feeds:

# List all configured feeds (built-in and custom)
nugetc config list

# Show all configured feeds (same as list, but using show)
nugetc config show

# Show details of a specific feed in JSON format
nugetc config show GitHub
nugetc config show local
nugetc config show default

# Validate configuration for collisions and invalid URLs
nugetc config validate

# Rename a custom feed
nugetc config rename GitHub GitHubEnterprise

Backups and Reset to factory defaults

The tool maintains a version-independent backup of your configuration., ensuring you keep it when updating the tool.

However you might not want to keep it, but restore to factory defaults, that is when you use the reset command.

nugetc config reset

🎊 Amazing Output - See the Magic Happen!

When you run this incredible tool, it creates a perfectly crafted NuGet.config file right in your current directory! No more hunting through documentation or guessing at the right format - you get exactly what you need, when you need it!

🎯 What Makes Our Output Special

Instant Results - Your NuGet.config appears in seconds, not minutes!
🎨 Beautiful Formatting - Clean, readable XML that your team will love!
🔧 Production Ready - No debugging needed, it just works!
📋 Consistent Structure - Every file follows the same perfect pattern!
🚀 Zero Configuration Drift - No more "it works on my machine" issues!

Pro Tip: The tool only creates the NuGet.config file when you run it - no messy config files cluttering up your development environment! The example files are just there to show you what's possible. 🎉

Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

This package has no dependencies.

Version Downloads Last Updated
1.0.0 295 10/28/2025
0.9.0 236 10/28/2025
0.1.17 246 10/27/2025
0.1.10 233 10/27/2025
0.1.9 221 10/27/2025
0.1.7 230 10/27/2025
0.1.5 229 10/26/2025
0.1.2 229 10/26/2025
0.1.0 229 10/26/2025