nerves_hub_cli v0.9.0 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
--product
- (Optional) The product name to publish the firmware to. This defaults to the Mix Project config:app
name.--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
Command-line options
--product
- (Optional) The product name to publish the firmware to. This defaults to the Mix Project config:app
name.--identifier
- (Optional) Only show device matching an identifier--description
- (Optional) Only show devices matching a description--tag
- (Optional) Only show devices matching tags. Multiple tags can be supplied.--status
- (Optional) Only show devices matching status--version
- (Optional) Only show devices matching version
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
--product
- (Optional) The product name to publish the firmware to. This defaults to the Mix Project config:app
name.--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
Command-line options
--product
- (Optional) The product name to publish the firmware to. This defaults to the Mix Project config:app
name.
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
--product
- (Optional) The product name to publish the firmware to. This defaults to the Mix Project config:app
name.--path
- (Optional) A local location for storing certificates
Link to this section Summary
Functions
A task needs to implement run
which receives
a list of command line args.
Link to this section Functions
burn(identifier, opts)
cert_create(org, product, identifier, opts, auth \\ nil)
cert_create(
String.t(),
String.t(),
String.t(),
keyword(),
nil | NervesHubUserAPI.Auth.t()
) :: :ok
cert_create( String.t(), String.t(), String.t(), keyword(), nil | NervesHubUserAPI.Auth.t() ) :: :ok
cert_list(org, product, identifier)
create(org, product, opts)
delete(org, product, identifier)
list(org, product, opts)
render_help()
render_help() :: no_return()
render_help() :: no_return()
run(args)
A task needs to implement run
which receives
a list of command line args.
Callback implementation for Mix.Task.run/1
.