Add ghpkg .NET tool for managing GitHub package versions - #1
Merged
Conversation
Interactive Spectre.Console TUI to browse and delete NuGet/npm package versions for user or org scope, authenticated via gh CLI token. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
CI builds and packs on push/PR to main. Release workflow (manual dispatch) computes YYYY.M.<run-number>, packs, pushes to NuGet.org, tags, and creates a GitHub release. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Shorter command name; drops the gh- prefix which implied a gh CLI extension. Renames project folder, csproj, solution, namespaces, workflows, and README. User-agent version now derived from assembly. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Fetches orgs via GET /user/orgs and presents a selection list, with a manual-entry option and graceful fallback to a text prompt when the token lacks read:org. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
After deleting (or cancelling) versions, the package list is refetched and shown again with a (quit) option instead of exiting. Explicit --package invocations remain one-shot. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Before the version list, choose None / All / Prerelease only to pre-check items, then fine-tune with space toggles. Prerelease is detected by a hyphen in the version (SemVer). Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
Cleaning up old GitHub package versions (NuGet/npm) through the web UI is tedious, one version at a time. This adds
ghpkg, an interactive .NET 10 global tool for browsing and bulk-deleting package versions.What
gh auth tokenunder the hood, so no separate PAT management. Friendly errors whenghis missing or unauthenticated.gh auth refresh -s read:packages,delete:packages).--owner,--type,--package, and--dry-runto preview deletions; anything omitted is prompted interactively.PackAsTool, command nameghpkg) with README covering install and usage.YYYY.M.<run-number>), packs, pushes to NuGet.org (requiresNUGET_ORG_APIKEYsecret), tags, and creates a GitHub release.Validation
--helpverified.read:packages) surfaced the friendly guidance.dotnet pack+ global tool install/uninstall round-trip tested locally.