Skip to content

Allow users to add a GitHub repository URL as a native WinGet manifest source. #6266

@pawPatoes

Description

@pawPatoes

Relevant area(s)

WinGet CLI

Description of the new feature / enhancement

Currently, managing custom or forked manifest repositories requires setting up an external REST API or complex infrastructure to serve as a WinGet source. This creates a high barrier to entry for power users and organizations who want to maintain a "private fork" of the community repository or a curated list of internal applications.

I propose a feature that allows users to point WinGet directly to a GitHub repository URL as a source. WinGet could then handle the background indexing of the YAML files within that repository. This would simplify workflows, improve version control integration, and allow users to leverage GitHub's existing features (like pull requests and branches) to manage their software packages without needing to host a dedicated server.

(I tried making this issue more grammatically correct and fancier)

Proposed technical implementation details

Proposed technical implementation details:

To support native integration with GitHub repository sources, I suggest the following implementation approach:

  • New Source Type gitHubRepo: Introduce a new, dedicated source type specifically for GitHub repositories. This would allow the WinGet client to recognize and handle the repository structure.

  • Automated Indexing Engine: Incorporate a lightweight indexing routine that, upon adding the source, performs a shallow clone or fetches the repository content to generate the required index locally.

  • Version Control Awareness: The tool should ideally monitor the repository for new commits or tags, allowing users to trigger a winget source update that pulls the latest manifest changes without needing to rebuild the entire index from scratch.

  • Authentication: A sort of "password" that would be put with the command that would allow access to the URL, an example of a command to switch URLS is:

winget changeGitURL https://github.com/microsoft/winget-cli

And if there is a password:

winget changeGitURL https://github.com/microsoft/winget-cli (password)
  • Simplified Package Addition Command: To streamline the process of including specific packages from a repository, I suggest implementing a winget add command for authorized users. This would allow users with write access to the source to quickly register a new package:
winget add <url> <name> <id>

This would automatically parse the necessary metadata and add it to the repository's manifest structure. For example, using the name and ID format (winget install <Name> or winget install <Id>). Example: if we did

winget add https://github.com/oven-sh/bun/releases/download/bun-v1.3.14/bun-windows-x64.zip Bun Oven-sh.Bun

This would add the current winget program "Bun" with those parameters.
Which would allow you to download this by doing either

winget install bun

OR

winget install oven-sh.bun

However, because there are 2 results when doing winget install bun, the second one will be necessary.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Issue-FeatureThis is a feature request for the Windows Package Manager client.
    No fields configured for Feature.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions