pi-register
aien-dev/pi-register
Brought by drakestapleton
pi-register / README.md
| 1 | # pi-register |
| 2 | |
| 3 | A register of the services on a Linux server (Debian/Ubuntu with systemd), so one command tells you what the machine runs and why. |
| 4 | |
| 5 | Supports [Sovereign Intelligence (SI)](https://github.com/aien-dev/sovereign-intelligence), the whole system. AienOS is the operating-system layer; Aienux is the AienOS kernel. This is an operations tool, not part of the system itself. |
| 6 | |
| 7 | The checked-in `register.toml` is a generic Debian/Ubuntu example, not an inventory of a deployed machine. |
| 8 | |
| 9 | Fields: name, purpose, unit, category, owner, port, depends_on, files, secrets (a path only, never the secret), health (a shell command that exits 0 when healthy), boot, notes. Required: name, purpose, unit, category, owner, boot. The rest are optional. A `unit` without a suffix means `<unit>.service`; write `.timer`, `.socket` and so on in full. `depends_on` and `files` are recorded and shown, not enforced. |
| 10 | |
| 11 | ## Commands |
| 12 | - `pi-register status`: table of every service, whether its unit is active, enabled at boot, and healthy. |
| 13 | - `pi-register show <name>`: everything known about one service. |
| 14 | - `pi-register start|stop|enable|disable <name>`: wraps systemctl; unknown names are refused. |
| 15 | - `pi-register check`: every registered unit must exist; enabled service units not in the register are listed as UNREGISTERED (base-system units are ignored via a built-in list; timers and other unit types are not scanned for unregistered ones). Exits with an error if any problem is found. |
| 16 | - `pi-register doc`: prints a Markdown page describing the machine. |
| 17 | |
| 18 | Register location: `--register <path>`, else `/etc/pi-register/register.toml`, else `./register.toml`. |
| 19 | |
| 20 | ## Private deployment configuration |
| 21 | |
| 22 | For a new machine, copy the example to the ignored `register.local.toml`, restrict it to mode 600, and edit it to describe that machine. Invoke it explicitly: |
| 23 | |
| 24 | ```sh |
| 25 | install -m 600 register.toml register.local.toml |
| 26 | pi-register --register register.local.toml doc |
| 27 | ``` |
| 28 | |
| 29 | `register.local.toml` is not an automatic lookup location. Use `--register register.local.toml` in local scripts and operator commands. For an installed deployment, keep the real register at `/etc/pi-register/register.toml` (mode 600, owned by the intended operator); the existing default lookup then needs no command changes. |
| 30 | |
| 31 | **Existing deployments:** before updating a checkout, preserve the complete real register outside git with mode 600. Restore it as `register.local.toml` and migrate any caller that explicitly names the checkout's `register.toml` to `--register register.local.toml`, or install the preserved register at `/etc/pi-register/register.toml` and remove that explicit flag. Do not replace a deployed register with the public example. Preserve all health commands, boot values, paths and targets in the private copy; inspect `doc` output privately to confirm it loads. `doc` reads configuration only and does not execute health commands or call systemd. |
| 32 | |
| 33 | Never commit local service inventories, home paths, internal hosts, network targets or secrets. The public example intentionally has no health command; adapt it before operating services. This migration changes the example only, not CLI lookup semantics. |
| 34 | |
| 35 | Build: `cargo build --release`. `pi-register` itself makes no network calls; the `health` commands in the register run in a shell and may. License: AGPL-3.0-or-later (see LICENSE). |
| 36 | |
| 37 | ## Human-Directed Agentic Engineering |
| 38 | |
| 39 | Development follows Human-Directed Agentic Engineering (HDAE): humans define goals, |
| 40 | architecture, constraints, acceptance criteria, and stopping points; agents implement, |
| 41 | execute checks, diagnose failures, and revise within those boundaries. Human review |
| 42 | retains responsibility for claims, acceptance, and release decisions. |
| 43 | |
| 44 | For the documented method and a systems-software case study, see Gregory M. Kurtzer, |
| 45 | *Ginux: Building an Independent Kernel That Runs Linux Userspace through Human-Directed |
| 46 | Agentic Engineering* (2026), https://doi.org/10.5281/zenodo.23682548. |