microsoft / microsoft/winget-cli

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

Open
#6,266 6 comments 7 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Issue-Feature
Dominant language
C++
Stars
26.4k
Forks
1.8k
Avg merge
1d 11h
Merged PRs (30d)
15

Description

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.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the WinGet CLI source and the existing source workflow implied by the proposed changeGitURL command. Define the expected behavior and boundaries for GitHub repository indexing, updates, authentication, and the proposed add command; done requires an agreed scope and corresponding tests.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp, github
Domain
cli
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Quiet
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.