Layerbeat

Install and update

Install the layerbeat CLI on macOS or Linux, keep it up to date, or remove it.

Install

curl -fsSL https://layerbeat.com/install.sh | sh

The installer:

  • picks the build for your system: macOS (Apple silicon or Intel) or Linux (x86-64 or ARM64; a static build that runs on any distribution, Alpine included);
  • downloads it from layerbeat.com over HTTPS and checks it against the published SHA-256 checksums — nothing is installed if the check fails;
  • installs layerbeat in ~/.local/bin, with lb as a short alias;
  • tells you if ~/.local/bin is not on your PATH, and how to add it.

No curl? wget -qO- https://layerbeat.com/install.sh | sh works the same way.

Check it worked:

layerbeat --version
layerbeat status     # is the Layerbeat API reachable?

Options

Set these before sh:

VariableEffect
LAYERBEAT_INSTALL_DIRInstall somewhere else, for example ~/bin or /usr/local/bin
LAYERBEAT_VERSIONInstall a specific version instead of the latest, for example 1.0.0
curl -fsSL https://layerbeat.com/install.sh | LAYERBEAT_INSTALL_DIR=/usr/local/bin sh

Read it first

The script is short and readable. To look before running it:

curl -fsSL https://layerbeat.com/install.sh -o install.sh
less install.sh
sh install.sh

Windows

Use the Linux build inside WSL: open your WSL terminal and run the same command.

Update

Run the installer again. It replaces the binary in place and keeps your sign-in and settings.

curl -fsSL https://layerbeat.com/install.sh | sh

Shell completion

# zsh
mkdir -p ~/.zfunc && layerbeat completion zsh > ~/.zfunc/_layerbeat
# bash
layerbeat completion bash > ~/.local/share/bash-completion/completions/layerbeat
# fish
layerbeat completion fish > ~/.config/fish/completions/layerbeat.fish

For zsh, make sure ~/.zfunc is on your fpath before compinit in ~/.zshrc.

Where files go

PathWhat
~/.local/bin/layerbeat, ~/.local/bin/lbThe program and its alias
~/.config/layerbeat/config.jsonYour saved sign-in and settings, readable only by you
~/.config/layerbeat/known_hostsYour servers' pinned SSH host keys

XDG_CONFIG_HOME moves the configuration folder.

Uninstall

layerbeat logout                       # end the session on Layerbeat's side
rm ~/.local/bin/layerbeat ~/.local/bin/lb
rm -r ~/.config/layerbeat              # forget saved settings and host keys