Skip to content

Proposal to Surface Sponsorship Information in the CLI - #14992

Open
kalebfik wants to merge 14 commits into
devfrom
dev-kalebfika-sponsorCliSpec
Open

Proposal to Surface Sponsorship Information in the CLI#14992
kalebfik wants to merge 14 commits into
devfrom
dev-kalebfika-sponsorCliSpec

Conversation

@kalebfik

@kalebfik kalebfik commented Jul 13, 2026

Copy link
Copy Markdown

@kalebfik
kalebfik requested a review from a team as a code owner July 13, 2026 21:04
Comment thread accepted/2026/sponsorship-cli.md Outdated
Comment thread accepted/2026/sponsorship-cli.md Outdated
Comment thread accepted/2026/sponsorship-cli.md Outdated
Comment thread accepted/2026/sponsorship-cli.md Outdated
Comment thread accepted/2026/sponsorship-cli.md Outdated
Comment thread accepted/2026/sponsorship-cli.md Outdated
Comment thread accepted/2026/sponsorship-cli.md Outdated
Comment thread accepted/2026/sponsorship-cli.md Outdated
Comment thread accepted/2026/sponsorship-cli.md Outdated
Comment thread accepted/2026/sponsorship-cli.md Outdated
Comment thread accepted/2026/sponsorship-cli.md Outdated
Comment thread accepted/2026/sponsorship-cli.md
Comment thread accepted/2026/sponsorship-cli.md Outdated
@kalebfik kalebfik self-assigned this Jul 14, 2026
Comment thread accepted/2026/sponsorship-cli.md Outdated
@kalebfik

Copy link
Copy Markdown
Author

@dotnet-policy-service agree company="Microsoft"

@kalebfik kalebfik linked an issue Jul 16, 2026 that may be closed by this pull request

@nkolev92 nkolev92 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks pretty good to me.

Just final details to iron out during the meeting.

Comment thread accepted/2026/sponsorship-cli.md Outdated
Comment thread accepted/2026/sponsorship-cli.md Outdated
Comment thread accepted/2026/sponsorship-cli.md Outdated
Comment thread accepted/2026/sponsorship-cli.md Outdated
Comment thread accepted/2026/sponsorship-cli.md Outdated
Comment thread accepted/2026/sponsorship-cli.md Outdated
Comment thread accepted/2026/sponsorship-cli.md Outdated
Comment thread accepted/2026/sponsorship-cli.md Outdated
Comment thread accepted/2026/sponsorship-cli.md Outdated
Comment thread accepted/2026/sponsorship-cli.md Outdated
Comment thread accepted/2026/sponsorship-cli.md Outdated
Comment thread accepted/2026/sponsorship-cli.md Outdated

@donnie-msft donnie-msft left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great progress! I know this doc has gotten edited with many iterations of feedback. I think it needs to be consolidated a bit and structured so that it highlights your key design ideas.

Comment thread accepted/2026/sponsorship-cli.md Outdated
Comment thread accepted/2026/sponsorship-cli.md Outdated
Comment thread accepted/2026/sponsorship-cli.md Outdated
Comment thread accepted/2026/sponsorship-cli.md Outdated
Comment thread accepted/2026/sponsorship-cli.md Outdated
Comment thread accepted/2026/sponsorship-cli.md Outdated
Comment thread accepted/2026/sponsorship-cli.md Outdated
Comment thread accepted/2026/sponsorship-cli.md Outdated
Comment thread accepted/2026/sponsorship-cli.md Outdated
Comment thread accepted/2026/sponsorship-cli.md Outdated
Comment thread accepted/2026/sponsorship-cli.md Outdated
Comment thread accepted/2026/sponsorship-cli.md Outdated
Comment thread accepted/2026/sponsorship-cli.md Outdated
Comment thread accepted/2026/sponsorship-cli.md Outdated
Comment thread accepted/2026/sponsorship-cli.md Outdated
Comment thread accepted/2026/sponsorship-cli.md Outdated
@kalebfik kalebfik changed the title Sponsorship in CLI Spec Proposal to Surface Sponsorship Information in the CLI* Aug 14, 2026
@kalebfik kalebfik changed the title Proposal to Surface Sponsorship Information in the CLI* Proposal to Surface Sponsorship Information in the CLI Aug 14, 2026
@kalebfik
kalebfik requested a review from a team August 19, 2026 23:20
Comment thread accepted/2026/sponsorship-cli.md Outdated
Comment thread accepted/2026/sponsorship-cli.md Outdated
Comment thread accepted/2026/sponsorship-cli.md Outdated
Comment thread accepted/2026/sponsorship-cli.md Outdated
A source that does not support sponsorships will have a separate message:

```text
These sources do not provide sponsorship support:

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this is fine. We could only show this for --verbosity detailed or something.
No strong opinion from me.

{
"version": 1,
"parameters": "--sponsor --format json",
"problems": [

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For --vulnerable, we output a list of sources here. Perhaps we should do the same and then in the "projects" below we could only list sources which have sponsors? This would reduce noise in the output while still providing the list of sources we checked against.

(note, in this case the local package feed could be listed as an enabled source, but we wouldn't query it since it's local and therefore not able to provide Registration)

"sources": [
    "https://data.nuget.org/v3/index.json",
     "C:/Program Files (x86)/Microsoft SDKs/NuGetPackages/"
  ],

"projects": [
{
"path": "/path/to/Contoso.App.csproj",
"sources": [

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FYI, Mentioned above that we may want to only list sources here that support Sponsorship metadata in Registration.

Sponsorship information is applied to the package ID rather than the version of a package, which is why packages are listed once per package ID.
When a package has multiple sponsorship links, the CLI will display the links in the order returned by nuget.org.

Both top-level and transitive packages will be included by default when using `--sponsor`.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We group by top level & transitive for --vulnerable.

I propose that we remove "sources" and replace it with topLevelPackages & transitivePackages.
This proposed grouping is now project->top/transitive -> source providing 1 or more sponsor -> packageId which has 1 or more sponsor.

{
  "projects": [
    {
      "path": "/path/to/Contoso.App.csproj",
      "topLevelPackages": [
        {
          "source": "https://api.example.org/v3/index.json",
          "sponsorablePackages": [
            {
              "id": "Contoso.Tools",
              "urls": [
                "https://github.com/sponsors/contoso"
              ]
            },
            {
              "id": "Contoso.Utility",
              "urls": [
                "https://github.com/sponsors/contoso"
              ]
            }
          ]
        },
        {
          "source": "https://www.myget.org/F/contoso/api/v3/index.json",
          "sponsorablePackages": [
            {
              "id": "Contoso.Utility",
              "urls": [
                "https://buymeacoffee.com/contoso"
              ]
            }
          ]
        }
      ],
      "transitivePackages": [
        {
          "source": "https://api.example.org/v3/index.json",
          "sponsorablePackages": [
            {
              "id": "Contoso.Tools.OpenApi",
              "urls": [
                "https://github.com/sponsors/contoso"
              ]
            }
          ]
        }
      ]
    }
  ]
}

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we assume most sources will accurately mirror the source of truth, then we could de-duplicate lists and I think that'll make the average size go down. Something like:

{
  "packages": [
    {
      "package": "Contoso.Utility",
      "sponsorUrls": [
        {
          "sources": [ "feed1", "feed2" ],
          "urls": [ "https://whatever", "https://something" ]
       }
    }
   ]
}

This way the only time that sponsorUrls is an array with length != 1 is when a source disagrees about the complete list. But it avoids duplicating the package name, and the URL list

No sponsorship details were returned using the following package sources:
https://api.example.org/v3/index.json

Consider specifying another package source with `--source <SOURCE>`.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sounds fine to me IFF package source mapping is disabled.

Should we go ahead and use nuget.org in the example?

Suggested change
Consider specifying another package source with `--source <SOURCE>`.
Consider specifying an additional package source that provides sponsorship metadata, for example: `--source https://api.nuget.org/v3/index.json`.

"parameters": "--sponsor --format json",
"projects": [
{
"path": "/path/to/Contoso.App.csproj",

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The text output didn't propose grouping by project, and I don't think the json should either. This is a format specific for sponsor, not a shared format. If we think it's useful for customers to know which projects a package is used by, when getting sponsorship info, I think adding a projects array to a package object makes more sense.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Design Spec for Sponsorships in CLI

5 participants