@projectpac/cli
v0.6.0
Published
Part of PAC: @projectpac/cli.
Readme
pac
The terminal UX for one node.
A UX is the one plugin kind the host does not load: this is a client of the control API, with the principal's token, and it holds no flow and derives no caller. Two things it does that the API cannot, because they are about the machine rather than the node: it creates a node's home on first run, and it starts and stops the two processes a node is.
pac setup --command pi # a home, an identity, a spine, an executor
pac start # the daemon, and the worker beside it
pac status # what is running, and what it says it is
pac join https://… # a transport, somewhere to be found, and the meta flow
pac capture agent-history # let it read what you have already done
pac plugins add --package @projectpac/source-web-exports --config exports.json
pac plugins ls # and whether each came up
pac sources # what this node holds and could stake
pac intent "find the artists we both listen to" # a peer and this node write the flow
pac intents <task> # where it has got to
pac results # what every flow produced
pac api GET /flows/meta/board # any route an installed flow servesThe line between the first two and the rest is the whole shape of this command:
setup makes what a node is, and everything after it is a request to one that
is already answering. join and capture are plugin installs with a name -- join the wire, the
directory, and the meta flow with what it runs on -- so each stands alone -- capturing next week is the same command it would have been
during onboarding, and plugins rm takes either back out.
State lives in ~/.pac (override with PAC_HOME):
pac.json the api's port and the token, readable by its owner only
data/ entry files, and one folder per plugin -- core and not -- for
whatever that plugin keeps: its db, its keys, its files
pac.log both processes' output
daemon.pid what 'pac stop' stops
worker.pidFor a browser instead of a terminal, pac ui serves one page that reads the
same node -- see web/.
pac api is the escape hatch, and it is deliberate: everything a UX
can do is a route, so a route this CLI has no verb for is still one command
away. An installed flow's own routes are reached the same way, under
/flows/<id>/.
