0.0.4 • Published 3 years ago

@lightlabs/ryder-cli-proto v0.0.4

Weekly downloads
-
License
ISC
Repository
github
Last release
3 years ago

Ryder CLI Prototype

npm version

A basic command-line interface to manage Ryder prototype devices. It can be used to setup & restore, upgrade & downgrade firmware, and to export identities, app keys, and owner keys from Ryder devices. The code is also a good reference to see how the ryder-serial works.

Install

Directly:

npm install -g @lightlabs/ryder-cli-proto

Or from a cloned repository:

cd ryder-cli-proto
npm install -g .

Uninstall:

npm uninstall -g ryder-cli-proto

Usage

$ npm install -g @lightlabs/ryder-cli-proto
$ ryder-cli-proto COMMAND
running command...
$ ryder-cli-proto (-v|--version|version)
@lightlabs/ryder-cli-proto/0.0.4 darwin-x64 node-v16.0.0
$ ryder-cli-proto --help [COMMAND]
USAGE
  $ ryder-cli-proto COMMAND
...

Commands

ryder-cli-proto erase

Erase a Ryder.

USAGE
  $ ryder-cli-proto erase

OPTIONS
  -D, --debug
  -R, --ryder_port=ryder_port  (required) port of ryder device to connect to
  -h, --help                   show CLI help

See code: src/commands/erase.ts

ryder-cli-proto export WHAT ID_NUMBER [APP_DOMAIN]

Export an identity or key from a Ryder

USAGE
  $ ryder-cli-proto export WHAT ID_NUMBER [APP_DOMAIN]

ARGUMENTS
  WHAT        (identity|owner_key|app_key) what to export
  ID_NUMBER   identity number of thing to export
  APP_DOMAIN  Required when exporting an app key

OPTIONS
  -D, --debug
  -R, --ryder_port=ryder_port    (required) port of ryder device to connect to
  -h, --help                     show CLI help
  -k, --private_key=private_key  Include private key (if available)

See code: src/commands/export.ts

ryder-cli-proto firmware ACTION [VER]

Manage firmware versions.

USAGE
  $ ryder-cli-proto firmware ACTION [VER]

ARGUMENTS
  ACTION  (fetch|download|list|install|version)
  VER     only required on download or install

OPTIONS
  -D, --debug
  -R, --ryder_port=ryder_port  (required) port of ryder device to connect to
  -h, --help                   show CLI help

See code: src/commands/firmware.ts

ryder-cli-proto help [COMMAND]

display help for ryder-cli-proto

USAGE
  $ ryder-cli-proto help [COMMAND]

ARGUMENTS
  COMMAND  command to show help for

OPTIONS
  --all  see all commands in CLI

See code: @oclif/plugin-help

ryder-cli-proto info

Read Ryder device information.

USAGE
  $ ryder-cli-proto info

OPTIONS
  -D, --debug
  -R, --ryder_port=ryder_port  (required) port of ryder device to connect to
  -h, --help                   show CLI help

EXAMPLES
  $ ryder-cli-proto info -R "/dev/ttys003"
  hello world from ./src/hello.ts!

  $ ryder-cli-proto info --ryder-port "/dev/ttys003"
  Initialised Ryder FW version 0.0.2 on /dev/ttys003

See code: src/commands/info.ts

ryder-cli-proto restore

describe the command here

USAGE
  $ ryder-cli-proto restore

OPTIONS
  -D, --debug
  -R, --ryder_port=ryder_port  (required) port of ryder device to connect to
  -h, --help                   show CLI help
  --mnemonic=12|18|24          12, 18, or 24 word mnemonic seed phrase
  --seed=seed                  seed as a number

See code: src/commands/restore.ts

ryder-cli-proto setup

Initialize a Ryder.

USAGE
  $ ryder-cli-proto setup

OPTIONS
  -D, --debug
  -R, --ryder_port=ryder_port  (required) port of ryder device to connect to
  -h, --help                   show CLI help

See code: src/commands/setup.ts

ryder-cli-proto wake

Wake up the Ryder.

USAGE
  $ ryder-cli-proto wake

OPTIONS
  -D, --debug
  -R, --ryder_port=ryder_port  (required) port of ryder device to connect to
  -h, --help                   show CLI help

See code: src/commands/wake.ts

Firmware

Firmware files are downloaded by the CLI and then cached locally. The default cache directory is ~/.ryder/proto-v2/firmware. The directory can be changed by setting the RYDER_FIRMWARE_DIRECTORY environment variable.

You need esptool.py to install firmwares. Install it using pip install esptool.

To fetch the latest list of available firmwares use:

ryder-cli-proto firmware fetch

Download a firmware version:

ryder-cli-proto firmware download 0.0.1

Install a firmware version:

ryder-cli-proto firmware install 0.0.1

Contributing

  1. Create a branch with the naming convention first-name/feature-name.
  2. Open a pull request and request a review of a fellow Pioneer.
  3. Squash and merge is preferred.