nh is the command-line interface for NervesHub and NervesCloud. It is a single binary written in Go, so it needs no Elixir toolchain. It manages organizations, products, devices, firmware, archives, deployment groups and signing keys, and generates the X.509 certificates devices authenticate with.
Install
- Homebrew (macOS and Linux)
- Prebuilt binary
- From source
Check the installation
Print the installed version:nh can reach it. This needs no sign-in.
Tools nh calls
Most commands need nothing else installed. Signing depends on the firmware format.fwup is not needed when you pass --skip-signing. Without it, nh firmware upload --skip-signing warns that it cannot read the image’s metadata and uploads the file as it is. nh archive upload --skip-signing warns and leaves the metadata check to the server.
Migrate from the Elixir CLI
If you used the Elixirnerves_hub_cli, import its settings and keys:
nh migrate reads the old CLI’s data directory (~/.nerves-hub, or $NERVES_HUB_HOME) and copies into nh’s data directory:
- Your saved API URI, organization, product and API token.
- Your signing keys, from
keys/<org>/in the old directory tokeys/<org>/in the new one.
The old directory is only read, never changed. Signing keys are re-encoded, not decrypted, so you need no key password and password-protected keys keep theirs. Existing
nh settings and keys are left alone unless you pass --force, so you can run it more than once.
After migrating, run nh user whoami to confirm the token still works. If it does not, sign in again with nh user login.

