etcher/docs/CLI.md
Juan Cruz Viotti 57952f6f55 fix(CLI): don't print stack traces by default (#1206)
Currently, the Etcher CLI will print scary stack traces for every single
error (e.g: if you forgot to pass an image to the tool), given that
`errors.getDescription()` will return a stack trace if no other
description could be found.

This commit introduces an `ETCHER_CLI_DEBUG` environment variable, which
when set, it will cause the Etcher CLI to output stack traces, plus a
boolean `userFriendlyDescriptionsOnly` option to
`errors.getDescription()`, so we can control whether
`errors.getDescription()` returns things like stack traces, or
stringified error objects.

Change-Type: minor
Changelog-Entry: Don't print stack traces by default in the CLI.
Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
2017-03-28 09:43:15 -04:00

1.0 KiB

Etcher CLI

The Etcher CLI is a command-line tool that aims to provide all the benefits of the Etcher desktop application in a way that can be run from a terminal, or even used from a script.

In fact, the Etcher desktop application is simply a wrapper around the CLI, which is the place where the actual writing logic takes place.

Running

We are not oficially releasing the Etcher CLI as a separate package yet, but you can run it locally with the following steps:

  • Clone the Etcher repository.
git clone https://github.com/resin-io/etcher
  • Install the dependencies by running:
npm install
  • Run the Etcher CLI from bin/etcher.
./bin/etcher --help

Options

  --help, -h     show help
  --version, -v  show version number
  --drive, -d    drive
  --check, -c    validate write
  --yes, -y      confirm non-interactively
  --unmount, -u  unmount on success

Debug mode

You can set the ETCHER_CLI_DEBUG environment variable to make the Etcher CLI print error stack traces.