Projects
A project is a durable namespace that groups a set of services. Its identity is its id — the key under theprojects: map in your manifest. Because a single
resident supervisor can host many projects at once — and a single config file
can declare many projects — projects are how systemg keeps unrelated (or
related) workloads cleanly separated inside one running daemon.
One supervisor, many projects. You can run a database stack, a web API, and a
batch of cron units as three independent projects under the same systemg
process. They share the runtime but keep separate state, logs, and status —
and you target each one by id with
-p/--project.Declaring a project
Projects live under theprojects: map, keyed by id. One file can declare many:
Top-level
services: with no project form a loose bundle — they still run,
and their state persists under projects/__loose__/. The older singular
project: block still parses (with a deprecation warning) for existing
single-project manifests; convert them with
sysg migrate. Prefer the projects: map
once more than one project shares a supervisor.-p/--project vs -c/--config
These two flags answer different questions, and knowing which to reach for is
the single most useful thing about projects.
The mental model:
-c is bring this file’s projects into the supervisor from
disk; -p is act on one project the supervisor already knows about.
-c <file> operates on the file as a whole. sysg status -c stack.yaml shows
every project the file declares, not just the first — the file identifies
“everything here,” and -p narrows to one.Every registered project stores the config path it was started from. That’s
why
-p alone is enough for later commands — systemg looks up the project’s
recorded manifest for you. This is what makes multi-project workflows
ergonomic: you register once with -c, then drive everything by -p.How -p relates to sysg restart
restart -p <id> is where the stored config path pays off:
--config is omitted, restart --project reuses the config path the
supervisor already recorded for that project and reloads it from disk. Manifest
changes are applied on reload:
- services added since the last load start
- services removed from the manifest stop
- changed commands take effect
-c again once the project has a known config path.
Pass -c explicitly only when you want to reload from a different file.
Qualified service selectors
Anywhere you name a service, you can qualify it with its project usingproject_id/service_name:
-p plus the bare service name. If you supply
both a selector prefix and -p, they must match.
When a service name is unambiguous — it exists in exactly one registered
project — you can drop the project qualifier entirely and systemg resolves it
for you. If the same service name lives in multiple projects, systemg
refuses and asks you to disambiguate with
-p.-p per command
-p/--project is accepted across the commands that act on running projects:

