Skip to main content
Version: Next

Scripts in bin/

Hostwarden is mostly instructions, but a few jobs are plain scripts in bin/. Each prints its usage with --help.

You run these​

  • hostwarden-init — turns the checkout into an operations install: memory/ becomes the workspace. --clone <url> joins a shared workspace instead, --remote <url> publishes this one to a private repository, and --local records that it stays on this machine (A shared workspace).
  • hostwarden-doctor — lists the tools Hostwarden runs on your workstation, what is missing, and the command to install it.
  • hostwarden-update — updates Hostwarden, or checks, pins or picks a release line (Updates and versioning).
  • hostwarden-backup — backs up or restores memory/ as one archive (Backup and restore).
  • hostwarden-mirror — fast-forwards your own mirror of Hostwarden to upstream and carries every tag; meant for a CI job (Your own mirror).
  • hostwarden-heinzel-takeover — copies your state out of a Heinzel checkout (Moving over from Heinzel).
  • hostwarden-map — draws the Mermaid maps under memory/maps/ and the overview page memory/README.md (Infrastructure maps).
  • hostwarden-password — stores the SSH password of a host that takes no key on this machine, or links it to a 1Password or Bitwarden item, and checks or forgets it; never prints one (Password logins).
  • hostwarden-identity — starts and loads Hostwarden's own SSH agent, prints the line you add to a host, and checks that the agent holds the key; never prints a private key (Hostwarden's own SSH key).
  • hostwarden-agent — shows which local SSH agent signatures use, checks that it is available, or runs one command with it (Choose your local SSH agent).

These run for you​

  • hostwarden-migrate — brings local state up to date after an update, such as renamed overrides; the session start and hostwarden-update run it, and it is safe to run by hand.
  • hostwarden-ssh-config — writes memory/ssh_config, the file every SSH call passes; the session start runs it.
  • hostwarden-askpass — hands ssh the password of a host that takes no key, and nobody else; ssh runs it (Password logins).
  • hostwarden-sync — pulls the workspace at session start and commits what a session wrote; its commit also redraws the maps.
  • hostwarden-impact — works out what a disruptive step on a host reaches beyond it, from memory alone, and announces it to other sessions (What a reboot would hit).
  • hostwarden-fleet-run — the nightly, unattended housekeeping of an operations host, on a timer you set up (An operations host).
  • hostwarden-wrap — wraps Markdown at 80 columns, as every file in Hostwarden and in the workspace is written. A copy the workspace keeps byte for byte stays as it is: a master under files/, the sources under src/ but their README.md, a note, a host's heinzel-memory.md.

For working on Hostwarden​

Tools that only developing Hostwarden needs live in scripts/, not here, and a checkout that runs Hostwarden never calls them:

  • scripts/lab.sh — disposable Linux containers and VMs to try a command on instead of guessing its syntax (Testing a change).