Skip to content

zephyraoss/poppy-pkgs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

poppy-pkgs

A Go service that mirrors microsoft/winget-pkgs, indexes manifests into SQLite (FTS5), and exposes a versioned API for package search and manifest download.

Run

go run ./cmd/poppypkgs

API (v1)

We now have a public API you can use at pkgs.poppy.party. If you wish to use the API we ask that you do the following.

  • When possible, use a User-Agent header. They should be formated like Author/My App Name (1.0.0)
  • There are no rate limits implemented, but when possible try to keep requests down to under 5 requests per second.
  • When utilizing our our hosted API, please link to https://poppy.party somewhere in your app.
  • When hosting poppy-pkgs on your own infrastructure, please link to this repository somewhere in your app.

Endpoints

  • GET /api/v1/health
  • GET /api/v1/status
  • GET /api/v1/search?q=<query>&limit=20&offset=0
  • GET /api/v1/packages/:packageId
  • GET /api/v1/packages/:packageId/versions
  • GET /api/v1/packages/:packageId/versions/:version/manifests
  • GET /api/v1/packages/:packageId/versions/:version/manifests/:manifestId/raw
  • GET /api/v1/packages/:packageId/versions/:version/manifests/:manifestId/download

version supports latest as a shortcut (for example: /api/v1/packages/Foo.Bar/versions/latest/manifests).

Search prioritization:

  1. Exact PackageIdentifier match
  2. Prefix PackageIdentifier match
  3. FTS relevance

Examples

Search packages:

curl "http://localhost:8080/api/v1/search?q=yucca&limit=5"

Get package metadata (includes latest_version):

curl "http://localhost:8080/api/v1/packages/Addi.Yucca"

List unique package versions:

curl "http://localhost:8080/api/v1/packages/Addi.Yucca/versions"

Fetch manifests for latest version:

curl "http://localhost:8080/api/v1/packages/Addi.Yucca/versions/latest/manifests"

Download a manifest file from API (no GitHub URL needed):

curl -L -o manifest.yaml "http://localhost:8080/api/v1/packages/Addi.Yucca/versions/latest/manifests/123/download"

Optional Configuration (env vars)

  • POPPY_LISTEN_ADDR (default :8080)
  • POPPY_DB_PATH (default ./data/poppypkgs.db)
  • POPPY_REPO_PATH (default ./data/winget-pkgs)
  • POPPY_REPO_URL (default https://github.com/microsoft/winget-pkgs.git)
  • POPPY_SYNC_INTERVAL (default 1m, supports duration like 30s)
  • POPPY_LOG_LEVEL (debug|info|warn|error, default info)

About

Winget Package Repository indexer & search API

Resources

License

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages