Client, on your machine
Open https://cm.hl.bramlabs.io/ and copy the one command it shows:
curl -fsSL https://cm.hl.bramlabs.io/install.sh | sh
cloudmorrow login -u bram
cloudmorrow # opens the terminal app
It needs Python 3.11+ and nothing else: it makes a venv under
~/.local/share/cloudmorrow, links cloudmorrow, cm and cloudmorrow-agent into
~/.local/bin, and points the CLI at the server. As root it installs into
/opt/cloudmorrow and /usr/local/bin instead. pipx install 'cloudmorrow[tui]'
works too.
cloudmorrow login also registers the machine as an agent and starts it under
your account — see the local agent. --no-agent skips
that if you would rather not.
Config lives in ~/.config/cloudmorrow/config.toml, the token in
credentials.json beside it (mode 600).
Keeping it up to date
cloudmorrow update
That is the install command without the copy and paste: it asks the server what
it is handing out, installs that wheel over this copy, and restarts the local
agent so it stops running the code it started with. --check shows what would
be installed and changes nothing; --no-agent leaves the service alone.
Update the server first — that is what publishes the wheel this pulls:
git push # the code exists
cloudmorrow update server # the server pulls, reinstalls, restarts, republishes
cloudmorrow update # then follow it on each machine
On the machine you deploy from, cloudmorrow update all is those last two in
one word: it deploys the server, waits for it to come back, and then installs
the wheel that deploy just published. It stops if the deploy does, so nothing
is installed here on top of a deploy that did not land. The flags of both
halves are there — --branch, --ssh, --host, --wait, --no-agent,
--force.
Every deploy is a tagged release, so the client can tell: when the server
publishes the version this copy already is, cloudmorrow update says it is up
to date and touches nothing — no reinstall, no agent restarted onto the code
it is already running. Otherwise it installs and says what it went from and
to. --force reinstalls anyway, for a redeploy of the same tag.
From a git checkout, cloudmorrow update refuses and tells you to git pull
instead, rather than pip-installing a wheel over your working copy.
Removing it
cloudmorrow uninstall
The reverse of the install, in the reverse order: it strikes this machine's
agent off the server, stops and removes the agent service, deletes
~/.config/cloudmorrow (the config, the token and the project links), the
backups the agent made (--keep-backups leaves them), the cloudmorrow, cm
and cloudmorrow-agent links, and last the venv under
~/.local/share/cloudmorrow. It lists all of that and asks first; --yes
skips the question. Nothing on the server is deleted except the agent record
— your notes, projects and secrets are the server's. From a development
checkout it leaves the checkout and its venv alone. The desktop app's entry
in the applications menu goes with it.
The command line
Everything reads cloudmorrow RESOURCE ACTION, with singular resource names:
cloudmorrow secret list | get | set | remove | import | export | run | vaults
cloudmorrow agent list | run | jobs | enroll-token
cloudmorrow share list | show | add | with | unshare | leave | move | remove | mount | unmount
cloudmorrow config show | set
cloudmorrow update [server | all]
cloudmorrow backup status | now | list | show | restore | delete
cloudmorrow snapshot take | list | show | bundle | attest | guest | guests | revoke | withdraw | verify
cloudmorrow attest sign | verify | key
cm is the same command in two letters — cm notes list, or cm on its own
for the terminal app — for the hundredth time in a day. An update never overwrites a
cm that is somebody else's program.
No invented syntax, no arrows. Data goes to stdout, status goes to stderr,
and -v/-e are overrides on commands that have a sensible default without
them. The old plural names (cloudmorrow agents list) still
work, quietly, so old muscle memory and old scripts do not break — except
cloudmorrow notes and cloudmorrow secrets, which are the Notes and
Secrets Quills' now (cm notes list, cm secrets list, through the kit);
cloudmorrow secret is as it always was.
From docs/MANUAL.md in the Cloudmorrow repository. Something wrong? A pull request there fixes it here.