2015-04-16 13:34:40 +00:00
|
|
|
# Resin CLI Documentation
|
|
|
|
|
|
|
|
This tool allows you to interact with the resin.io api from the comfort of your command line.
|
|
|
|
|
2017-01-18 15:57:52 +00:00
|
|
|
Please make sure your system meets the requirements as specified in the [README](https://github.com/resin-io/resin-cli).
|
|
|
|
|
2015-04-16 13:34:40 +00:00
|
|
|
To get started download the CLI from npm.
|
|
|
|
|
|
|
|
$ npm install resin-cli -g
|
|
|
|
|
|
|
|
Then authenticate yourself:
|
|
|
|
|
|
|
|
$ resin login
|
|
|
|
|
|
|
|
Now you have access to all the commands referenced below.
|
|
|
|
|
2017-04-26 13:16:06 +00:00
|
|
|
## Proxy support
|
|
|
|
|
|
|
|
The CLI does support HTTP(S) proxies.
|
|
|
|
|
|
|
|
You can configure the proxy using several methods (in order of their precedence):
|
|
|
|
|
|
|
|
* set the `RESINRC_PROXY` environment variable in the URL format (with protocol, host, port, and optionally the basic auth),
|
|
|
|
* use the [resin config file](https://www.npmjs.com/package/resin-settings-client#documentation) (project-specific or user-level)
|
|
|
|
and set the `proxy` setting. This can be:
|
|
|
|
* a string in the URL format,
|
|
|
|
* or an object following [this format](https://www.npmjs.com/package/global-tunnel-ng#options), which allows more control,
|
|
|
|
* or set the conventional `https_proxy` / `HTTPS_PROXY` / `http_proxy` / `HTTP_PROXY`
|
|
|
|
environment variable (in the same standard URL format).
|
|
|
|
|
2015-04-16 13:34:40 +00:00
|
|
|
# Table of contents
|
|
|
|
|
|
|
|
- Application
|
|
|
|
|
2015-07-07 22:01:25 +00:00
|
|
|
- [app create <name>](#app-create-60-name-62-)
|
|
|
|
- [apps](#apps)
|
|
|
|
- [app <name>](#app-60-name-62-)
|
|
|
|
- [app restart <name>](#app-restart-60-name-62-)
|
|
|
|
- [app rm <name>](#app-rm-60-name-62-)
|
2015-04-16 13:34:40 +00:00
|
|
|
|
|
|
|
- Authentication
|
|
|
|
|
2015-11-11 12:45:38 +00:00
|
|
|
- [login](#login)
|
2015-07-07 22:01:25 +00:00
|
|
|
- [logout](#logout)
|
|
|
|
- [signup](#signup)
|
|
|
|
- [whoami](#whoami)
|
2015-04-16 13:34:40 +00:00
|
|
|
|
|
|
|
- Device
|
|
|
|
|
2015-07-07 22:01:25 +00:00
|
|
|
- [devices](#devices)
|
2015-08-04 14:00:09 +00:00
|
|
|
- [device <uuid>](#device-60-uuid-62-)
|
2016-09-25 23:51:32 +00:00
|
|
|
- [devices supported](#devices-supported)
|
2015-09-29 18:33:31 +00:00
|
|
|
- [device register <application>](#device-register-60-application-62-)
|
2015-08-04 14:00:09 +00:00
|
|
|
- [device rm <uuid>](#device-rm-60-uuid-62-)
|
2015-07-07 22:01:25 +00:00
|
|
|
- [device identify <uuid>](#device-identify-60-uuid-62-)
|
2016-03-04 13:38:11 +00:00
|
|
|
- [device reboot <uuid>](#device-reboot-60-uuid-62-)
|
2016-10-26 14:46:20 +00:00
|
|
|
- [device shutdown <uuid>](#device-shutdown-60-uuid-62-)
|
2016-09-25 23:51:32 +00:00
|
|
|
- [device public-url enable <uuid>](#device-public-url-enable-60-uuid-62-)
|
|
|
|
- [device public-url disable <uuid>](#device-public-url-disable-60-uuid-62-)
|
|
|
|
- [device public-url <uuid>](#device-public-url-60-uuid-62-)
|
|
|
|
- [device public-url status <uuid>](#device-public-url-status-60-uuid-62-)
|
2015-08-04 14:00:09 +00:00
|
|
|
- [device rename <uuid> [newName]](#device-rename-60-uuid-62-newname-)
|
2015-11-11 19:00:02 +00:00
|
|
|
- [device move <uuid>](#device-move-60-uuid-62-)
|
2015-09-29 15:10:33 +00:00
|
|
|
- [device init](#device-init)
|
2015-04-16 13:34:40 +00:00
|
|
|
|
|
|
|
- Environment Variables
|
|
|
|
|
2015-07-07 22:01:25 +00:00
|
|
|
- [envs](#envs)
|
|
|
|
- [env rm <id>](#env-rm-60-id-62-)
|
|
|
|
- [env add <key> [value]](#env-add-60-key-62-value-)
|
|
|
|
- [env rename <id> <value>](#env-rename-60-id-62-60-value-62-)
|
2015-04-16 13:34:40 +00:00
|
|
|
|
|
|
|
- Help
|
|
|
|
|
2015-07-07 22:01:25 +00:00
|
|
|
- [help [command...]](#help-command-)
|
2015-04-16 13:34:40 +00:00
|
|
|
|
|
|
|
- Information
|
|
|
|
|
2015-07-07 22:01:25 +00:00
|
|
|
- [version](#version)
|
2015-04-16 13:34:40 +00:00
|
|
|
|
|
|
|
- Keys
|
|
|
|
|
2015-07-07 22:01:25 +00:00
|
|
|
- [keys](#keys)
|
|
|
|
- [key <id>](#key-60-id-62-)
|
|
|
|
- [key rm <id>](#key-rm-60-id-62-)
|
|
|
|
- [key add <name> [path]](#key-add-60-name-62-path-)
|
2015-04-16 13:34:40 +00:00
|
|
|
|
|
|
|
- Logs
|
|
|
|
|
2015-07-07 22:01:25 +00:00
|
|
|
- [logs <uuid>](#logs-60-uuid-62-)
|
2015-04-16 13:34:40 +00:00
|
|
|
|
2016-03-28 13:25:40 +00:00
|
|
|
- Sync
|
|
|
|
|
2016-07-21 16:35:44 +00:00
|
|
|
- [sync [uuid]](#sync-uuid-)
|
2016-03-28 13:25:40 +00:00
|
|
|
|
2016-04-24 19:52:41 +00:00
|
|
|
- SSH
|
|
|
|
|
2016-07-21 16:35:44 +00:00
|
|
|
- [ssh [uuid]](#ssh-uuid-)
|
2016-04-24 19:52:41 +00:00
|
|
|
|
2015-04-16 13:34:40 +00:00
|
|
|
- Notes
|
|
|
|
|
2015-07-07 22:01:25 +00:00
|
|
|
- [note <|note>](#note-60-note-62-)
|
2015-04-16 13:34:40 +00:00
|
|
|
|
2015-09-29 17:03:14 +00:00
|
|
|
- OS
|
|
|
|
|
|
|
|
- [os download <type>](#os-download-60-type-62-)
|
2015-09-29 17:36:29 +00:00
|
|
|
- [os configure <image> <uuid>](#os-configure-60-image-62-60-uuid-62-)
|
2015-10-15 12:48:34 +00:00
|
|
|
- [os initialize <image>](#os-initialize-60-image-62-)
|
2015-09-29 17:03:14 +00:00
|
|
|
|
2015-11-10 16:53:34 +00:00
|
|
|
- Config
|
|
|
|
|
|
|
|
- [config read](#config-read)
|
2015-11-10 18:27:01 +00:00
|
|
|
- [config write <key> <value>](#config-write-60-key-62-60-value-62-)
|
2016-03-17 20:07:19 +00:00
|
|
|
- [config inject <file>](#config-inject-60-file-62-)
|
2015-11-11 14:38:45 +00:00
|
|
|
- [config reconfigure](#config-reconfigure)
|
2016-03-28 13:25:40 +00:00
|
|
|
- [config generate](#config-generate)
|
2015-11-10 16:53:34 +00:00
|
|
|
|
2015-11-16 02:08:02 +00:00
|
|
|
- Settings
|
|
|
|
|
|
|
|
- [settings](#settings)
|
|
|
|
|
2015-09-01 17:01:47 +00:00
|
|
|
- Wizard
|
2015-04-16 13:34:40 +00:00
|
|
|
|
2015-09-01 17:01:47 +00:00
|
|
|
- [quickstart [name]](#quickstart-name-)
|
2015-04-16 13:34:40 +00:00
|
|
|
|
2017-04-11 13:25:54 +00:00
|
|
|
- Local
|
|
|
|
|
|
|
|
- [local configure <target>](#local-configure-60-target-62-)
|
|
|
|
- [local flash <image>](#local-flash-60-image-62-)
|
|
|
|
- [local logs [deviceIp]](#local-logs-deviceip-)
|
|
|
|
- [local promote [deviceIp]](#local-promote-deviceip-)
|
|
|
|
- [local scan](#local-scan)
|
|
|
|
- [local ssh [deviceIp]](#local-ssh-deviceip-)
|
|
|
|
- [local push [deviceIp]](#local-push-deviceip-)
|
|
|
|
- [local stop [deviceIp]](#local-stop-deviceip-)
|
|
|
|
|
2017-04-26 12:34:40 +00:00
|
|
|
- Deploy
|
|
|
|
|
|
|
|
- [build [source]](#build-source-)
|
|
|
|
- [deploy <appName> [image]](#deploy-60-appname-62-image-)
|
|
|
|
|
2015-04-16 13:34:40 +00:00
|
|
|
# Application
|
2015-04-16 14:42:09 +00:00
|
|
|
|
2015-04-16 13:34:40 +00:00
|
|
|
## app create <name>
|
|
|
|
|
|
|
|
Use this command to create a new resin.io application.
|
|
|
|
|
2017-05-12 10:01:37 +00:00
|
|
|
You can specify the application device type with the `--type` option.
|
2015-04-16 13:34:40 +00:00
|
|
|
Otherwise, an interactive dropdown will be shown for you to select from.
|
|
|
|
|
|
|
|
You can see a list of supported device types with
|
|
|
|
|
|
|
|
$ resin devices supported
|
|
|
|
|
|
|
|
Examples:
|
|
|
|
|
|
|
|
$ resin app create MyApp
|
|
|
|
$ resin app create MyApp --type raspberry-pi
|
|
|
|
|
|
|
|
### Options
|
|
|
|
|
2017-05-12 10:01:37 +00:00
|
|
|
#### --type, -t <type>
|
2015-04-16 13:34:40 +00:00
|
|
|
|
2017-05-12 10:01:37 +00:00
|
|
|
application device type (Check available types with `resin devices supported`)
|
2015-04-16 13:34:40 +00:00
|
|
|
|
|
|
|
## apps
|
|
|
|
|
|
|
|
Use this command to list all your applications.
|
|
|
|
|
|
|
|
Notice this command only shows the most important bits of information for each app.
|
|
|
|
If you want detailed information, use resin app <name> instead.
|
|
|
|
|
|
|
|
Examples:
|
|
|
|
|
|
|
|
$ resin apps
|
|
|
|
|
|
|
|
## app <name>
|
|
|
|
|
|
|
|
Use this command to show detailed information for a single application.
|
|
|
|
|
|
|
|
Examples:
|
|
|
|
|
|
|
|
$ resin app MyApp
|
|
|
|
|
|
|
|
## app restart <name>
|
|
|
|
|
|
|
|
Use this command to restart all devices that belongs to a certain application.
|
|
|
|
|
|
|
|
Examples:
|
|
|
|
|
|
|
|
$ resin app restart MyApp
|
|
|
|
|
|
|
|
## app rm <name>
|
|
|
|
|
|
|
|
Use this command to remove a resin.io application.
|
|
|
|
|
|
|
|
Notice this command asks for confirmation interactively.
|
|
|
|
You can avoid this by passing the `--yes` boolean option.
|
|
|
|
|
|
|
|
Examples:
|
|
|
|
|
|
|
|
$ resin app rm MyApp
|
|
|
|
$ resin app rm MyApp --yes
|
|
|
|
|
|
|
|
### Options
|
|
|
|
|
|
|
|
#### --yes, -y
|
|
|
|
|
|
|
|
confirm non interactively
|
|
|
|
|
2015-11-11 12:45:38 +00:00
|
|
|
# Authentication
|
2015-04-16 13:34:40 +00:00
|
|
|
|
2015-11-11 12:45:38 +00:00
|
|
|
## login
|
2015-04-16 13:34:40 +00:00
|
|
|
|
2015-11-11 12:45:38 +00:00
|
|
|
Use this command to login to your resin.io account.
|
2015-06-02 16:32:35 +00:00
|
|
|
|
2016-01-12 13:07:15 +00:00
|
|
|
This command will prompt you to login using the following login types:
|
|
|
|
|
|
|
|
- Web authorization: open your web browser and prompt you to authorize the CLI
|
2015-12-03 14:22:22 +00:00
|
|
|
from the dashboard.
|
|
|
|
|
2016-01-12 13:07:15 +00:00
|
|
|
- Credentials: using email/password and 2FA.
|
2015-12-03 14:22:22 +00:00
|
|
|
|
2016-01-12 13:07:15 +00:00
|
|
|
- Token: using the authentication token from the preferences page.
|
2015-12-12 04:09:31 +00:00
|
|
|
|
2015-04-16 13:34:40 +00:00
|
|
|
Examples:
|
|
|
|
|
2015-11-11 12:45:38 +00:00
|
|
|
$ resin login
|
2016-01-12 13:07:15 +00:00
|
|
|
$ resin login --web
|
2015-12-03 14:22:22 +00:00
|
|
|
$ resin login --token "..."
|
2015-12-12 04:09:31 +00:00
|
|
|
$ resin login --credentials
|
|
|
|
$ resin login --credentials --email johndoe@gmail.com --password secret
|
2015-12-03 14:22:22 +00:00
|
|
|
|
|
|
|
### Options
|
|
|
|
|
|
|
|
#### --token, -t <token>
|
|
|
|
|
|
|
|
auth token
|
2015-04-16 13:34:40 +00:00
|
|
|
|
2016-01-12 13:07:15 +00:00
|
|
|
#### --web, -w
|
|
|
|
|
|
|
|
web-based login
|
|
|
|
|
2015-12-12 04:09:31 +00:00
|
|
|
#### --credentials, -c
|
|
|
|
|
|
|
|
credential-based login
|
|
|
|
|
|
|
|
#### --email, --e,u, --e,u <email>
|
|
|
|
|
|
|
|
email
|
|
|
|
|
|
|
|
#### --password, -p <password>
|
|
|
|
|
|
|
|
password
|
|
|
|
|
2015-04-16 13:34:40 +00:00
|
|
|
## logout
|
|
|
|
|
|
|
|
Use this command to logout from your resin.io account.o
|
|
|
|
|
|
|
|
Examples:
|
|
|
|
|
|
|
|
$ resin logout
|
|
|
|
|
|
|
|
## signup
|
|
|
|
|
|
|
|
Use this command to signup for a resin.io account.
|
|
|
|
|
|
|
|
If signup is successful, you'll be logged in to your new user automatically.
|
|
|
|
|
|
|
|
Examples:
|
|
|
|
|
|
|
|
$ resin signup
|
2017-03-27 09:29:40 +00:00
|
|
|
Email: johndoe@acme.com
|
2015-04-16 13:34:40 +00:00
|
|
|
Password: ***********
|
|
|
|
|
|
|
|
$ resin whoami
|
|
|
|
johndoe
|
|
|
|
|
2015-04-27 14:51:26 +00:00
|
|
|
## whoami
|
|
|
|
|
2015-09-01 17:01:47 +00:00
|
|
|
Use this command to find out the current logged in username and email address.
|
2015-04-27 14:51:26 +00:00
|
|
|
|
|
|
|
Examples:
|
|
|
|
|
|
|
|
$ resin whoami
|
|
|
|
|
2015-04-16 13:34:40 +00:00
|
|
|
# Device
|
2015-04-16 14:42:09 +00:00
|
|
|
|
2015-04-16 13:34:40 +00:00
|
|
|
## devices
|
|
|
|
|
2015-04-27 15:20:53 +00:00
|
|
|
Use this command to list all devices that belong to you.
|
|
|
|
|
|
|
|
You can filter the devices by application by using the `--application` option.
|
2015-04-16 13:34:40 +00:00
|
|
|
|
|
|
|
Examples:
|
|
|
|
|
2015-04-27 15:20:53 +00:00
|
|
|
$ resin devices
|
2015-04-16 13:34:40 +00:00
|
|
|
$ resin devices --application MyApp
|
2015-04-27 15:20:53 +00:00
|
|
|
$ resin devices --app MyApp
|
|
|
|
$ resin devices -a MyApp
|
2015-04-16 13:34:40 +00:00
|
|
|
|
|
|
|
### Options
|
|
|
|
|
|
|
|
#### --application, --a,app, --a,app <application>
|
|
|
|
|
|
|
|
application name
|
|
|
|
|
2015-08-04 14:00:09 +00:00
|
|
|
## device <uuid>
|
2015-04-16 13:34:40 +00:00
|
|
|
|
|
|
|
Use this command to show information about a single device.
|
|
|
|
|
|
|
|
Examples:
|
|
|
|
|
2016-01-21 14:23:40 +00:00
|
|
|
$ resin device 7cf02a6
|
2015-04-16 13:34:40 +00:00
|
|
|
|
2016-09-25 23:51:32 +00:00
|
|
|
## devices supported
|
|
|
|
|
|
|
|
Use this command to get the list of all supported devices
|
|
|
|
|
|
|
|
Examples:
|
|
|
|
|
|
|
|
$ resin devices supported
|
|
|
|
|
2015-09-29 18:33:31 +00:00
|
|
|
## device register <application>
|
|
|
|
|
|
|
|
Use this command to register a device to an application.
|
|
|
|
|
|
|
|
Examples:
|
|
|
|
|
|
|
|
$ resin device register MyApp
|
|
|
|
|
2015-10-19 18:16:47 +00:00
|
|
|
### Options
|
|
|
|
|
|
|
|
#### --uuid, -u <uuid>
|
|
|
|
|
|
|
|
custom uuid
|
|
|
|
|
2015-08-04 14:00:09 +00:00
|
|
|
## device rm <uuid>
|
2015-04-16 13:34:40 +00:00
|
|
|
|
|
|
|
Use this command to remove a device from resin.io.
|
|
|
|
|
|
|
|
Notice this command asks for confirmation interactively.
|
|
|
|
You can avoid this by passing the `--yes` boolean option.
|
|
|
|
|
|
|
|
Examples:
|
|
|
|
|
2016-01-21 14:23:40 +00:00
|
|
|
$ resin device rm 7cf02a6
|
|
|
|
$ resin device rm 7cf02a6 --yes
|
2015-04-16 13:34:40 +00:00
|
|
|
|
|
|
|
### Options
|
|
|
|
|
|
|
|
#### --yes, -y
|
|
|
|
|
|
|
|
confirm non interactively
|
|
|
|
|
|
|
|
## device identify <uuid>
|
|
|
|
|
|
|
|
Use this command to identify a device.
|
|
|
|
|
|
|
|
In the Raspberry Pi, the ACT led is blinked several times.
|
|
|
|
|
|
|
|
Examples:
|
|
|
|
|
2016-01-21 14:23:40 +00:00
|
|
|
$ resin device identify 23c73a1
|
2015-04-16 13:34:40 +00:00
|
|
|
|
2016-03-04 13:38:11 +00:00
|
|
|
## device reboot <uuid>
|
|
|
|
|
|
|
|
Use this command to remotely reboot a device
|
|
|
|
|
|
|
|
Examples:
|
|
|
|
|
|
|
|
$ resin device reboot 23c73a1
|
|
|
|
|
2016-10-26 14:46:20 +00:00
|
|
|
### Options
|
|
|
|
|
2017-01-18 15:57:52 +00:00
|
|
|
#### --force, -f
|
2016-10-26 14:46:20 +00:00
|
|
|
|
|
|
|
force action if the update lock is set
|
|
|
|
|
|
|
|
## device shutdown <uuid>
|
|
|
|
|
|
|
|
Use this command to remotely shutdown a device
|
|
|
|
|
|
|
|
Examples:
|
|
|
|
|
|
|
|
$ resin device shutdown 23c73a1
|
|
|
|
|
|
|
|
### Options
|
|
|
|
|
2017-01-18 15:57:52 +00:00
|
|
|
#### --force, -f
|
2016-10-26 14:46:20 +00:00
|
|
|
|
|
|
|
force action if the update lock is set
|
|
|
|
|
2016-09-25 23:51:32 +00:00
|
|
|
## device public-url enable <uuid>
|
|
|
|
|
|
|
|
Use this command to enable public URL for a device
|
|
|
|
|
|
|
|
Examples:
|
|
|
|
|
|
|
|
$ resin device public-url enable 23c73a1
|
|
|
|
|
|
|
|
## device public-url disable <uuid>
|
|
|
|
|
|
|
|
Use this command to disable public URL for a device
|
|
|
|
|
|
|
|
Examples:
|
|
|
|
|
|
|
|
$ resin device public-url disable 23c73a1
|
|
|
|
|
|
|
|
## device public-url <uuid>
|
|
|
|
|
|
|
|
Use this command to get the public URL of a device
|
|
|
|
|
|
|
|
Examples:
|
|
|
|
|
|
|
|
$ resin device public-url 23c73a1
|
|
|
|
|
|
|
|
## device public-url status <uuid>
|
|
|
|
|
|
|
|
Use this command to determine if public URL is enabled for a device
|
|
|
|
|
|
|
|
Examples:
|
|
|
|
|
|
|
|
$ resin device public-url status 23c73a1
|
|
|
|
|
2015-08-04 14:00:09 +00:00
|
|
|
## device rename <uuid> [newName]
|
2015-04-16 13:34:40 +00:00
|
|
|
|
|
|
|
Use this command to rename a device.
|
|
|
|
|
|
|
|
If you omit the name, you'll get asked for it interactively.
|
|
|
|
|
|
|
|
Examples:
|
|
|
|
|
2016-01-21 14:23:40 +00:00
|
|
|
$ resin device rename 7cf02a6
|
|
|
|
$ resin device rename 7cf02a6 MyPi
|
2015-04-16 13:34:40 +00:00
|
|
|
|
2015-11-11 19:00:02 +00:00
|
|
|
## device move <uuid>
|
|
|
|
|
|
|
|
Use this command to move a device to another application you own.
|
|
|
|
|
|
|
|
If you omit the application, you'll get asked for it interactively.
|
|
|
|
|
|
|
|
Examples:
|
|
|
|
|
2016-01-21 14:23:40 +00:00
|
|
|
$ resin device move 7cf02a6
|
|
|
|
$ resin device move 7cf02a6 --application MyNewApp
|
2015-11-11 19:00:02 +00:00
|
|
|
|
|
|
|
### Options
|
|
|
|
|
|
|
|
#### --application, --a,app, --a,app <application>
|
|
|
|
|
|
|
|
application name
|
|
|
|
|
2015-09-29 15:10:33 +00:00
|
|
|
## device init
|
2015-04-16 13:34:40 +00:00
|
|
|
|
|
|
|
Use this command to download the OS image of a certain application and write it to an SD Card.
|
|
|
|
|
2015-09-29 15:10:33 +00:00
|
|
|
Notice this command may ask for confirmation interactively.
|
2015-04-16 13:34:40 +00:00
|
|
|
You can avoid this by passing the `--yes` boolean option.
|
|
|
|
|
|
|
|
Examples:
|
|
|
|
|
|
|
|
$ resin device init
|
2015-04-20 13:14:47 +00:00
|
|
|
$ resin device init --application MyApp
|
2015-04-16 13:34:40 +00:00
|
|
|
|
|
|
|
### Options
|
|
|
|
|
|
|
|
#### --application, --a,app, --a,app <application>
|
|
|
|
|
|
|
|
application name
|
|
|
|
|
2015-09-29 15:10:33 +00:00
|
|
|
#### --yes, -y
|
2015-04-16 13:34:40 +00:00
|
|
|
|
2015-09-29 15:10:33 +00:00
|
|
|
confirm non interactively
|
2015-04-16 13:34:40 +00:00
|
|
|
|
2015-10-20 13:16:56 +00:00
|
|
|
#### --advanced, -v
|
|
|
|
|
|
|
|
enable advanced configuration
|
|
|
|
|
2015-04-16 13:34:40 +00:00
|
|
|
# Environment Variables
|
2015-04-16 14:42:09 +00:00
|
|
|
|
2015-04-16 13:34:40 +00:00
|
|
|
## envs
|
|
|
|
|
2015-07-07 22:01:25 +00:00
|
|
|
Use this command to list all environment variables for
|
|
|
|
a particular application or device.
|
2015-04-16 13:34:40 +00:00
|
|
|
|
2015-07-07 22:01:25 +00:00
|
|
|
This command lists all custom environment variables.
|
|
|
|
If you want to see all environment variables, including private
|
2015-04-16 13:34:40 +00:00
|
|
|
ones used by resin, use the verbose option.
|
|
|
|
|
|
|
|
Example:
|
|
|
|
|
2015-07-07 22:01:25 +00:00
|
|
|
$ resin envs --application MyApp
|
|
|
|
$ resin envs --application MyApp --verbose
|
2016-01-21 14:23:40 +00:00
|
|
|
$ resin envs --device 7cf02a6
|
2015-04-16 13:34:40 +00:00
|
|
|
|
|
|
|
### Options
|
|
|
|
|
|
|
|
#### --application, --a,app, --a,app <application>
|
|
|
|
|
|
|
|
application name
|
|
|
|
|
2015-07-07 22:01:25 +00:00
|
|
|
#### --device, -d <device>
|
|
|
|
|
2016-02-27 02:38:16 +00:00
|
|
|
device uuid
|
2015-07-07 22:01:25 +00:00
|
|
|
|
2015-04-16 13:34:40 +00:00
|
|
|
#### --verbose, -v
|
|
|
|
|
|
|
|
show private environment variables
|
|
|
|
|
|
|
|
## env rm <id>
|
|
|
|
|
|
|
|
Use this command to remove an environment variable from an application.
|
|
|
|
|
|
|
|
Don't remove resin specific variables, as things might not work as expected.
|
|
|
|
|
|
|
|
Notice this command asks for confirmation interactively.
|
|
|
|
You can avoid this by passing the `--yes` boolean option.
|
|
|
|
|
2015-07-07 22:01:25 +00:00
|
|
|
If you want to eliminate a device environment variable, pass the `--device` boolean option.
|
|
|
|
|
2015-04-16 13:34:40 +00:00
|
|
|
Examples:
|
|
|
|
|
|
|
|
$ resin env rm 215
|
|
|
|
$ resin env rm 215 --yes
|
2015-07-07 22:01:25 +00:00
|
|
|
$ resin env rm 215 --device
|
2015-04-16 13:34:40 +00:00
|
|
|
|
|
|
|
### Options
|
|
|
|
|
|
|
|
#### --yes, -y
|
|
|
|
|
|
|
|
confirm non interactively
|
|
|
|
|
2015-07-07 22:01:25 +00:00
|
|
|
#### --device, -d
|
|
|
|
|
2016-02-27 02:38:16 +00:00
|
|
|
device
|
2015-07-07 22:01:25 +00:00
|
|
|
|
2015-04-16 13:34:40 +00:00
|
|
|
## env add <key> [value]
|
|
|
|
|
|
|
|
Use this command to add an enviroment variable to an application.
|
|
|
|
|
|
|
|
If value is omitted, the tool will attempt to use the variable's value
|
|
|
|
as defined in your host machine.
|
|
|
|
|
2015-07-07 22:01:25 +00:00
|
|
|
Use the `--device` option if you want to assign the environment variable
|
|
|
|
to a specific device.
|
|
|
|
|
2015-04-16 13:34:40 +00:00
|
|
|
If the value is grabbed from the environment, a warning message will be printed.
|
|
|
|
Use `--quiet` to remove it.
|
|
|
|
|
|
|
|
Examples:
|
|
|
|
|
2015-07-07 22:01:25 +00:00
|
|
|
$ resin env add EDITOR vim --application MyApp
|
|
|
|
$ resin env add TERM --application MyApp
|
2016-01-21 14:23:40 +00:00
|
|
|
$ resin env add EDITOR vim --device 7cf02a6
|
2015-04-16 13:34:40 +00:00
|
|
|
|
|
|
|
### Options
|
|
|
|
|
|
|
|
#### --application, --a,app, --a,app <application>
|
|
|
|
|
|
|
|
application name
|
|
|
|
|
2015-07-07 22:01:25 +00:00
|
|
|
#### --device, -d <device>
|
|
|
|
|
2016-02-27 02:38:16 +00:00
|
|
|
device uuid
|
2015-07-07 22:01:25 +00:00
|
|
|
|
2015-04-16 13:34:40 +00:00
|
|
|
## env rename <id> <value>
|
|
|
|
|
|
|
|
Use this command to rename an enviroment variable from an application.
|
|
|
|
|
2015-07-07 22:01:25 +00:00
|
|
|
Pass the `--device` boolean option if you want to rename a device environment variable.
|
|
|
|
|
2015-04-16 13:34:40 +00:00
|
|
|
Examples:
|
|
|
|
|
|
|
|
$ resin env rename 376 emacs
|
2015-07-07 22:01:25 +00:00
|
|
|
$ resin env rename 376 emacs --device
|
|
|
|
|
|
|
|
### Options
|
|
|
|
|
|
|
|
#### --device, -d
|
|
|
|
|
2016-02-27 02:38:16 +00:00
|
|
|
device
|
2015-04-16 13:34:40 +00:00
|
|
|
|
|
|
|
# Help
|
2015-04-16 14:42:09 +00:00
|
|
|
|
2015-04-16 13:34:40 +00:00
|
|
|
## help [command...]
|
|
|
|
|
|
|
|
Get detailed help for an specific command.
|
|
|
|
|
|
|
|
Examples:
|
|
|
|
|
|
|
|
$ resin help apps
|
|
|
|
$ resin help os download
|
|
|
|
|
2015-10-15 12:48:34 +00:00
|
|
|
### Options
|
|
|
|
|
|
|
|
#### --verbose, -v
|
|
|
|
|
|
|
|
show additional commands
|
|
|
|
|
2015-04-16 13:34:40 +00:00
|
|
|
# Information
|
2015-04-16 14:42:09 +00:00
|
|
|
|
2015-04-16 13:34:40 +00:00
|
|
|
## version
|
|
|
|
|
|
|
|
Display the Resin CLI version.
|
|
|
|
|
|
|
|
# Keys
|
2015-04-16 14:42:09 +00:00
|
|
|
|
2015-04-16 13:34:40 +00:00
|
|
|
## keys
|
|
|
|
|
|
|
|
Use this command to list all your SSH keys.
|
|
|
|
|
|
|
|
Examples:
|
|
|
|
|
|
|
|
$ resin keys
|
|
|
|
|
|
|
|
## key <id>
|
|
|
|
|
|
|
|
Use this command to show information about a single SSH key.
|
|
|
|
|
|
|
|
Examples:
|
|
|
|
|
|
|
|
$ resin key 17
|
|
|
|
|
|
|
|
## key rm <id>
|
|
|
|
|
|
|
|
Use this command to remove a SSH key from resin.io.
|
|
|
|
|
|
|
|
Notice this command asks for confirmation interactively.
|
|
|
|
You can avoid this by passing the `--yes` boolean option.
|
|
|
|
|
|
|
|
Examples:
|
|
|
|
|
|
|
|
$ resin key rm 17
|
|
|
|
$ resin key rm 17 --yes
|
|
|
|
|
|
|
|
### Options
|
|
|
|
|
|
|
|
#### --yes, -y
|
|
|
|
|
|
|
|
confirm non interactively
|
|
|
|
|
|
|
|
## key add <name> [path]
|
|
|
|
|
|
|
|
Use this command to associate a new SSH key with your account.
|
|
|
|
|
|
|
|
If `path` is omitted, the command will attempt
|
|
|
|
to read the SSH key from stdin.
|
|
|
|
|
|
|
|
Examples:
|
|
|
|
|
|
|
|
$ resin key add Main ~/.ssh/id_rsa.pub
|
|
|
|
$ cat ~/.ssh/id_rsa.pub | resin key add Main
|
|
|
|
|
|
|
|
# Logs
|
2015-04-16 14:42:09 +00:00
|
|
|
|
2015-04-16 13:34:40 +00:00
|
|
|
## logs <uuid>
|
|
|
|
|
|
|
|
Use this command to show logs for a specific device.
|
|
|
|
|
|
|
|
By default, the command prints all log messages and exit.
|
|
|
|
|
|
|
|
To continuously stream output, and see new logs in real time, use the `--tail` option.
|
|
|
|
|
2015-04-27 14:51:26 +00:00
|
|
|
Note that for now you need to provide the whole UUID for this command to work correctly.
|
2015-04-16 13:34:40 +00:00
|
|
|
|
|
|
|
This is due to some technical limitations that we plan to address soon.
|
|
|
|
|
|
|
|
Examples:
|
|
|
|
|
2016-01-21 14:23:40 +00:00
|
|
|
$ resin logs 23c73a1
|
|
|
|
$ resin logs 23c73a1
|
2015-04-16 13:34:40 +00:00
|
|
|
|
|
|
|
### Options
|
|
|
|
|
|
|
|
#### --tail, -t
|
|
|
|
|
|
|
|
continuously stream output
|
|
|
|
|
2016-03-28 13:25:40 +00:00
|
|
|
# Sync
|
|
|
|
|
2016-07-21 16:35:44 +00:00
|
|
|
## sync [uuid]
|
2016-03-28 13:25:40 +00:00
|
|
|
|
2017-01-18 15:57:52 +00:00
|
|
|
Warning: 'resin sync' requires an openssh-compatible client and 'rsync' to
|
|
|
|
be correctly installed in your shell environment. For more information (including
|
|
|
|
Windows support) please check the README here: https://github.com/resin-io/resin-cli
|
2016-05-19 14:10:45 +00:00
|
|
|
|
2016-03-28 13:25:40 +00:00
|
|
|
Use this command to sync your local changes to a certain device on the fly.
|
|
|
|
|
2016-07-21 16:35:44 +00:00
|
|
|
After every 'resin sync' the updated settings will be saved in
|
|
|
|
'<source>/.resin-sync.yml' and will be used in later invocations. You can
|
|
|
|
also change any option by editing '.resin-sync.yml' directly.
|
2016-04-25 12:32:58 +00:00
|
|
|
|
2016-07-21 16:35:44 +00:00
|
|
|
Here is an example '.resin-sync.yml' :
|
2016-03-28 13:25:40 +00:00
|
|
|
|
2016-07-21 16:35:44 +00:00
|
|
|
$ cat $PWD/.resin-sync.yml
|
|
|
|
uuid: 7cf02a6
|
|
|
|
destination: '/usr/src/app'
|
2016-03-28 13:25:40 +00:00
|
|
|
before: 'echo Hello'
|
2016-07-21 16:35:44 +00:00
|
|
|
after: 'echo Done'
|
2016-03-28 13:25:40 +00:00
|
|
|
ignore:
|
|
|
|
- .git
|
|
|
|
- node_modules/
|
|
|
|
|
2016-07-21 16:35:44 +00:00
|
|
|
Command line options have precedence over the ones saved in '.resin-sync.yml'.
|
|
|
|
|
|
|
|
If '.gitignore' is found in the source directory then all explicitly listed files will be
|
|
|
|
excluded from the syncing process. You can choose to change this default behavior with the
|
|
|
|
'--skip-gitignore' option.
|
2016-03-28 13:25:40 +00:00
|
|
|
|
|
|
|
Examples:
|
|
|
|
|
2016-07-21 16:35:44 +00:00
|
|
|
$ resin sync 7cf02a6 --source . --destination /usr/src/app
|
|
|
|
$ resin sync 7cf02a6 -s /home/user/myResinProject -d /usr/src/app --before 'echo Hello' --after 'echo Done'
|
|
|
|
$ resin sync --ignore lib/
|
|
|
|
$ resin sync --verbose false
|
|
|
|
$ resin sync
|
2016-03-28 13:25:40 +00:00
|
|
|
|
|
|
|
### Options
|
|
|
|
|
|
|
|
#### --source, -s <path>
|
|
|
|
|
2016-07-21 16:35:44 +00:00
|
|
|
local directory path to synchronize to device
|
|
|
|
|
|
|
|
#### --destination, -d <path>
|
|
|
|
|
|
|
|
destination path on device
|
2016-03-28 13:25:40 +00:00
|
|
|
|
|
|
|
#### --ignore, -i <paths>
|
|
|
|
|
|
|
|
comma delimited paths to ignore when syncing
|
|
|
|
|
2016-07-21 16:35:44 +00:00
|
|
|
#### --skip-gitignore
|
|
|
|
|
|
|
|
do not parse excluded/included files from .gitignore
|
|
|
|
|
2017-03-22 09:46:06 +00:00
|
|
|
#### --skip-restart
|
|
|
|
|
|
|
|
do not restart container after syncing
|
|
|
|
|
2016-03-28 13:25:40 +00:00
|
|
|
#### --before, -b <command>
|
|
|
|
|
|
|
|
execute a command before syncing
|
|
|
|
|
2016-07-21 16:35:44 +00:00
|
|
|
#### --after, -a <command>
|
2016-03-28 13:25:40 +00:00
|
|
|
|
2016-07-21 16:35:44 +00:00
|
|
|
execute a command after syncing
|
2016-03-28 13:25:40 +00:00
|
|
|
|
|
|
|
#### --port, -t <port>
|
|
|
|
|
|
|
|
ssh port
|
|
|
|
|
2016-07-21 16:35:44 +00:00
|
|
|
#### --progress, -p
|
|
|
|
|
|
|
|
show progress
|
|
|
|
|
2016-06-22 20:19:31 +00:00
|
|
|
#### --verbose, -v
|
|
|
|
|
|
|
|
increase verbosity
|
|
|
|
|
2016-04-24 19:52:41 +00:00
|
|
|
# SSH
|
|
|
|
|
2016-07-21 16:35:44 +00:00
|
|
|
## ssh [uuid]
|
2016-05-19 14:10:45 +00:00
|
|
|
|
2017-01-18 15:57:52 +00:00
|
|
|
Warning: 'resin ssh' requires an openssh-compatible client to be correctly
|
|
|
|
installed in your shell environment. For more information (including Windows
|
|
|
|
support) please check the README here: https://github.com/resin-io/resin-cli
|
2016-04-24 19:52:41 +00:00
|
|
|
|
|
|
|
Use this command to get a shell into the running application container of
|
|
|
|
your device.
|
|
|
|
|
|
|
|
Examples:
|
|
|
|
|
2016-07-21 16:35:44 +00:00
|
|
|
$ resin ssh MyApp
|
2016-05-19 14:10:45 +00:00
|
|
|
$ resin ssh 7cf02a6
|
|
|
|
$ resin ssh 7cf02a6 --port 8080
|
2016-06-22 13:46:18 +00:00
|
|
|
$ resin ssh 7cf02a6 -v
|
2016-04-24 19:52:41 +00:00
|
|
|
|
|
|
|
### Options
|
|
|
|
|
2016-07-21 16:35:44 +00:00
|
|
|
#### --port, -p <port>
|
2016-04-24 19:52:41 +00:00
|
|
|
|
2016-05-19 14:10:45 +00:00
|
|
|
ssh gateway port
|
2016-04-24 19:52:41 +00:00
|
|
|
|
2016-06-22 13:46:18 +00:00
|
|
|
#### --verbose, -v
|
|
|
|
|
|
|
|
increase verbosity
|
|
|
|
|
2017-05-18 22:44:30 +00:00
|
|
|
#### --noproxy
|
2017-05-18 22:25:01 +00:00
|
|
|
|
|
|
|
don't use the proxy configuration for this connection. Only makes sense if you've configured proxy globally.
|
|
|
|
|
2015-04-16 13:34:40 +00:00
|
|
|
# Notes
|
2015-04-16 14:42:09 +00:00
|
|
|
|
2015-04-16 13:34:40 +00:00
|
|
|
## note <|note>
|
|
|
|
|
|
|
|
Use this command to set or update a device note.
|
|
|
|
|
|
|
|
If note command isn't passed, the tool attempts to read from `stdin`.
|
|
|
|
|
2015-08-04 14:00:09 +00:00
|
|
|
To view the notes, use $ resin device <uuid>.
|
2015-04-16 13:34:40 +00:00
|
|
|
|
|
|
|
Examples:
|
|
|
|
|
2016-01-21 14:23:40 +00:00
|
|
|
$ resin note "My useful note" --device 7cf02a6
|
|
|
|
$ cat note.txt | resin note --device 7cf02a6
|
2015-04-16 13:34:40 +00:00
|
|
|
|
|
|
|
### Options
|
|
|
|
|
|
|
|
#### --device, --d,dev, --d,dev <device>
|
|
|
|
|
2015-08-04 14:00:09 +00:00
|
|
|
device uuid
|
2015-04-16 13:34:40 +00:00
|
|
|
|
2015-09-29 17:03:14 +00:00
|
|
|
# OS
|
|
|
|
|
|
|
|
## os download <type>
|
|
|
|
|
|
|
|
Use this command to download an unconfigured os image for a certain device type.
|
2017-05-12 10:01:37 +00:00
|
|
|
Check available types with `resin devices supported`
|
2015-09-29 17:03:14 +00:00
|
|
|
|
2017-03-22 10:50:06 +00:00
|
|
|
If version is not specified the newest stable (non-pre-release) version of OS
|
|
|
|
is downloaded if available, or the newest version otherwise (if all existing
|
|
|
|
versions for the given device type are pre-release).
|
|
|
|
|
|
|
|
You can pass `--version menu` to pick the OS version from the interactive menu
|
|
|
|
of all available versions.
|
|
|
|
|
2015-09-29 17:03:14 +00:00
|
|
|
Examples:
|
|
|
|
|
2017-03-22 10:50:06 +00:00
|
|
|
$ resin os download raspberrypi3 -o ../foo/bar/raspberry-pi.img
|
|
|
|
$ resin os download raspberrypi3 -o ../foo/bar/raspberry-pi.img --version 1.24.1
|
|
|
|
$ resin os download raspberrypi3 -o ../foo/bar/raspberry-pi.img --version ^1.20.0
|
|
|
|
$ resin os download raspberrypi3 -o ../foo/bar/raspberry-pi.img --version latest
|
|
|
|
$ resin os download raspberrypi3 -o ../foo/bar/raspberry-pi.img --version default
|
|
|
|
$ resin os download raspberrypi3 -o ../foo/bar/raspberry-pi.img --version menu
|
2015-09-29 17:03:14 +00:00
|
|
|
|
|
|
|
### Options
|
|
|
|
|
|
|
|
#### --output, -o <output>
|
|
|
|
|
|
|
|
output path
|
|
|
|
|
2017-03-22 10:50:06 +00:00
|
|
|
#### --version <version>
|
|
|
|
|
|
|
|
exact version number, or a valid semver range,
|
|
|
|
or 'latest' (includes pre-releases),
|
|
|
|
or 'default' (excludes pre-releases if at least one stable version is available),
|
|
|
|
or 'recommended' (excludes pre-releases, will fail if only pre-release versions are available),
|
|
|
|
or 'menu' (will show the interactive menu)
|
|
|
|
|
2015-09-29 17:36:29 +00:00
|
|
|
## os configure <image> <uuid>
|
|
|
|
|
|
|
|
Use this command to configure a previously download operating system image with a device.
|
|
|
|
|
|
|
|
Examples:
|
|
|
|
|
2016-01-21 14:23:40 +00:00
|
|
|
$ resin os configure ../path/rpi.img 7cf02a6
|
2015-09-29 17:36:29 +00:00
|
|
|
|
2015-10-19 17:38:09 +00:00
|
|
|
### Options
|
|
|
|
|
|
|
|
#### --advanced, -v
|
|
|
|
|
|
|
|
show advanced commands
|
|
|
|
|
2015-10-15 12:48:34 +00:00
|
|
|
## os initialize <image>
|
2015-09-29 18:52:34 +00:00
|
|
|
|
2017-03-24 09:48:14 +00:00
|
|
|
Use this command to initialize a device with previously configured operating system image.
|
|
|
|
|
|
|
|
Note: Initializing the device may ask for administrative permissions
|
|
|
|
because we need to access the raw devices directly.
|
2015-09-29 18:52:34 +00:00
|
|
|
|
|
|
|
Examples:
|
|
|
|
|
2015-10-15 12:48:34 +00:00
|
|
|
$ resin os initialize ../path/rpi.img --type 'raspberry-pi'
|
|
|
|
|
|
|
|
### Options
|
|
|
|
|
|
|
|
#### --yes, -y
|
|
|
|
|
|
|
|
confirm non interactively
|
|
|
|
|
2017-05-12 10:01:37 +00:00
|
|
|
#### --type, -t <type>
|
2015-10-15 12:48:34 +00:00
|
|
|
|
2017-05-12 10:01:37 +00:00
|
|
|
device type (Check available types with `resin devices supported`)
|
2015-09-29 18:52:34 +00:00
|
|
|
|
2015-10-20 13:17:48 +00:00
|
|
|
#### --drive, -d <drive>
|
|
|
|
|
|
|
|
drive
|
|
|
|
|
2015-11-10 16:53:34 +00:00
|
|
|
# Config
|
|
|
|
|
|
|
|
## config read
|
|
|
|
|
2016-06-22 13:46:18 +00:00
|
|
|
Use this command to read the config.json file from the mounted filesystem (e.g. SD card) of a provisioned device"
|
2015-11-10 16:53:34 +00:00
|
|
|
|
2015-11-10 18:27:01 +00:00
|
|
|
Examples:
|
2015-11-10 16:53:34 +00:00
|
|
|
|
|
|
|
$ resin config read --type raspberry-pi
|
|
|
|
$ resin config read --type raspberry-pi --drive /dev/disk2
|
|
|
|
|
|
|
|
### Options
|
|
|
|
|
2017-05-12 10:01:37 +00:00
|
|
|
#### --type, -t <type>
|
2015-11-10 16:53:34 +00:00
|
|
|
|
2017-05-12 10:01:37 +00:00
|
|
|
device type (Check available types with `resin devices supported`)
|
2015-11-10 16:53:34 +00:00
|
|
|
|
|
|
|
#### --drive, -d <drive>
|
|
|
|
|
|
|
|
drive
|
|
|
|
|
2015-11-10 18:27:01 +00:00
|
|
|
## config write <key> <value>
|
|
|
|
|
2016-06-22 13:46:18 +00:00
|
|
|
Use this command to write the config.json file to the mounted filesystem (e.g. SD card) of a provisioned device
|
2015-11-10 18:27:01 +00:00
|
|
|
|
|
|
|
Examples:
|
|
|
|
|
|
|
|
$ resin config write --type raspberry-pi username johndoe
|
|
|
|
$ resin config write --type raspberry-pi --drive /dev/disk2 username johndoe
|
|
|
|
$ resin config write --type raspberry-pi files.network/settings "..."
|
|
|
|
|
|
|
|
### Options
|
|
|
|
|
2017-05-12 10:01:37 +00:00
|
|
|
#### --type, -t <type>
|
2015-11-10 18:27:01 +00:00
|
|
|
|
2017-05-12 10:01:37 +00:00
|
|
|
device type (Check available types with `resin devices supported`)
|
2015-11-10 18:27:01 +00:00
|
|
|
|
|
|
|
#### --drive, -d <drive>
|
|
|
|
|
|
|
|
drive
|
|
|
|
|
2016-03-17 20:07:19 +00:00
|
|
|
## config inject <file>
|
|
|
|
|
2016-06-22 13:46:18 +00:00
|
|
|
Use this command to inject a config.json file to the mounted filesystem (e.g. SD card) of a provisioned device"
|
2016-03-17 20:07:19 +00:00
|
|
|
|
|
|
|
Examples:
|
|
|
|
|
|
|
|
$ resin config inject my/config.json --type raspberry-pi
|
|
|
|
$ resin config inject my/config.json --type raspberry-pi --drive /dev/disk2
|
|
|
|
|
|
|
|
### Options
|
|
|
|
|
2017-05-12 10:01:37 +00:00
|
|
|
#### --type, -t <type>
|
2016-03-17 20:07:19 +00:00
|
|
|
|
2017-05-12 10:01:37 +00:00
|
|
|
device type (Check available types with `resin devices supported`)
|
2016-03-17 20:07:19 +00:00
|
|
|
|
|
|
|
#### --drive, -d <drive>
|
|
|
|
|
|
|
|
drive
|
|
|
|
|
2015-11-11 14:38:45 +00:00
|
|
|
## config reconfigure
|
|
|
|
|
|
|
|
Use this command to reconfigure a provisioned device
|
|
|
|
|
|
|
|
Examples:
|
|
|
|
|
|
|
|
$ resin config reconfigure --type raspberry-pi
|
|
|
|
$ resin config reconfigure --type raspberry-pi --advanced
|
|
|
|
$ resin config reconfigure --type raspberry-pi --drive /dev/disk2
|
|
|
|
|
|
|
|
### Options
|
|
|
|
|
2017-05-12 10:01:37 +00:00
|
|
|
#### --type, -t <type>
|
2015-11-11 14:38:45 +00:00
|
|
|
|
2017-05-12 10:01:37 +00:00
|
|
|
device type (Check available types with `resin devices supported`)
|
2015-11-11 14:38:45 +00:00
|
|
|
|
|
|
|
#### --drive, -d <drive>
|
|
|
|
|
|
|
|
drive
|
|
|
|
|
|
|
|
#### --advanced, -v
|
|
|
|
|
|
|
|
show advanced commands
|
|
|
|
|
2016-03-28 13:25:40 +00:00
|
|
|
## config generate
|
2016-02-27 02:37:15 +00:00
|
|
|
|
2016-03-28 13:25:40 +00:00
|
|
|
Use this command to generate a config.json for a device or application
|
2016-02-27 02:37:15 +00:00
|
|
|
|
|
|
|
Examples:
|
|
|
|
|
2016-03-28 13:25:40 +00:00
|
|
|
$ resin config generate --device 7cf02a6
|
|
|
|
$ resin config generate --device 7cf02a6 --output config.json
|
|
|
|
$ resin config generate --app MyApp
|
|
|
|
$ resin config generate --app MyApp --output config.json
|
2016-02-27 02:37:15 +00:00
|
|
|
|
|
|
|
### Options
|
|
|
|
|
2016-03-28 13:25:40 +00:00
|
|
|
#### --application, --a,app, --a,app <application>
|
|
|
|
|
|
|
|
application name
|
|
|
|
|
|
|
|
#### --device, -d <device>
|
|
|
|
|
|
|
|
device uuid
|
|
|
|
|
2016-02-27 02:37:15 +00:00
|
|
|
#### --output, -o <output>
|
|
|
|
|
|
|
|
output
|
|
|
|
|
2015-11-16 02:08:02 +00:00
|
|
|
# Settings
|
|
|
|
|
|
|
|
## settings
|
|
|
|
|
|
|
|
Use this command to display detected settings
|
|
|
|
|
|
|
|
Examples:
|
|
|
|
|
|
|
|
$ resin settings
|
|
|
|
|
2015-09-01 17:01:47 +00:00
|
|
|
# Wizard
|
2015-04-16 13:34:40 +00:00
|
|
|
|
2015-09-01 17:01:47 +00:00
|
|
|
## quickstart [name]
|
2015-04-16 14:42:09 +00:00
|
|
|
|
2015-09-01 17:01:47 +00:00
|
|
|
Use this command to run a friendly wizard to get started with resin.io.
|
2015-04-16 13:34:40 +00:00
|
|
|
|
2015-09-01 17:01:47 +00:00
|
|
|
The wizard will guide you through:
|
2015-04-16 13:34:40 +00:00
|
|
|
|
2015-09-01 17:01:47 +00:00
|
|
|
- Create an application.
|
|
|
|
- Initialise an SDCard with the resin.io operating system.
|
|
|
|
- Associate an existing project directory with your resin.io application.
|
|
|
|
- Push your project to your devices.
|
2015-04-16 13:34:40 +00:00
|
|
|
|
|
|
|
Examples:
|
|
|
|
|
2016-01-11 20:01:40 +00:00
|
|
|
$ resin quickstart
|
|
|
|
$ resin quickstart MyApp
|
2015-04-16 13:34:40 +00:00
|
|
|
|
2017-04-11 13:25:54 +00:00
|
|
|
# Local
|
|
|
|
|
|
|
|
## local configure <target>
|
|
|
|
|
|
|
|
Use this command to configure or reconfigure a resinOS drive or image.
|
|
|
|
|
|
|
|
Examples:
|
|
|
|
|
|
|
|
$ resin local configure /dev/sdc
|
|
|
|
$ resin local configure path/to/image.img
|
|
|
|
|
|
|
|
## local flash <image>
|
|
|
|
|
|
|
|
Use this command to flash a resinOS image to a drive.
|
|
|
|
|
|
|
|
Examples:
|
|
|
|
|
|
|
|
$ resin local flash path/to/resinos.img
|
|
|
|
$ resin local flash path/to/resinos.img --drive /dev/disk2
|
|
|
|
$ resin local flash path/to/resinos.img --drive /dev/disk2 --yes
|
|
|
|
|
|
|
|
### Options
|
|
|
|
|
|
|
|
#### --yes, -y
|
|
|
|
|
|
|
|
confirm non-interactively
|
|
|
|
|
|
|
|
#### --drive, -d <drive>
|
|
|
|
|
|
|
|
drive
|
|
|
|
|
|
|
|
## local logs [deviceIp]
|
|
|
|
|
|
|
|
|
|
|
|
Examples:
|
|
|
|
|
|
|
|
$ resin local logs
|
|
|
|
$ resin local logs -f
|
|
|
|
$ resin local logs 192.168.1.10
|
|
|
|
$ resin local logs 192.168.1.10 -f
|
|
|
|
$ resin local logs 192.168.1.10 -f --app-name myapp
|
|
|
|
|
|
|
|
### Options
|
|
|
|
|
|
|
|
#### --follow, -f
|
|
|
|
|
|
|
|
follow log
|
|
|
|
|
|
|
|
#### --app-name, -a <name>
|
|
|
|
|
|
|
|
name of container to get logs from
|
|
|
|
|
|
|
|
## local promote [deviceIp]
|
|
|
|
|
|
|
|
Warning: 'resin promote' requires an openssh-compatible client to be correctly
|
|
|
|
installed in your shell environment. For more information (including Windows
|
|
|
|
support) please check the README here: https://github.com/resin-io/resin-cli
|
|
|
|
|
|
|
|
Use this command to promote your device.
|
|
|
|
|
|
|
|
Promoting a device will provision it onto the Resin platform,
|
|
|
|
converting it from an unmanaged device to a managed device.
|
|
|
|
|
|
|
|
Examples:
|
|
|
|
|
|
|
|
$ resin local promote
|
|
|
|
$ resin local promote --port 22222
|
|
|
|
$ resin local promote --verbose
|
|
|
|
|
|
|
|
### Options
|
|
|
|
|
|
|
|
#### --verbose, -v
|
|
|
|
|
|
|
|
increase verbosity
|
|
|
|
|
|
|
|
#### --port, -p <port>
|
|
|
|
|
|
|
|
ssh port number (default: 22222)
|
|
|
|
|
|
|
|
## local scan
|
|
|
|
|
|
|
|
|
|
|
|
Examples:
|
|
|
|
|
|
|
|
$ resin local scan
|
|
|
|
$ resin local scan --timeout 120
|
|
|
|
$ resin local scan --verbose
|
|
|
|
|
|
|
|
### Options
|
|
|
|
|
|
|
|
#### --verbose, -v
|
|
|
|
|
|
|
|
Display full info
|
|
|
|
|
|
|
|
#### --timeout, -t <timeout>
|
|
|
|
|
|
|
|
Scan timeout in seconds
|
|
|
|
|
|
|
|
## local ssh [deviceIp]
|
|
|
|
|
|
|
|
Warning: 'resin local ssh' requires an openssh-compatible client to be correctly
|
|
|
|
installed in your shell environment. For more information (including Windows
|
|
|
|
support) please check the README here: https://github.com/resin-io/resin-cli
|
|
|
|
|
|
|
|
Use this command to get a shell into the running application container of
|
|
|
|
your device.
|
|
|
|
|
|
|
|
The '--host' option will get you a shell into the Host OS of the resinOS device.
|
|
|
|
No option will return a list of containers to enter or you can explicitly select
|
|
|
|
one by passing its name to the --container option
|
|
|
|
|
|
|
|
Examples:
|
|
|
|
|
|
|
|
$ resin local ssh
|
|
|
|
$ resin local ssh --host
|
|
|
|
$ resin local ssh --container chaotic_water
|
|
|
|
$ resin local ssh --container chaotic_water --port 22222
|
|
|
|
$ resin local ssh --verbose
|
|
|
|
|
|
|
|
### Options
|
|
|
|
|
|
|
|
#### --verbose, -v
|
|
|
|
|
|
|
|
increase verbosity
|
|
|
|
|
|
|
|
#### --host, -s
|
|
|
|
|
|
|
|
get a shell into the host OS
|
|
|
|
|
|
|
|
#### --container, -c <container>
|
|
|
|
|
|
|
|
name of container to access
|
|
|
|
|
|
|
|
#### --port, -p <port>
|
|
|
|
|
|
|
|
ssh port number (default: 22222)
|
|
|
|
|
|
|
|
## local push [deviceIp]
|
|
|
|
|
|
|
|
Warning: 'resin local push' requires an openssh-compatible client and 'rsync' to
|
|
|
|
be correctly installed in your shell environment. For more information (including
|
|
|
|
Windows support) please check the README here: https://github.com/resin-io/resin-cli
|
|
|
|
|
|
|
|
Use this command to push your local changes to a container on a LAN-accessible resinOS device on the fly.
|
|
|
|
|
|
|
|
If `Dockerfile` or any file in the 'build-triggers' list is changed,
|
|
|
|
a new container will be built and run on your device.
|
|
|
|
If not, changes will simply be synced with `rsync` into the application container.
|
|
|
|
|
|
|
|
After every 'resin local push' the updated settings will be saved in
|
|
|
|
'<source>/.resin-sync.yml' and will be used in later invocations. You can
|
|
|
|
also change any option by editing '.resin-sync.yml' directly.
|
|
|
|
|
|
|
|
Here is an example '.resin-sync.yml' :
|
|
|
|
|
|
|
|
$ cat $PWD/.resin-sync.yml
|
|
|
|
destination: '/usr/src/app'
|
|
|
|
before: 'echo Hello'
|
|
|
|
after: 'echo Done'
|
|
|
|
ignore:
|
|
|
|
- .git
|
|
|
|
- node_modules/
|
|
|
|
|
|
|
|
Command line options have precedence over the ones saved in '.resin-sync.yml'.
|
|
|
|
|
|
|
|
If '.gitignore' is found in the source directory then all explicitly listed files will be
|
|
|
|
excluded when using rsync to update the container. You can choose to change this default behavior with the
|
|
|
|
'--skip-gitignore' option.
|
|
|
|
|
|
|
|
Examples:
|
|
|
|
|
|
|
|
$ resin local push
|
|
|
|
$ resin local push --app-name test-server --build-triggers package.json,requirements.txt
|
|
|
|
$ resin local push --force-build
|
|
|
|
$ resin local push --force-build --skip-logs
|
|
|
|
$ resin local push --ignore lib/
|
|
|
|
$ resin local push --verbose false
|
|
|
|
$ resin local push 192.168.2.10 --source . --destination /usr/src/app
|
|
|
|
$ resin local push 192.168.2.10 -s /home/user/myResinProject -d /usr/src/app --before 'echo Hello' --after 'echo Done'
|
|
|
|
|
|
|
|
### Options
|
|
|
|
|
|
|
|
#### --source, -s <path>
|
|
|
|
|
|
|
|
root of project directory to push
|
|
|
|
|
|
|
|
#### --destination, -d <path>
|
|
|
|
|
|
|
|
destination path on device container
|
|
|
|
|
|
|
|
#### --ignore, -i <paths>
|
|
|
|
|
|
|
|
comma delimited paths to ignore when syncing with 'rsync'
|
|
|
|
|
|
|
|
#### --skip-gitignore
|
|
|
|
|
|
|
|
do not parse excluded/included files from .gitignore
|
|
|
|
|
|
|
|
#### --before, -b <command>
|
|
|
|
|
|
|
|
execute a command before pushing
|
|
|
|
|
|
|
|
#### --after, -a <command>
|
|
|
|
|
|
|
|
execute a command after pushing
|
|
|
|
|
|
|
|
#### --progress, -p
|
|
|
|
|
|
|
|
show progress
|
|
|
|
|
|
|
|
#### --skip-logs
|
|
|
|
|
|
|
|
do not stream logs after push
|
|
|
|
|
|
|
|
#### --verbose, -v
|
|
|
|
|
|
|
|
increase verbosity
|
|
|
|
|
|
|
|
#### --app-name, -n <name>
|
|
|
|
|
|
|
|
application name - may contain lowercase characters, digits and one or more dashes. It may not start or end with a dash.
|
|
|
|
|
|
|
|
#### --build-triggers, -r <files>
|
|
|
|
|
|
|
|
comma delimited file list that will trigger a container rebuild if changed
|
|
|
|
|
|
|
|
#### --force-build, -f
|
|
|
|
|
|
|
|
force a container build and run
|
|
|
|
|
|
|
|
#### --env, -e <env>
|
|
|
|
|
|
|
|
environment variable (e.g. --env 'ENV=value'). Multiple --env parameters are supported.
|
|
|
|
|
|
|
|
## local stop [deviceIp]
|
|
|
|
|
|
|
|
|
|
|
|
Examples:
|
|
|
|
|
|
|
|
$ resin local stop
|
|
|
|
$ resin local stop --app-name myapp
|
|
|
|
$ resin local stop --all
|
|
|
|
$ resin local stop 192.168.1.10
|
|
|
|
$ resin local stop 192.168.1.10 --app-name myapp
|
|
|
|
|
|
|
|
### Options
|
|
|
|
|
|
|
|
#### --all
|
|
|
|
|
|
|
|
stop all containers
|
|
|
|
|
|
|
|
#### --app-name, -a <name>
|
|
|
|
|
|
|
|
name of container to stop
|
|
|
|
|
2017-04-26 12:34:40 +00:00
|
|
|
# Deploy
|
|
|
|
|
|
|
|
## build [source]
|
|
|
|
|
|
|
|
Use this command to build a container with a provided docker daemon.
|
|
|
|
|
|
|
|
You must provide either an application or a device-type/architecture
|
|
|
|
pair to use the resin Dockerfile pre-processor
|
|
|
|
(e.g. Dockerfile.template -> Dockerfile).
|
|
|
|
|
|
|
|
Examples:
|
|
|
|
|
|
|
|
$ resin build
|
|
|
|
$ resin build ./source/
|
|
|
|
$ resin build --deviceType raspberrypi3 --arch armhf
|
|
|
|
$ resin build --application MyApp ./source/
|
|
|
|
$ resin build --docker '/var/run/docker.sock'
|
|
|
|
$ resin build --dockerHost my.docker.host --dockerPort 2376 --ca ca.pem --key key.pem --cert cert.pem
|
|
|
|
|
|
|
|
### Options
|
|
|
|
|
|
|
|
#### --arch, -A <arch>
|
|
|
|
|
|
|
|
The architecture to build for
|
|
|
|
|
2017-05-29 12:59:25 +00:00
|
|
|
#### --deviceType, -d <deviceType>
|
2017-04-26 12:34:40 +00:00
|
|
|
|
|
|
|
The type of device this build is for
|
|
|
|
|
|
|
|
#### --application, -a <application>
|
|
|
|
|
|
|
|
The target resin.io application this build is for
|
|
|
|
|
|
|
|
#### --docker, -P <docker>
|
|
|
|
|
|
|
|
Path to a local docker socket
|
|
|
|
|
|
|
|
#### --dockerHost, -h <dockerHost>
|
|
|
|
|
|
|
|
The address of the host containing the docker daemon
|
|
|
|
|
|
|
|
#### --dockerPort, -p <dockerPort>
|
|
|
|
|
|
|
|
The port on which the host docker daemon is listening
|
|
|
|
|
|
|
|
#### --ca <ca>
|
|
|
|
|
|
|
|
Docker host TLS certificate authority file
|
|
|
|
|
|
|
|
#### --cert <cert>
|
|
|
|
|
|
|
|
Docker host TLS certificate file
|
|
|
|
|
|
|
|
#### --key <key>
|
|
|
|
|
|
|
|
Docker host TLS key file
|
|
|
|
|
|
|
|
#### --tag, -t <tag>
|
|
|
|
|
|
|
|
The alias to the generated image
|
|
|
|
|
2017-05-12 10:01:37 +00:00
|
|
|
#### --buildArg, -B <arg>
|
|
|
|
|
|
|
|
Set a build-time variable (eg. "-B 'ARG=value'"). Can be specified multiple times.
|
|
|
|
|
2017-04-26 12:34:40 +00:00
|
|
|
#### --nocache
|
|
|
|
|
|
|
|
Don't use docker layer caching when building
|
|
|
|
|
2017-05-04 12:00:48 +00:00
|
|
|
#### --emulated, -e
|
|
|
|
|
|
|
|
Run an emulated build using Qemu
|
|
|
|
|
2017-04-26 12:34:40 +00:00
|
|
|
## deploy <appName> [image]
|
|
|
|
|
|
|
|
Use this command to deploy and optionally build an image to an application.
|
|
|
|
|
|
|
|
Usage: deploy <appName> ([image] | --build [--source build-dir])
|
|
|
|
|
|
|
|
Note: If building with this command, all options supported by `resin build`
|
|
|
|
are also supported with this command.
|
|
|
|
|
|
|
|
Examples:
|
|
|
|
$ resin deploy myApp --build --source myBuildDir/
|
|
|
|
$ resin deploy myApp myApp/myImage
|
|
|
|
|
|
|
|
### Options
|
|
|
|
|
|
|
|
#### --build, -b
|
|
|
|
|
|
|
|
Build image then deploy
|
|
|
|
|
|
|
|
#### --source, -s <source>
|
|
|
|
|
|
|
|
The source directory to use when building the image
|
|
|
|
|
2017-05-12 10:01:37 +00:00
|
|
|
#### --nologupload
|
|
|
|
|
|
|
|
Don't upload build logs to the dashboard with image (if building)
|
|
|
|
|
2017-04-26 12:34:40 +00:00
|
|
|
#### --docker, -P <docker>
|
|
|
|
|
|
|
|
Path to a local docker socket
|
|
|
|
|
|
|
|
#### --dockerHost, -h <dockerHost>
|
|
|
|
|
|
|
|
The address of the host containing the docker daemon
|
|
|
|
|
|
|
|
#### --dockerPort, -p <dockerPort>
|
|
|
|
|
|
|
|
The port on which the host docker daemon is listening
|
|
|
|
|
|
|
|
#### --ca <ca>
|
|
|
|
|
|
|
|
Docker host TLS certificate authority file
|
|
|
|
|
|
|
|
#### --cert <cert>
|
|
|
|
|
|
|
|
Docker host TLS certificate file
|
|
|
|
|
|
|
|
#### --key <key>
|
|
|
|
|
|
|
|
Docker host TLS key file
|
|
|
|
|
|
|
|
#### --tag, -t <tag>
|
|
|
|
|
|
|
|
The alias to the generated image
|
|
|
|
|
2017-05-12 10:01:37 +00:00
|
|
|
#### --buildArg, -B <arg>
|
|
|
|
|
|
|
|
Set a build-time variable (eg. "-B 'ARG=value'"). Can be specified multiple times.
|
|
|
|
|
2017-04-26 12:34:40 +00:00
|
|
|
#### --nocache
|
|
|
|
|
|
|
|
Don't use docker layer caching when building
|
2017-05-12 10:01:37 +00:00
|
|
|
|
2017-05-04 12:00:48 +00:00
|
|
|
#### --emulated, -e
|
|
|
|
|
|
|
|
Run an emulated build using Qemu
|
|
|
|
|