Skip to main content

Managing Your Configuration

Everything the CLI subscribes and publishes to is set out in one plain text file, hypermass-config.yaml. It holds no secrets, so it can live in version control and be deployed like any other configuration.

Where it lives​

You can find it by running:

hypermass info

In the output, Hypermass Config Location is the folder holding two files:

  • hypermass-config.yaml: what to subscribe and publish to, and where the files go.
  • auth.yaml: your access key, if you have one - see Using an account.

By default the folder is %AppData%\hypermass on Windows, <home folder>/Library/Application Support/hypermass on macOS, and <home folder>/.config/hypermass on Linux (or $XDG_CONFIG_HOME/hypermass when that is set).

What's in it​

Here's a sample configuration:

base-directory: /home/you/hypermass
subscription-targets:
- key: _254gGE43g
target-directory: /home/you/hypermass/subscriptions/_254gGE43g
writer-type: file-per-payload
- key: _AABBCCDDE
target-directory: /home/you/hypermass/subscriptions/_AABBCCDDE
writer-type: file-per-payload
publication-sources:
- key: _XXYYZZ
target-directory: /home/you/hypermass/publications/_XXYYZZ
disposer-type: delete-on-success
  • base-directory: where hypermass subscribe and hypermass publish place new streams' folders.
  • target-directory: the stream's own folder. Each folder belongs to one stream, in one direction.
  • writer-type: file-per-payload, or folder-with-metadata for a folder per payload with its metadata.
  • disposer-type: delete-on-success, or move-on-success to keep published files in a complete folder alongside.

Applying changes​

Edit the file, then apply it to a running sync:

hypermass reload

See Reload for what happens to each stream.

Version control and deployment​

  • Keep hypermass-config.yaml in version control. To deploy, copy it into the configuration folder on the machine, then run hypermass reload (or start hypermass sync).
  • Paths are absolute, so keep the same folder layout on every machine that shares a file, or keep a file per machine.
  • Keep auth.yaml out of version control. Add the key on each machine with hypermass login, which also reads it from a pipe for automated setups, e.g. echo "$HYPERMASS_KEY" | hypermass login.
  • Scripts can rely on exit codes: subscribe, publish, reload and status exit with a non-zero code when something fails.

Backup and recovery​

  • The configuration is restored from version control, or from a copy of hypermass-config.yaml.
  • Where each stream got to is kept in a hidden .hypermass folder inside the stream's own folder. Restore the stream folders along with the configuration and each stream carries on from where it left off. A fresh folder starts from the stream's newest payload, and hypermass replay can fetch earlier ones.