Skip to content

captainsafia/nuggy

Repository files navigation

nuggy

Nuggy Logo

nuggy is a command-line tool that provides an intuitive interface to explore package metadata, view package contents, and manage NuGet feed sources.

Installation

As a .NET Global Tool (Recommended)

# Install from NuGet
dotnet tool install -g Nuggy.Cli

Install from local source

git clone https://github.com/captainsafia/nuggy.git
cd nuggy/src
dotnet pack
dotnet tool install -g Nuggy.Cli --add-source ../artifacts/packages

Build from Source

git clone https://github.com/captainsafia/nuggy.git
cd nuggy/src
dotnet build
dotnet run -- --help

Usage

Getting Started

# Show help
nuggy --help

# Show version
nuggy --version

🌐 Feed Management

List all configured feeds

nuggy feeds list

Add a new feed

# Add the official NuGet.org feed
nuggy feeds add --name "nuget.org" --source "https://api.nuget.org/v3/index.json"

# Add a feed and set it as default
nuggy feeds add --name "dotnet10" --source "https://www.myget.org/F/aspnetcore-dev/api/v3/index.json" --default

Set default feed

nuggy feeds set nuget.org

📦 Package Operations

View package metadata

# Get metadata for the latest version
nuggy package metadata Newtonsoft.Json

# Get metadata for a specific version
nuggy package metadata Newtonsoft.Json --version 13.0.3

# Use a specific feed
nuggy package metadata Newtonsoft.Json --feed nuget.org

List package versions

# List all versions of a package
nuggy package versions Newtonsoft.Json

# Use a specific feed
nuggy package versions Newtonsoft.Json --feed nuget.org

View and download package contents

# Download and view package contents (saves to global packages folder)
nuggy package show Newtonsoft.Json

# Show a specific version
nuggy package show Newtonsoft.Json --version 13.0.3

# Use a specific feed
nuggy package show Newtonsoft.Json --feed nuget.org

Extract specific files from packages

# Extract a specific file from a package
nuggy package file Microsoft.AspNetCore.OpenApi PACKAGE.md

# Extract a file from a specific version
nuggy package file Microsoft.AspNetCore.OpenApi microsoft.aspnetcore.openapi.nuspec --version 9.0.0

# Use a specific feed
nuggy package file Microsoft.AspNetCore.OpenApi PACKAGE.md --feed nuget.org

# Pipe output to other commands
nuggy package file Microsoft.AspNetCore.OpenApi PACKAGE.md | head -5
nuggy package file Microsoft.AspNetCore.OpenApi microsoft.aspnetcore.openapi.nuspec | grep -i "version"

Contributing

⚙️ Development Setup

Prerequisites

  • .NET 9.0 SDK (see global.json for exact version)
  • Git

Getting Started

# Clone the repository
git clone https://github.com/YOURORGNAME/nuggy.git
cd nuggy

# Restore dependencies
dotnet restore

# Build the project
dotnet build

# Run the application
dotnet run --project src -- --help

# Run all tests
dotnet test

# Run tests with coverage
dotnet test --collect:"XPlat Code Coverage"

# Run specific test class
dotnet test --filter "ClassName=FeedConfigurationTests"

About

CLI-based tool for exploring NuGet feeds and packages

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages