- Python 83%
- Shell 12.2%
- HTML 3%
- PowerShell 1%
- Nix 0.8%
| Filename | Latest commit message | Latest commit date |
|---|---|---|
|
|
||
| .forgejo/workflows | ||
| certificate | ||
| docs/adr | ||
| LICENSES | ||
| manifests/j/JCOllie | ||
| spike | ||
| tests | ||
| tools | ||
| .gitignore | ||
| CONTRIBUTING.md | ||
| flake.lock | ||
| flake.nix | ||
| GLOSSARY.md | ||
| README.md | ||
| REUSE.toml | ||
winget-pkgs
The winget manifests for the Windows programs Jeff writes, and the tooling that turns them into a winget source served as a static site at https://winget.jcollie.dev/.
git clone https://git.jcollie.dev/jeff/winget-pkgs.git
It is mirrored at https://tangled.org/jcollie.dev/winget-pkgs.
Using the source
The source is signed with a self-signed certificate, so a Windows machine has to trust that certificate before winget will read it. From an elevated PowerShell:
irm https://winget.jcollie.dev/install.ps1 | iex
That imports the certificate into the machine's Trusted Root and Trusted
People stores and adds the source under the name JCOllie, marked
--trust-level trusted: winget then marks an installer whose hash matches its
manifest as coming from the Trusted Sites zone rather than the Internet, so
Windows does not warn about it before it runs. The trust level can only be set
when a source is added, so a machine that added the source before it was set
gets it by running the script again. After that the packages install and
upgrade like any other:
winget install -s JCOllie JCOllie.Clipwatch
winget upgrade --all
Adding a source needs administrator rights, which is winget's rule rather than this source's. https://winget.jcollie.dev/ itself says the same, with the steps for doing it by hand, the certificate's hash to check, how to remove the source again, and every package the source holds.
How it works
Every package identifier is JCOllie.<Program>. The manifests live under
manifests/ in exactly the layout of Microsoft's winget-pkgs repository —
manifests/j/JCOllie/<Program>/<Version>/ — as the usual three files: the
version file, the installer file and the default locale file. The installers
themselves are not here: each manifest points at a release asset on the
program's own repository and pins its SHA-256.
A new version arrives as a pull request. A package's first version is written
by wingetsource new-package from what is particular to the program — its
name, descriptions, license, tags and installers — reading an MSI's codes from
the MSI itself; every later one is written by wingetsource new-version, which
copies the package's newest version and replaces what changes with the
release. A pull request is checked against Microsoft's published manifest JSON schemas and against rules
of this repository's own — the identifier and version match the path, the
publisher is JCOllie, and each installer downloads from git.jcollie.dev with
the hash its manifest gives.
Every push to main rebuilds the whole source on Linux:
- a SQLite index of every manifest is written, in winget's schema 1.7;
- it is packed into
source.msix, versioned from the merge commit's time; - the package is signed;
- the package, the manifests, the certificate,
install.ps1and anindex.htmllisting the packages are uploaded to git-pages.
All four steps are done by tools/wingetsource, a small Python program, with
osslsigncode for the signature. Because a source can only point at one file
per version, each multi-file manifest is published merged into a single
ManifestType: merged document, named by its SHA-256 so that a changed
manifest is never served from a stale cache. The files whose names never
change — source.msix, the certificate, install.ps1 and index.html — are
served with Cache-Control: no-cache through a git-pages _headers file, so
that
winget source update always checks for a new source.msix rather than
installing a cached one.
winget reads it as a Microsoft.PreIndexed.Package source, the same kind as
Microsoft's own, which needs nothing but plain files over HTTPS. The index has
no specification beyond winget-cli's C++, so the writer follows that code: its
tables and indices are those of the index inside Microsoft's own published
source.msix, and its package name and publisher normalization passes
winget-cli's own test data. Why it is
built this way rather than with a REST server or Microsoft's Windows-only
tools is recorded in docs/adr/.
Reporting issues
Report issues and send pull requests at
https://tangled.org/jcollie.dev/winget-pkgs. See
CONTRIBUTING.md for how the repository is laid out.
License
MIT. The repository follows the REUSE
specification, and reuse lint passes.
References cited
- git-pages contributors. git-pages. https://codeberg.org/git-pages/git-pages.
- Barnett, Matthew. mrab-regex, version 2026.7.11. https://github.com/mrabarnett/mrab-regex.
- Berman, Julian. jsonschema, version 4.26.0. https://github.com/python-jsonschema/jsonschema.
- Forgejo. Forgejo API access token handlers (routers/api/v1/utils/access_token.go), version v16.0.6. https://codeberg.org/forgejo/forgejo/src/tag/v16.0.6/routers/api/v1/utils/access_token.go.
- Forgejo. Forgejo access token validation (services/authz/access_token.go), version v16.0.6. https://codeberg.org/forgejo/forgejo/src/tag/v16.0.6/services/authz/access_token.go.
- Forgejo. Forgejo API description (templates/swagger/v1_json.tmpl), version v16.0.3. https://codeberg.org/forgejo/forgejo/src/tag/v16.0.3/templates/swagger/v1_json.tmpl.
- jantari. rewinged. https://github.com/jantari/rewinged.
- Microsoft. msix-packaging. https://github.com/microsoft/msix-packaging.
- Microsoft. source command (winget). Microsoft Learn. https://learn.microsoft.com/en-us/windows/package-manager/winget/source.
- Microsoft. Windows Package Manager Source (winget): source.msix. https://cdn.winget.microsoft.com/cache/source.msix.
- Microsoft. winget-cli, version 1.29.380. https://github.com/microsoft/winget-cli.
- Microsoft. winget-cli download workflow (src/AppInstallerCLICore/Workflows/DownloadFlow.cpp), version 3d9083c. https://github.com/microsoft/winget-cli/blob/3d9083c062c1e7a7086e05becb414d4e005e4ab6/src/AppInstallerCLICore/Workflows/DownloadFlow.cpp.
- Microsoft. winget-pkgs. https://github.com/microsoft/winget-pkgs.
- pl4nty. winget-pkgs-selfhost. https://github.com/pl4nty/winget-pkgs-selfhost.
- Pocock, Matt. skills, version 1.3.1. https://github.com/mattpocock/skills.
- Trojnara, Michał. osslsigncode, version 2.14. https://github.com/mtrojnar/osslsigncode.