A self-hosted, generic package manager and auto-updater for binary releases.
pkgtug tracks any git repository, builds its binaries when a new version appears, and distributes them to production hosts — without depending on GitHub/GitLab APIs, package registries, or any specific CI platform.
curl -fsSL https://pawi1.github.io/pkgtug/install.sh | shgit push
│
├─► POST /tug/fetch/<name> (webhook — no auth)
│ └─ git fetch on local clone
│ └─ new tag / new SHA detected → job queued
│
└─► pkgtug-worker --once (CI runner or daemon)
└─ git clone → pre-build? → build → POST result to server
└─ manifest.json updated atomically
└─ pkgtug update (on production hosts)
└─ download → verify SHA256 → swap binary
| Binary | Role |
|---|---|
pkgtug-server |
Webhook receiver, job queue, manifest API, binary storage |
pkgtug-worker |
Polls server for jobs, builds, uploads result |
pkgtug |
Client CLI — installs and updates binaries on production hosts |
The worker runs as a daemon on a build machine or as a one-shot CI job (GitHub Actions, GitLab CI, etc.).
Server — copy config.example.yaml, set base_url, data_dir, worker_secret, and declare your packages, then:
pkgtug-server --config /etc/pkgtug/server.yamlWorker — daemon on a build machine:
pkgtug-worker --server https://tug.example.com --secret <worker_secret> --interval 30sOne-shot in CI (--once --wait 90s handles the webhook/runner race):
pkgtug-worker --server https://tug.example.com --secret <worker_secret> --once --wait 90sCopy contrib/github-actions-worker.yml to .github/workflows/pkgtug-build.yml for a ready-made GitHub Actions setup.
Client — add a remote and install:
pkgtug remote add main https://tug.example.com
pkgtug install myapp/server
pkgtug install github:cli/cli # or straight from GitHub Releases
pkgtug update --all- Architecture
- Server reference
- Worker reference
- Client reference
- Deployment guide
- Configuration reference
make all # server + worker + client → dist/
make build-linux-amd64
make build-linux-arm64See CONTRIBUTING.md for development setup. For security issues see SECURITY.md.
MIT