nerves_hub_cli v0.7.2 mix nerves_hub.device

Manage your NervesHub devices.

create

Create a new NervesHub device. The shell will prompt for information about the device. This information can be passed by specifying one or all of the command line options.

mix nerves_hub.device create

Command-line options

  • --identifier - (Optional) The device identifier
  • --description - (Optional) The description of the device
  • --tag - (Optional) Multiple tags can be set by passing this key multiple times

update

Update values on a device.

Examples

List all devices

mix nerves_hub.device list

Update device tags

mix nerves_hub.device update 1234 tags dev qa

delete

Delete a device on NervesHub

mix nerves_hub.device delete DEVICE_IDENTIFIER

burn

Combine a firmware image with NervesHub provisioning information and burn the result to an attached MicroSD card or file. This requires that the device was already created. Calling burn without passing command-line options will generate a new cert pair for the device. The command will end with calling mix firmware.burn.

mix nerves_hub.device burn DEVICE_IDENTIFIER

Command-line options

  • --cert - (Optional) A path to an existing device certificate
  • --key - (Optional) A path to an existing device private key
  • --path - (Optional) The path to put the device certificates

cert list

List all certificates for a device.

mix nerves_hub.device cert list DEVICE_IDENTIFIER

cert create

Creates a new device certificate pair. The certificates will be placed in the current working directory if no path is specified.

mix nerves_hub.device cert create DEVICE_IDENTIFIER

Command-line options

  • --path - (Optional) A local location for storing certificates

Link to this section Summary

Link to this section Functions

Link to this function

burn(identifier, opts)
burn(String.t(), keyword()) :: :ok

Link to this function

cert_create(org, identifier, opts, auth \\ nil)
cert_create(String.t(), String.t(), keyword(), nil | NervesHubUserAPI.Auth.t()) ::
  :ok

Link to this function

cert_list(org, identifier)
cert_list(String.t(), String.t()) :: :ok

Link to this function

create(org, opts)
create(String.t(), keyword()) :: :ok

Link to this function

delete(org, identifier)
delete(String.t(), String.t()) :: :ok

Link to this function

list(org, opts)
list(String.t(), keyword()) :: :ok

Link to this function

render_help()
render_help() :: no_return()

Link to this function

run(args)
run([String.t()]) :: :ok | no_return()

A task needs to implement run which receives a list of command line args.

Callback implementation for Mix.Task.run/1.

Link to this function

update(org, identifier, data)
update(String.t(), String.t(), [String.t()]) :: :ok