Set up hr
Install hr, sign in to hardrev.dev, and give it your name.
hr runs on Linux and macOS. The installer downloads its own copy of Node.js, so all you need is curl or wget, and no admin rights. Installing hardware-studio? Skip this page. Its installer sets up hr for you.
1. Install
curl -fsSL https://hardrev.dev/install.sh | shhr goes in ~/.local/bin and everything else in ~/.local/share/hardrev. Before replacing anything, the installer checks both downloads against SHA-256 sums written into the script. If ~/.local/bin isn't on your PATH yet, it tells you so and prints a line for your shell's startup file that looks like this:
export PATH="$HOME/.local/bin:$PATH"Open a new terminal and check that it worked:
hr --version2. Sign in
You need a hardrev.dev account to push, to clone a private repository or to open a pull request, so sign in once on every machine you work from.
hr loginA browser tab opens on hardrev.dev with a short code. Check it against your terminal. Then approve. This machine gets a token of its own, listed as "hr on <machine>" under Settings → Tokens, and you can revoke it there whenever you like. The token sits in your user config folder with 0600 permissions. It never goes inside a repository, and hr never prints it.
Working over SSH? Open the address that hr login prints on your laptop or phone. Nothing ever connects back to the machine you're logging in from. Add --no-browser if you don't want hr to try opening a browser at all.
3. Tell hr who you are
Every commit records who made it. Set your name and email once per machine:
hr config set --global user.name "Your Name"
hr config set --global user.email you@example.comAnyone who can read a repository can see the name and email in its commits, so pick an address you don't mind showing, and if one repository needs a different identity, run the same two commands inside it without --global.
Update or remove
To update, run the install command again. To remove it:
curl -fsSL https://hardrev.dev/install.sh | sh -s -- --uninstallYour repositories, settings and login stay put. If you want this machine's token revoked as well, run hr logout before you uninstall.
Options
Put these in front of sh, as in curl -fsSL https://hardrev.dev/install.sh | HARDREV_BIN=~/bin sh.
HARDREV_BIN | where the hr command goes (default ~/.local/bin) |
HARDREV_HOME | where everything else goes (default ~/.local/share/hardrev) |
HARDREV_NODE | a Node.js 22.15 or newer to use instead of downloading one |
Scripts and CI
A CI runner can't click a button in a browser. Make a token under Settings → Tokens and hand it to hr instead, which checks it with the server before saving it.
hr login --token rev_pat_...
# or, without saving anything:
REV_TOKEN=rev_pat_... hr pushIf something goes wrong
Yourhr: command not foundPATHdoesn't include~/.local/bin. Add the export line from step 1 and open a new terminal.
There's an olderAnother hr comes first on your PATHhrsomewhere else and your shell finds it first. Delete it, or move~/.local/binto the front of yourPATH.
Step 3 got skipped.hr: no author identity- A 401 from the server means this machine's token was revoked. Run
hr loginagain.
Next: Use hr