LogoLogo
main
main
  • Introduction
  • High level architecture
  • Public key infrastructure
  • Terminology
  • Tutorials
    • Quickstart
    • Production Setup with NervesKey
  • Nerves Hub
    • Setup
      • Add NervesHub to your project
      • Connecting to your environment
      • Firmware signing keys
      • Products
      • Devices
      • Firmware
      • Deployments
    • Command-line tools
    • Managing organizations and products
    • Device management
    • HTTP API
    • Device WebSocket
  • Nerves Key
    • Introduction
    • NervesKey for Raspberry Pi
    • Private keys and certificates
    • General NervesKey storage
    • Provisioning in Elixir
    • Nerves integration
    • NervesHubLink integration
    • MQTT integration
Powered by GitBook
On this page
  • Installation
  • Setup
  • Try it out

Was this helpful?

  1. Nerves Hub

Command-line tools

Introducing the NervesHub command-line tools aka. the CLI.

PreviousDeploymentsNextManaging organizations and products

Last updated 8 days ago

Was this helpful?

Installation

The easiest way to install is via .

brew install nerves-hub/tap/nh

The second easiest is via curl:ing a shell script.

curl --proto '=https' --tlsv1.2 -fsSL https://raw.githubusercontent.com/nerves-hub/nerves_hub_cli/master/install.sh | sh

More details and alternative installation methods are available in .

Setup

To set your NervesHub instance to use with the CLI, use this command, replacing the specific URL with your instance:

nh config set uri "https://manage.nervescloud.com/"

You need to be authorized with the NervesHub instance, you get that via:

nh user auth

If you want to pass fewer arguments on later calls we can recommend setting up some environment variables in your shell. Usually that means ~/.bashrc or ~/.zshrc. The most commonly needed is the org:

NERVES_HUB_ORG="my-org-name-here"

Try it out

You can start with the help function which gives you a lot of your options:

nh

To list devices for example:

nh device list --org my-org --product my-product

This should get you started with the CLI.

Homebrew
the repo