unix init — a small process manager written in Go, inspired by zinit.
uinit runs as a daemon that loads a list of processes from a YAML file and exposes them over a Unix socket. A CLI client talks to the daemon to inspect them.
This is a learning project for exploring Linux processes, signals, and Go systems programming.
git clone https://github.com/mahmoud-emad/uinit.git
cd uinit
make buildRequires Go 1.26+. The binary is written to ./uinit.
Write a config file:
# processes.yaml
processes:
- name: python-server
cmd: python3 -m http.server
- name: ping
cmd: ping 8.8.8.8Start the daemon:
./uinit init processes.yamlIn another terminal, list the processes:
./uinit listPROCESS STATUS PID UPTIME COMMAND
python-server ● running 45609 7s python3 -m http.server
ping ● running 45610 7s ping 8.8.8.8
sleep-five ○ exited 45611 5s sleep 5
Inspect one of them, or read what it has written:
./uinit inspect ping
./uinit logs pingProcesses can also be stopped and started again while the daemon runs:
./uinit stop ping
./uinit start pingThe daemon keeps its state under /tmp/uinit: it listens on
/tmp/uinit/uinit.sock, and each process writes its stdout and stderr to
/tmp/uinit/logs/<name>.log.
make lint # gofmt, go vet, staticcheck, errcheck
make test # go test -race ./...
make dist # cross compile into dist/CI runs the same three on every push and pull request. Tagging v* builds the
binaries and publishes them to a GitHub release.