Workspaces page: - list the newest sessions across workspaces in the activity column; the daemon exposes GET /api/v1/sessions/recent as a disk projection and the browser enriches live rows from the per-workspace session relay - put recent activity first below 1100px and fix the mobile page-header flex-basis gap Smoke: - pin PI2_HOST=127.0.0.1 in both smoke scripts and make the startup-line assertion follow the configured host; the daemon default stays 0.0.0.0 Install: - standalone binary build/install scripts, packaging templates, CI/release hooks, CLI-first install docs and the supporting config/doctor changes
System Packaging Channels for pi2d
This directory contains the packaging templates and documentation for distributing
pi2d across system-level package channels.
Distribution Channels
Every channel distributes the prebuilt single-binary artifacts built from Bun, bundling both the CLI launcher and the React web console.
| Channel | Target Audience | User Installation Command |
|---|---|---|
| curl installer | Generic Linux & macOS | curl -fsSL https://raw.githubusercontent.com/zgs225/pi2d/main/scripts/install.sh | sh |
| Homebrew tap | macOS & Linux (Homebrew) | brew install zgs225/tap/pi2d |
Arch AUR (-bin) |
Arch Linux / Manjaro / EndeavourOS | paru -S pi2d-bin (or yay -S pi2d-bin) |
Shared Tarball Layout Contract
All distribution channels consume the release tarballs published on GitHub Releases:
https://github.com/zgs225/pi2d/releases/download/v<VERSION>/pi2d-<VERSION>-<target>.tar.gz
Where <target> is one of:
linux-x64linux-arm64linux-x64-musllinux-arm64-musldarwin-x64darwin-arm64
Each release tarball unpacks with the following layout at its root:
bin/
pi2
share/
pi2d/
web/
dist/
index.html
...
LICENSE
Crucial layout rule: pi2 resolves its web console assets at runtime via:
resolve(dirname(executablePath()), "..", "share", "pi2d", "web", "dist")
(defined in src/core/install.ts).
Every channel must install bin/pi2 into <prefix>/bin and share/pi2d/web/dist into
<prefix>/share/pi2d/web/dist under the same prefix (e.g. /usr/local, /opt/homebrew,
or /usr).
Files & Templates
packaging/homebrew/pi2d.rb.in: plain template for Homebrew formulapi2d.rb. Contains platform stanzas (on_macos,on_linuxwithon_armandon_intel) andinstall/test/caveatsblocks. Linux stanzas target standard glibc releases.packaging/aur/PKGBUILD.in: plain template for the Arch Linux AUR packagepi2d-bin. Usesoptions=('!strip')because Bun binaries embed bytecode/metadata that strip damages. Targets x86_64 and aarch64 glibc tarballs (Alpine/musl tarballs are omitted for Arch).scripts/update-packaging.sh: deterministic generator script substituting placeholders and validating checksums.
One-Time Bootstrap
1. Homebrew Tap (zgs225/homebrew-tap)
- Create a public repository on GitHub named
zgs225/homebrew-tap. - Create the
Formula/directory in that repository. - Place the initial
Formula/pi2d.rbgenerated byscripts/update-packaging.sh. - Commit and push to
main. - Users can now install with:
brew install zgs225/tap/pi2d
2. Arch Linux AUR (pi2d-bin)
- Register an account on aur.archlinux.org and add your SSH public key.
- Initialize the AUR package repository locally:
git clone ssh://aur@aur.archlinux.org/pi2d-bin.git - Generate the initial
PKGBUILDand.SRCINFOusingscripts/update-packaging.sh. - Copy
PKGBUILDand.SRCINFOinto the clonedpi2d-bindirectory, commit, and push:git add PKGBUILD .SRCINFO git commit -m "feat: initial release" git push origin master - Set up an SSH private key as a repository secret (e.g.
AUR_SSH_KEY) in GitHub repositoryzgs225/pi2dso the release workflow can push updates to the AUR repository.
Release-Time Bump Flow
During a release (via GitHub Actions workflow when a version tag vX.Y.Z is pushed):
- The release job builds binary tarballs for all 6 targets and generates
SHA256SUMS. - The packaging step executes:
bash scripts/update-packaging.sh --version <VERSION> --checksums dist-bin/SHA256SUMS --out build/packaging - The generated
build/packaging/pi2d.rbis committed and pushed toFormula/pi2d.rbin thezgs225/homebrew-taprepository. - The generated
build/packaging/PKGBUILDandbuild/packaging/.SRCINFOare committed and pushed to thepi2d-binAUR repository.
Local Regeneration
You can regenerate or preview packaging files locally at any time:
# Using a local SHA256SUMS file:
bash scripts/update-packaging.sh --version 0.1.6 --checksums dist-bin/SHA256SUMS --out build/packaging
# Using a directory containing release tarballs:
bash scripts/update-packaging.sh --version 0.1.6 --checksums dist-bin/ --out build/packaging
# Downloading checksums directly from a published GitHub release:
bash scripts/update-packaging.sh --version 0.1.6 --out build/packaging
The script performs validation:
- Checks that all 6 target SHA-256 sums are accounted for.
- Fails loudly on unknown targets or malformed checksums.
- Verifies that no unreplaced
@@...@@placeholders remain. - Generates a valid
.SRCINFO(usingmakepkg --printsrcinfoif installed, or an identical fallback).