Running it
On a workstation an application runs in the application form: the manager, yoke, writes what
should run, and the account's guardian starts a Core for it. Nothing needs root, and the manager starts
the guardian itself when none is answering.
The account's configuration
The manager needs an install root it may write into, and finds the Core on the PATH. Installing
Yoke gave your account one: the host's /var/lib/yoke/apps when Yoke was installed for the whole host
and you are in yoke-apps, or a root of your own named in ~/.config/yoke/manager.conf when it was
installed for your account alone (installing Yoke,
configuration).
The instance's sockets are under XDG_RUNTIME_DIR, which a desktop session sets to /run/user/<uid>.
A socket path has a ceiling of 107 characters, and the gate refuses a deployment that would produce a
longer one, naming the path, so a runtime directory set by hand has to be short.
A run from the working directory
yoke app run --from hello
hello-1 runs com.example.hello 0.1.0, an ephemeral instance; an interrupt stops it
from /home/you/hello, whose integrity is not verified
hello-1 is starting
hello-1 is observable
it says of itself: bundle.unverified at /home/you/hello
It runs the bundle as it is being written, with the same gate, the same Core and the same units as an
installed one, and verifies nothing: the instance says so about itself. It follows the instance until it
is interrupted, and the instance's record goes with it (instances).
A line such as confinement.no_cgroup_delegation is the host saying what it could not do, not a refusal.
From a second terminal, ask the greeter through the channel, with the client:
./ask hello-1 cli greeter greeter.hello world
ask: scope.withheld: greeter.hello is declared and not granted to that plugin
The refusal is the model working. Both Plugins were admitted, each with what it declares withheld, because nobody has granted anything. Grant the two capabilities this application uses, one per Plugin, and restart the two units so that each is admitted again — a grant reaches a unit at its next admission:
yoke plugin grant com.example.greeter query.hello.answer
previously not granted
effective at the unit's next admission
consequence greeter incarnation 1: still under the scope of its admission, until it is admitted again
yoke plugin grant com.yoke.system-info query.info.answer
yoke unit restart greeter
yoke unit restart system-info
./ask hello-1 cli greeter greeter.hello world
./ask hello-1 cli system-info system.info
hello, world
{"schema":1,"hostname":"workstation","os_name":"Arch Linux","os_version":"rolling","kernel_version":"6.18.57-1-lts","cpu_brand":"AMD Ryzen 7 PRO 5850U with Radeon Graphics","physical_cores":8,"logical_cpus":16,"total_memory_bytes":32919109632,"uptime_seconds":29393}
A grant names a Plugin, not a unit: every unit launched from it in this instance is covered. What is
not granted — the greeter's occurrence, system-info's stream — stays withheld, and the two units run
without it. yoke unit ask asks a unit the same question from the administrative side, without a
channel.
A command, from yoke
An operator tells a unit something with yoke unit command: the unit, the command's type, and its
payload on the standard input. The greeter's command is withheld until it is granted, as its question was:
echo -n hi | yoke unit command greeter greeter.set --input -
yoke: scope.withheld: the unit's grant does not cover the command greeter.set
yoke plugin grant com.example.greeter command.set.accept
yoke unit restart greeter
echo -n hi | yoke unit command greeter greeter.set --input -
./ask hello-1 cli greeter greeter.hello world
done greeting with hi
hi, world
The command's answer is the unit's acknowledgement, with the line the unit wrote; the Core carries the
payload and never reads it. Told an empty greeting, the greeter acknowledges the command failed, and
yoke exits as a refusal:
yoke unit command greeter greeter.set --input - < /dev/null
yoke: greeter failed the command: a greeting cannot be empty
Every command sent is in the instance's log: the operator's act, and unit.command.issued naming the
unit and the type, whoever sent it
(the operations):
yoke log query --unit greeter
2026-11-10T16:22:15.248790888Z greeter/2 [30] commanded greeter with the type greeter.set
2026-11-10T16:22:15.248796278Z greeter/2 [10] unit.command.issued unit:greeter {"command":"greeter.set"}
A grant lasts as long as the instance, and the run's instance lasts as long as the run: the next
yoke app run starts with nothing granted. An instance that lasts is the next step.
An instance
yoke app install out/com.example.hello-0.1.0.yoke
yoke instance create com.example.hello --name dev
yoke instance start dev
installed at /home/you/yoke/apps/com.example.hello/0.1.0
created dev, pinned to com.example.hello 0.1.0
dev should be running, and the guardian is told
yoke plugin grant com.example.greeter query.hello.answer --instance dev
yoke plugin grant com.yoke.system-info query.info.answer --instance dev
yoke unit restart greeter --instance dev
yoke unit restart system-info --instance dev
./ask dev cli greeter greeter.hello world
hello, world
Installing verifies the package and expands it; creating writes a record; starting asks the guardian
(installing, instances).
The grants are kept with the instance's state, so yoke instance stop dev and yoke instance start dev
keep them. A new version of the application is a new package: install it, then
yoke instance set-version dev <version> (updating and removal).
When something is wrong
| Look at | With | It says |
|---|---|---|
| the instances | yoke instance list | each with its state — observable, stopped, refused, failed |
| the units | yoke unit list, yoke unit show system-info | each unit's state, its condition, and what its plugin declared and was authorised |
| the log | yoke log query --unit greeter, yoke log follow | every event of the instance: states, admissions, a unit's health and occurrences |
| what the Core publishes | yoke core subscribe | a snapshot of the records, then each change as it happens |
| the guardian | $XDG_STATE_HOME/yoke/guardian.log — ~/.local/state/yoke/guardian.log by default | the gate's findings at a start, and every Core it ran |
| an interactive session | yoke shell | the same operations, typed one after another |
A grant is not in the log: a change of what a Plugin may do is kept as an audit record in the
Registry, beside the policy it changed, and yoke unit show reads what is granted now
(durable counterparts).
A refusal names its code and the field or path it is about, and every refusal found is reported,
not the first. 1 is a refusal and the same attempt will be refused again; 2 is a fault and may
succeed (the command line).
A unit started by hand, under a debugger, is admitted only by a run that asks for it:
yoke app run --from hello --admit-unlaunched relaxes the one stage that checks the Core launched the
process, and nothing else (admission).