Cubicle

Install the CLI

Install the cubicle CLI on macOS or Linux (x64 or arm64) with the one-line installer or by hand with a SHA-256 checksum, add the optional root tunnel for SSH and the private network, upgrade, uninstall and log in.

The cubicle CLI manages Boxes, access and SSH from your computer. It runs on macOS and Linux, on x64 and arm64 processors. Windows is not supported.

Install with the script

curl -fsSL https://api.cubicle.sh/downloads/install | sh

The script does the following:

  1. It picks the bundle for your system and processor, and downloads cubicle-<os>-<arch>.tar.gz with its .sha256 checksum from https://api.cubicle.sh/downloads/.
  2. It verifies the checksum. On a mismatch it stops with "Checksum mismatch; the download may have changed during an update. Try again."
  3. It runs the bundle's install.sh, which lists what it will do and asks Install the Cubicle CLI? [y/N].
  4. It offers the optional tunnel, then prints Run `cubicle login` to sign in.

Run it as your normal user. The CLI needs no administrator rights, and the installer refuses to run as root; only the tunnel uses sudo.

Installer flags

Pass flags to the installer after sh -s --:

curl -fsSL https://api.cubicle.sh/downloads/install | sh -s -- --yes --no-tunnel
FlagEffect
--yesInstalls the CLI without asking. Without a terminal to ask on, the installer cancels unless you pass it.
--tunnelAlso installs the tunnel without asking first. sudo still asks for your password.
--no-tunnelSkips the tunnel offer.

Without --tunnel or --no-tunnel, the installer offers the tunnel when it has a terminal, and otherwise prints how to add it later.

Install by hand

Download the bundle and its checksum, verify, extract and run its installer. The bundles are cubicle-darwin-arm64, cubicle-darwin-x64, cubicle-linux-arm64 and cubicle-linux-x64.

curl -fLO https://api.cubicle.sh/downloads/cubicle-darwin-arm64.tar.gz
curl -fLO https://api.cubicle.sh/downloads/cubicle-darwin-arm64.tar.gz.sha256
shasum -a 256 -c cubicle-darwin-arm64.tar.gz.sha256
tar -xzf cubicle-darwin-arm64.tar.gz
cd cubicle-darwin-arm64
./install.sh

Use cubicle-darwin-x64 on an Intel Mac.

install.sh takes the same flags as the script: --yes, --tunnel and --no-tunnel.

What gets installed

PathContents
~/.local/share/cubicle/cliThe bundle: the CLI, its own Node.js runtime, the cubicle-network WireGuard binary, install.sh, uninstall.sh and third-party licenses.
~/.local/share/cubicle/cli-previousThe previous installation, kept when you upgrade.
~/.local/bin/cubicleA link to the CLI.
~/.config/cubicle/Your login details and the private network log, written when you use the CLI. See Files the CLI writes.

When XDG_DATA_HOME is set, the bundle goes to $XDG_DATA_HOME/cubicle/cli instead. The CLI needs no system Node.js, Homebrew or WireGuard package.

Add ~/.local/bin to your PATH

When ~/.local/bin is not on your PATH, the installer prints:

Add /home/you/.local/bin to your PATH, for example in ~/.zshrc or ~/.bashrc:
  export PATH="$HOME/.local/bin:$PATH"

Add the export line to your shell's startup file and open a new terminal. When another cubicle comes first on your PATH, the installer prints which one it is.

Verify the installation

cubicle version

It prints the installed version and build target, and the API that cubicle login uses:

cubicle <version> (darwin-arm64)
default API: https://api.cubicle.sh

Add the tunnel

The tunnel is an optional network helper that runs as root. You need it for cubicle connect, cubicle ssh and for reaching Boxes at their private IP addresses or <box>.<org>.cubicle.internal names. Logging in, managing Boxes, running commands and taking snapshots work without it.

cubicle tunnel install

The command asks first, then installs the helper with sudo. cubicle tunnel status prints whether the tunnel is installed and connected, and cubicle tunnel uninstall removes it and keeps the CLI. Install the tunnel explains what the helper does and what it needs on Linux and macOS.

Upgrade

Run the installer again:

curl -fsSL https://api.cubicle.sh/downloads/install | sh

It replaces ~/.local/share/cubicle/cli and keeps the version it replaced in cli-previous. When the tunnel is installed, it asks Update the tunnel? [y/N] so that the root copy matches the new version.

Uninstall

cubicle logout
~/.local/share/cubicle/cli/uninstall.sh

When XDG_DATA_HOME is set, the uninstaller is $XDG_DATA_HOME/cubicle/cli/uninstall.sh.

cubicle logout is optional. It signs you out and removes your stored login. The uninstaller then does the following:

  • It removes the tunnel first when it is installed; sudo asks for your password.
  • It removes the CLI, its previous version and the ~/.local/bin/cubicle link.
  • It keeps your stored login (unless you logged out), ~/.config/cubicle/ and the device identity in /var/lib/cubicle/cli.

Log in

cubicle login

The command prints a Dashboard link and a code to approve. See Log in to the CLI.

On this page