OverviewFilesCommitsIssuesDocsReleasesPeers

pgh commits / 41c75e7

docs: document installing pgh + its file: deps from source
The README only covered the prebuilt bootstrap-tarball install. Add an "Install from source" section covering the whole picture a source build needs: the mandatory sibling package set (pgh-sidecar, pgh-runtime, hyper-deploy, hyper-overlay, hyper-svc, hyper-rooms, repos/hyperident), the load-bearing directory layout dictated by the file: dep graph, leaf-first npm install, putting a bare runtime on PATH, and the adopt-in-place + pgh init bootstrap. Cross-reference from docs/overview.md. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
41c75e7a53db0b25a29eb8867a29be5eb4228411
by plankatron <fleeky@gmail.com> · 2026-07-20T02:58:37.000Z

Changed files (2) +125 -0

README.md +117 -0
……@@ -60,6 +60,123 @@ Make sure `~/.local/bin` is on your `PATH`.
6060Other install forms (pinned version, local tarball, custom prefix) are in
6161[`docs/overview.md`](./docs/overview.md).
6262
63## Install from source
64
65The quick install pulls prebuilt bootstrap tarballs. To build from a git
66checkout instead — for hacking on pgh, running an unreleased branch, or a
67platform without a published tarball — you clone pgh **and its sibling
68packages**, because pgh consumes them as local `file:` dependencies rather
69than from a registry. There is no single `npm install pgh` — the daemon
70(`pgh-sidecar`) and the shared libraries have to be present on disk too.
71
72### 1. Prerequisites
73
74- **git** and **npm** (Node ≥ 18) to fetch and install. Node is used only as
75 the package manager; pgh itself runs on the **bare** runtime.
76- A **glibc Linux or macOS** host with a POSIX filesystem (see *Prerequisites*
77 above — unix sockets + symlinks are required, musl is unsupported).
78- No root needed; everything lands under `$HOME`.
79
80### 2. Clone the package set into one parent directory
81
82pgh's `file:` deps are relative paths, so the layout is load-bearing. Every
83package sits flat beside pgh, **except `hyperident`, which pgh references as
84`../repos/hyperident`** and therefore lives under a `repos/` subdirectory:
85
86```
87pgh-src/
88├── pgh/ # the CLI (this repo)
89├── pgh-sidecar/ # the always-on user daemon (required)
90├── pgh-runtime/ # OTA update engine (pgh dep)
91├── hyper-deploy/ # tree distribution layer
92├── hyper-overlay/ # per-file content overlay
93├── hyper-svc/ # hyper-svc UDS/RPC transport
94├── hyper-rooms/ # autobase room primitive (hyper-svc dep)
95└── repos/
96 └── hyperident/ # identity vault (pgh dep — note the repos/ nesting)
97```
98
99The `file:` edges that make this exact set mandatory:
100
101- **pgh** → hyper-deploy, hyper-overlay, hyper-svc, pgh-runtime, repos/hyperident
102- **pgh-sidecar** → hyper-deploy, hyper-overlay, hyper-svc, pgh
103- **hyper-deploy** → hyper-overlay
104- **hyper-svc** → hyper-rooms
105- **pgh-runtime** → hyper-overlay
106
107Clone all eight over the forge (HTTPS anonymous read; substitute your own
108mirror for `7rnx.net` if you have one):
109
110```bash
111mkdir -p pgh-src/repos && cd pgh-src
112
113for repo in pgh pgh-sidecar pgh-runtime hyper-deploy \
114 hyper-overlay hyper-svc hyper-rooms; do
115 git clone https://7rnx.net/git/$repo.git
116done
117git clone https://7rnx.net/git/hyperident.git repos/hyperident
118```
119
120(Already running a forge? `git clone punch://<serverKey>/<repo>` works too,
121once `git-remote-punch` is installed.)
122
123### 3. Install dependencies (leaf packages first)
124
125Install each package's deps in dependency order so the `file:` links resolve
126against already-populated trees. This also fetches the native prebuilds
127(`bare-runtime`, `sodium-native`, `udx-native`):
128
129```bash
130for pkg in hyper-overlay hyper-rooms hyper-svc hyper-deploy \
131 pgh-runtime repos/hyperident pgh pgh-sidecar; do
132 ( cd "$pkg" && npm install )
133done
134```
135
136`bare-runtime` drops a `bare` binary at `pgh/node_modules/.bin/bare`. pgh's
137launchers resolve `bare` from your `PATH`, so put one there — either install
138it globally (`npm i -g bare-runtime`) or symlink the one you just built:
139
140```bash
141ln -sf "$PWD/pgh/node_modules/.bin/bare" ~/.local/bin/bare
142```
143
144### 4. Register the source trees and initialise
145
146`pgh app adopt` writes a launcher that runs the app **in place** from your
147checkout (the launcher's `sourcePath` points back at the clone), so edits take
148effect on the next run with no rebuild step. Run the first adopt through bare
149directly, since `pgh` isn't on your `PATH` yet:
150
151```bash
152# bootstrap: adopt pgh itself (launcher → ~/.local/bin/pgh)
153./pgh/node_modules/.bin/bare ./pgh/bin/pgh app adopt ./pgh \
154 --name pgh --bin pgh
155
156# now `pgh` is on PATH — adopt the daemon
157pgh app adopt ./pgh-sidecar --name pgh-sidecar --bin pgh-sidecar
158
159# one-time machine setup: store, identity vault, start pgh-sidecar
160pgh init
161```
162
163Confirm it came up:
164
165```bash
166pgh app status # pgh-sidecar should be registered + running
167pgh --help # full command list
168```
169
170From here everything works as with a tarball install — `pgh app install`,
171`pgh publish`, the forge commands — except your `pgh` / `pgh-sidecar` run from
172source. To pick up upstream changes: `git pull` in the relevant repo,
173`npm install` if deps changed, then `pgh app restart pgh-sidecar`.
174
175> **Note — OTA and source installs.** An adopted source tree is *not* managed
176> by the release-registry, so the sidecar's autoupdate won't overwrite it (that
177> is the point). It also won't self-heal over the swarm. Update it yourself with
178> `git pull` as above.
179
63180## Common commands
64181
65182### install & run an app
docs/overview.md +8 -0
……@@ -45,6 +45,14 @@ sh scripts/install.sh --prefix ~/pgh-testing --bin-name pgh-new
4545`pgh init` after install bootstraps the local registries and starts
4646`pgh-sidecar`.
4747
48**Building from a git checkout** (hacking on pgh, unreleased branches,
49unpublished platforms) is a different path — pgh consumes its siblings
50(`pgh-sidecar`, `pgh-runtime`, `hyper-deploy`, `hyper-overlay`, `hyper-svc`,
51`hyper-rooms`, `hyperident`) as local `file:` deps, so you clone the whole set
52in a fixed layout, `npm install` leaf-first, then `pgh app adopt` each source
53tree. Full step-by-step is in the top-level
54[README → *Install from source*](../README.md#install-from-source).
55
4856## Canonical consumer
4957
5058[pear-git-v3](https://7rnx.net/git/repos/pear-git-v3) is the canonical