- Python 57.5%
- HTML 40.5%
- Shell 1.6%
- Dockerfile 0.4%
| Filename | Latest commit message | Latest commit date |
|---|---|---|
|
|
||
| assets | ||
| data | ||
| examples/github-actions | ||
| public | ||
| scripts | ||
| tests | ||
| .dockerignore | ||
| .gitignore | ||
| config.json | ||
| Dockerfile | ||
| README.md | ||
VPM aggregator
A Python 3.10+ standard-library script that merges nine creators’ VPM listings into one static repository. No backend, dependencies, or package ZIP mirroring.
The initial generated listing contains 42 packages / 904 versions. public/index.html includes an Add to VCC link; public/index.json is the repository URL to give VCC.
Setup
-
Edit
config.json: setrepository.urlto the exact public HTTPS URL where you will serveindex.json. The suppliedhttps://vpm.lio.systems/index.jsonis a proposed deployment address, not a provisioned host. Set your own name, author, and globally unique ID; keep the ID stable once clients subscribe. -
Run:
python3 -m unittest discover -s tests -v python3 scripts/aggregate.py -
Upload the contents of
public/to any HTTPS static host. Serveindex.jsonandstatus.jsonasapplication/json, without authentication or HTML redirects. Use a short cache lifetime (e.g. five minutes). Keepdata/state.jsonon the build machine, outside the public web root. -
Open the hosted landing page and click Add to VCC, or paste the configured URL into VCC → Settings → Packages → Add Repository.
The link is generated as vcc://vpm/addRepo?url=<percent-encoded-repository-url> and requires VCC's protocol handler. This repository has not been deployed or tested in a live VCC installation.
Configuration and refreshes
Edit the upstreams array in config.json to add/remove HTTPS listing URLs. An entry can also be an object such as {"url": "https://vpm.nadena.dev/vpm.json", "name": "Modular Avatar"}; name overrides the source label on the landing page and in package display names (otherwise the listing’s own name is used). The supplied list includes nadena, Haï, BluWizard, SPS Configurator, Thry, Adjerry91, VRCFury, GoGo Loco, and Poiyomi. Set packageSourceName to "prefix", "suffix", or "none" (the default when omitted). This configuration uses "suffix", producing names such as Tool [Source Repo] for searching in package managers. Only published displayName fields change; package IDs, dependencies, download URLs, and original cached manifests stay intact. Identical packages from multiple sources use the first configured source for each version.
Removing an upstream deliberately removes its exclusively supplied packages/history at the next successful build.
python3 scripts/aggregate.py --config config.json --state data/state.json --output public
GitHub reference (disabled): examples/github-actions/refresh.yml is kept outside .github/workflows/, so it does not run. To enable it later, copy it to .github/workflows/refresh.yml. Once enabled, it tests pull requests and refreshes the main branch every six hours, on relevant pushes, or manually. It commits the archive and generated output so cache data survives runner replacement. Enable Actions write access and allow the workflow to push to main (or use a suitable automation identity for protected branches). To deploy with GitHub Pages, select GitHub Actions under Settings → Pages, set repository variable DEPLOY_PAGES=true, and configure repository.url to your actual Pages address before running the workflow. For a custom domain, configure it in Pages settings and DNS first. Without that variable, the workflow only generates and commits files. GitHub schedules can be delayed and may be disabled for inactive repositories; monitor workflow failures.
Self-hosted option: this checkout uses a self-hosted Git remote, and the GitHub workflow is disabled. On a persistent build host, schedule the command with cron or your CI scheduler, for example (replace the checkout path):
17 */6 * * * cd /srv/vpm && /usr/bin/python3 scripts/aggregate.py >> /srv/vpm-refresh.log 2>&1
Serve /srv/vpm/public directly from your HTTPS static server, or publish that directory only after the command exits successfully. Run one builder at a time (use your scheduler's lock/concurrency feature). Back up data/state.json: it holds historical releases no longer advertised upstream. The checked-in archive bootstraps all nine sources even during an outage. No scheduler or hosting service is installed by the script itself.
Coolify / Dockerfile deployment
Select the Dockerfile build pack with the root Dockerfile, build context /, and internal port 8080. The image uses Python 3.12 slim directly, with no dependency installation or build-time upstream refresh. .dockerignore limits the context to deployment inputs. This skips Railpack runtime provisioning; deployment orchestration and readiness time still depend on the host.
Keep the persistent volume mounted at /storage. The Dockerfile supplies the following default command (an existing identical Start Command can be retained):
sh scripts/start.sh
The script seeds /storage/state.json, /storage/public/index.json, and /storage/public/status.json from the checked-in files only when the cache is missing. It replaces /storage/public/index.html with the deployed landing page on every startup, then serves /storage/public/. Package data and history survive restarts. PORT defaults to 8080; STORAGE_DIR defaults to /storage.
For automatic upstream updates, add a Coolify Scheduled Task with frequency 17 */6 * * *, timeout 600 seconds, and command (the image source directory is /app):
python3 /app/scripts/aggregate.py --config /app/config.json --state /storage/state.json --output /storage/public
To build and run locally:
docker build -t vpm .
docker volume create vpm-storage
docker run --rm -p 8080:8080 -v vpm-storage:/storage vpm
Reuse the same volume on subsequent runs to preserve refresh results and history. Startup seeds an empty volume without fetching upstreams; refreshes remain a separate scheduled task. If overriding STORAGE_DIR, update both the volume destination and the scheduled task paths to match. Switching an existing Coolify application requires selecting the Dockerfile build pack before deploying; keep its volume and scheduled task unchanged.
Data guarantees and failure behavior
- Full manifests are copied without rewriting URLs, dependencies, hashes,
repo, or extension fields. Only repository identity and the surrounding package/version maps are generated. ZIPs are never downloaded; supplied hashes are format-checked, not verified against ZIP contents. - Published package display names can include source labels as configured above; all other manifest fields are preserved.
- Every previously seen version of a configured source is archived, even when removed upstream. This cannot recover versions removed before the first successful fetch.
- Identical duplicate package/version manifests are accepted. Any differing field for the same package/version, across sources or compared with archived history, fails the entire build before any output/cache writes. There is no priority-based winner.
- Network/HTTP/JSON/validation failures use that source's validated last-good archive, while healthy sources can advance.
public/status.jsonrecords fresh/stale sources and errors. An uncached source failure aborts publication. Conflict failures abort rather than being treated as stale data. - Invalid JSON, duplicate keys, nonfinite numbers, malformed listing structure, mismatched manifest names/versions, invalid SemVer, invalid download URLs, malformed dependency maps, and malformed SHA-256 values are rejected. Fetches have a 30-second timeout and a 32 MiB cap per source. Dependency range strings are preserved, not reinterpreted or resolved; dependencies may come from other repositories, including VCC's official SDK repository.
- Compatibility exception: existing upstream history contains manifests without an author, and many omit author email. These are retained verbatim. Supplied authors must be nonempty strings or objects with a name. This avoids fabricating metadata or dropping historical releases; it is not a strict enforcement of every recommended manifest field.
- Cache corruption fails closed. Generated files use atomic replacement individually;
index.jsonis replaced last. There is no multi-file filesystem transaction. Publish the directory as one deployment for consistent status/page/index snapshots. The script does not support concurrent writers.
If a creator intentionally republishes an existing version, inspect the metadata difference rather than choosing a source silently. To accept it, deliberately remove that version from all relevant archives in data/state.json, then rebuild and review the resulting diff. Conflicting live sources must first agree or one must be removed from configuration. Keep the currently hosted index until the rebuild succeeds.
Specification checked
Verified against the current official documentation on 2026-11-13:
- VPM repository format: repository identity and
packages → package ID → versions → SemVer → full manifest. - Creating a listing: required listing fields, public hosting, and retaining old versions.
- VPM package format: download URL,
vpmDependencies, optionalzipSHA256, and manifest extensions.
Tests use local fixtures and require no network; the checked-in initial listing was generated with live requests to all six upstreams.