diff --git a/docs/CLI.md b/docs/CLI.md index 211ecd63..aaf9e27d 100644 --- a/docs/CLI.md +++ b/docs/CLI.md @@ -8,28 +8,64 @@ 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. +Installing +---------- + +Head over to [etcher.io][etcher] and download the package that corresponds to +your operating system. + +macOS and GNU/Linux +------------------- + +- Extract the `.tar.gz` package by running: + +```sh +tar fvx path/to/cli.tar.gz +``` + +- Move the resulting directory to `/opt/etcher-cli` + +- Add `/opt/etcher-cli` to the `PATH`. For example, add the following to + `.bashrc` or `.zshrc`: + +```sh +export PATH="$PATH:/opt/etcher-cli" +``` + +Windows +------- + +- Unzip the `.zip` package by right-clicking on it and selecting "Extract All" + +- Move the resulting directory to `C:\etcher-cli` + +- Add `C:\etcher-cli` to the `%PATH%` + + - On Windows 10 and Windows 8 + - Open *Control Panel* + - Open *System + - Click the *Advanced system settings* link + - Click *Environment Variables* + - Find the `PATH` environment variable, and click *Edit* + - Append `;C:\etcher-cli` to the environment variable value + - Click *OK* + + - On Windows 7 + - Right-click the *My Computer* icon + - Open the *Properties* menu + - Open the *Advanced* tab + - Click *Environment Variables* + - Find the `PATH` environment variable, and click *Edit* + - Append `;C:\etcher-cli` to the environment variable value + - Click *OK* + + - Re-open `cmd.exe`, or PowerShell + 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: - ```sh -npm install -``` - -- Run the Etcher CLI from `bin/etcher`. - -``` -./bin/etcher --help +etcher -v ``` Options @@ -49,3 +85,5 @@ Debug mode You can set the `ETCHER_CLI_DEBUG` environment variable to make the Etcher CLI print error stack traces. + +[etcher]: https://etcher.io/