nervur
v0.39.10
Published
Nervur's one name: the nervur command, on the installer of the host it is laid on. 0.x, unstable.
Readme
nervur
Nervur's one name. Software becomes organisms: one for every person, group and agent, each on a device of its own, all
speaking Quo. This package gives the nervur command, by which a person lays and asks their organism.
0.x is unstable. Every version before 1.0.0 may change its commands. Each version of nervur is a release of
Nervur, whose entry in the changelog, CHANGELOG.md, tells what it changed and what breaks, and names the packages it
moved: every other package keeps a version of its own and moves only where it changes.
Your first day
From a machine with nothing to an organism you own, a faculty of yours running in a repo of yours, an owner on another device, a backup, a stop and a start. Each block is typed as it stands, in one shell.
Node and npm
Nervur runs on Node 22.23.5 or any newer, with its npm. A machine with none takes it from
nodejs.org: the installer on a Mac or Windows, the Linux binaries on Linux and a
64-bit Pi, or your distribution's own package of Node. The one-command scripts of this package's install/ folder lay a
pinned Node of their own, for x64 and arm64, and are served by no address yet.
Every Nervur package stands on npm, and no token is needed to read them. Where your Node belongs to root, make npm's
global folder your account's own first, and put its bin on your PATH: npm config set prefix ~/.nervur/installer,
then export PATH="$HOME/.nervur/installer/bin:$PATH".
npm install -g nervurInstall, own and ask
nervur install lays your organism in ~/.nervur/organism/, as a service of your account that starts it again after
any end: on a Mac a launchd agent, started when the account logs in; on Linux a systemd user service, started at boot
where the account lingers (the install tries to turn that on); on Windows a scheduled task, started at boot and checked
every minute. Its log is ~/.nervur/organism/organism.log. An account holds one organism: to try Nervur beside one that
stands, lay a test's under the temporary folder, nervur install --home <folder> --port <port>, then name it by
--home in every command (install-machine, A second organism on the machine): each block below is typed for the
organism at ~/.nervur, so add it to each. Where no person types at the install, a script or an agent, name
--boot file, since present reads its passphrase from the terminal.
How it gets its boot key at each boot, its boot mode, is settled at the first install, by whether a person sits at the machine:
| Host | By default | Its price |
| --------------------------------------------------------------------- | ----------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------- |
| a Mac, Windows, Linux inside a graphical session | present: it asks a passphrase, twice | no one at the machine can start the organism without it: after every boot it waits until you give it by nervur start |
| Linux with no graphical session: a server, a Pi, a machine over ssh | file: it asks nothing and lays boot.key beside it | it boots by itself, and whoever reads ~/.nervur/organism/boot.key owns the organism: keep a copy off the machine, since a backup opens by it |
The install says the mode it took and its price. Another is your word, --boot <mode>, at the first install or any
later one, which moves the organism into it: present; file; keyring, your login keychain or Secret Service;
hardware, sealed to a Mac's Secure Enclave; remote, keepers over Quo, each --keeper <invitation-file>. So on a
server, nervur install --boot present asks a passphrase in place of boot.key. Whoever is present at the account owns
the organism, and nervur state is its brain answering:
nervur install
nervur stateAn organism takes its package from the registry your npm names, npm's own by default, and never moves itself: a
version lands only where you name it, by nervur update on the machine or an owner's upgrade from afar. --channel
<registry> names another registry for one install or update, a mirror of your own, for that act alone.
nervur ask brain describes what the brain takes, and nervur help prints every command.
A faculty of yours
A helper to read one field of an answer given as JSON, used below:
field() { node -pe "JSON.parse(require('fs').readFileSync(0,'utf8')).result$1"; }A repo is made by one command: nervur repo lays the jailer where none stands, the lobe nervur.repos that alone runs
git, already asked its setup at your disk's folder, creates a repo lobe on the faculty nervur.repo wired to it and to
the organism's core, grants it the folder you name, and begins it by its init, waiting for the job's end as --follow
does and exiting on its code. --starter is your word to begin it with one small starter: a package.json naming its
version and no script, a .gitignore, and one faculty named after the repo, com.example.first here, its faculty.js
and versions.json, whose publisher is yours to change. Without that word a repo begins empty, for your own first
commit to fill. It answers the repo lobe, and asked again for a folder a repo lobe holds it answers that lobe and
makes no second.
repo=$(nervur repo first --starter --json | field .lobe)What you change enters by commit, its gate run first; a faculty's new text takes a new version, with its digest in
versions.json.
nervur lobe "$repo" commit '{"message":"a first change of mine","files":{"notes.txt":"mine\n"}}' --followThe library takes the faculty the repo told by add, and the brain's create runs it, answering its method:
offer='{"kind":"faculty","label":"com.example.first","version":"0.1.0","road":"'"$repo"'"}'
hello=$(nervur lobe library add "$offer" --json | field .digest)
lobe=$(nervur ask brain create '{"faculty":"'"$hello"'"}' --json | field .id)
nervur lobe "$lobe" helloAn owner on another device
Your organism invites an owner from afar, as your laptop owning your server: the brain's invite, whose waits is how
long it waits to be accepted and lives how long the relation lives then, null for no end. It prints the invitation
on its first line and how it is accepted after it; keep what it printed in a file:
nervur ask brain invite '{"waits":null,"lives":null}' > invitation.txtThe invitation names the addresses the organism is reached at, on this machine alone unless its install named it public,
nervur install --public <host>, with that port open. Carry the file to the other device, whose own organism accepts it
under a name of yours, here server, and asks it from then on by that name:
nervur accept server --text invitation=invitation.txt
nervur ask server statenervur relations lists the names accepted, and nervur forget server ends one.
A backup and its restore
nervur backup carries the organism off to a file of yours, which it never writes over, and says how it opens:
nervur backup first.backupBefore you lose anything, keep what opens it: under a passphrase, keep the passphrase and the salt the backup said;
under boot.key, keep a copy of it off the device. Lose them with the device and the organism is lost. A
backup can name keys of your own as well: the brain's backup takes keys, public keys as nervur arrive shows them,
whose secrets open that backup as the boot key does and survive a rewrap, so a secret can stay on paper or with a
partner. On a device with no organism, a restore is a new life under that device's own boot key: its lobes stand, and
every relation it gave is dropped, to be given again or ended. A backup under a passphrase names its salt, and the
restore asks the passphrase; one under boot.key names none, and the restore asks the line the copy of boot.key
holds; then the new device asks what its own mode asks, as a first install does:
nervur restore first.backup <salt>
nervur restore first.backupA backup carries the self, never a repo's bytes: a repo with no other lobe stays behind on the device, and
nervur backup names each one first. Keep a lobe of it on another organism and it comes back from there.
A stop and a start
nervur stop stops the organism, and nervur start starts it again, by its service, asking the passphrase in the
present mode. After a reboot the service starts a present organism, which waits for its passphrase: nervur state
says so, and nervur start gives it. A file organism starts by itself.
nervur stop
nervur startWhat this package is
This command is the Node installer's, for a Mac, Linux, a 64-bit Pi and Windows. The browser's port stands in a package
of its own, @nervur.org/installer-browser; there a repo is reached from afar, and this page's commands are the Node
installer's. An edge is laid by hand with wrangler, or by a pilot you write; the Node installer's package carries its
cargo.
It holds no code of Nervur's parts: its command runs the installer of the host it is laid on,
@nervur.org/installer-node on Node, which takes @nervur.org/genome and holds the organs. nervur install lays an
organism in the account's home, or, as nervur update [<version> [<digest>]], moves it to a version of the channel: it
stops the organism at once, so a run going is lost, then tries the new version and keeps it, or goes back to the old one
if it fails; nervur start boots it, and nervur state asks it through its console; nervur alone prints every
command.
Running a faculty you hold
A faculty's text in a file enters by your own hand, and nothing runs until you create a lobe on it. This answers its digest:
nervur lobe library add "$(node -p "JSON.stringify({source: require('fs').readFileSync('faculty.js', 'utf8')})")"nervur ask brain create '{"faculty": "<digest>"}' makes the lobe, whose wires you name by wiring. Code with no
evidence is shown as unproven, never refused.
nervur state names the digest of what runs: each lobe's faculty, each organ's half, and genomeDigest and
installerDigest, each the SHA-256 of the JSON of every file of its package as [path, sha], sorted by path, which
anyone works out from a release unpacked.
Moving to another device
A move carries the organism whole, its relations with it, and stops the copy it leaves. On the new device,
nervur arrive draws a key and shows its public half. On the old device, nervur move <key> [file] seals the organism
to that key alone, takes the file and stops it for good; it names what the body held, which stays behind, and from then
its service does not start it, and nervur state says why. An owner from afar does the same by the brain's move and
backupPiece. Carry the file across, and nervur restore <file> on the new device opens it, once, and forgets the
secret. While the new copy never ran, nervur stay on the old device undoes the stop; the old copy cannot tell whether
it did, so that is your word.
A move, as a backup, carries the self, never a repo's bytes: nervur move names each repo that stays behind first.
Licence
FSL-1.1-ALv2 (the Functional Source License), Bookarest Digital SRL. Nervur takes no contributions, merge requests or issues; a flaw of security goes to [email protected], privately.
