Harthelm Docs
Getting started

Install hart

Get the hart command line, check the download and sign in.

Last updated 2026-10-19

hart is Harthelm's command line. It does what the console does, through the same API: workspaces, Sync and Run, logs, env vars and secrets, managed services and custom domains. Every command is in the hart reference.

In a workspace: nothing to install

Every workspace has hart on its path, and it already knows its console, team and workspace. Sign in once per workspace start:

Terminal
hart login --code

hart prints a link and a code XXXX-XXXX. Open the link, check the code and approve.

The key lives in the workspace

The key is stored in the workspace's home directory, which is emptied when the workspace restarts. While it runs, every editor of the workspace can read it, so run hart logout when you are done.

Inside a workspace, hart talks to the API over the cluster's internal network. The console's public address and hart curl to a dev URL do not work from there; reach your own services directly.

On your computer

hart ships with every Harthelm release as an archive per platform, for macOS and Linux on amd64 and arm64: hart_<version>_<os>_<arch>.tar.gz, next to a checksum file hart_<version>_SHA256SUMS. Ask your administrator where your installation keeps them. Take the release your installation runs: hart version warns when the two differ in major or minor version.

Download and check

Put the archive for your platform and the checksum file in one directory, then check the archive:

Terminal
shasum -a 256 --ignore-missing -c hart_*_SHA256SUMS

The line of your archive must end in OK.

Unpack and put it on your path

Terminal
tar -xzf hart_*_*.tar.gz hart
sudo install -m 0755 hart /usr/local/bin/hart
hart version

Sign in

Terminal
hart login --api https://console.example.com

hart opens the console in your browser. The approval page shows the computer, hart's version and the address the request came from; approve only a sign-in you started. Over SSH, or without a browser, add --code and approve on any device.

Check who you are

Terminal
hart whoami

It prints your user, the context, the API, and the default team and workspace.

What signing in creates

hart login creates a personal API key and saves it in a context: the installation, your key, and an optional default team and workspace. The key shows in the console under Account settings → API keys as "hart on <hostname>" (or the name you pass with --name). The context is named after the console's host.

The contexts file is ~/.config/hart/config.yaml, readable only by you. Switch and set defaults with hart ctx:

Terminal
hart ctx list
hart ctx use console.example.com -t 7 -w 42

hart ctx list never prints keys. 0 clears a default.

How hart picks its settings

Every command reads, in this order: its flags, then the environment variables HART_CONTEXT, HART_API, HART_TOKEN, HART_TEAM and HART_WORKSPACE, then the current context. The flags are in Global flags.

Terminal
hart ws list -t 7 -o json

Results go to stdout, messages and questions to stderr, so -o json pipes cleanly into jq. A question is answered "no" when stdin ends; --yes skips it.

Shell completion

Terminal
hart completion zsh > "${fpath[1]}/_hart"

bash and fish work the same way (hart completion). Team and workspace ids complete with their names.

Sign out

Terminal
hart logout

This deletes the key on the server and removes it from the contexts file. The context itself stays.

Next steps

On this page