87f46cb957
Fixes #695 Fixes #410 Change-Type: minor |
||
---|---|---|
.github | ||
bin | ||
build | ||
doc | ||
extras/capitanodoc | ||
lib | ||
.editorconfig | ||
.gitignore | ||
.hound.yml | ||
.npmignore | ||
.travis.yml | ||
capitanodoc.coffee | ||
CHANGELOG.md | ||
coffeelint.json | ||
gulpfile.coffee | ||
LICENSE | ||
package.json | ||
README.md | ||
TROUBLESHOOTING.md |
Resin CLI
The official resin.io CLI tool.
Requisites
- NodeJS (>= v4)
- Git
- The following executables should be correctly installed in your shell environment:
ssh
: Any recent version of the OpenSSH ssh client (required byresin sync
andresin ssh
)- if you need
ssh
to work behind the proxy you also needproxytunnel
installed (available asproxytunnel
package for Ubuntu, for example)
- if you need
rsync
: >= 2.6.9 (required byresin sync
)
Windows Support
Before installing resin-cli, you'll need a working node-gyp environment. If you don't already have one you'll see native module build errors during installation. To fix this, run npm install -g --production windows-build-tools
in an administrator console (available as 'Command Prompt (Admin)' when pressing windows+x in Windows 7+).
resin sync
and resin ssh
have not been thoroughly tested on the standard Windows cmd.exe shell. We recommend using bash (or a similar) shell, like Bash for Windows 10 or Git for Windows.
If you still want to use cmd.exe
you will have to use a package manager like MinGW or chocolatey. For MinGW the steps are:
- Install MinGW.
- Install the
msys-rsync
andmsys-openssh
packages. - Add MinGW to the
%PATH%
if this hasn't been done by the installer already. The location where the binaries are places is usuallyC:\MinGW\msys\1.0\bin
, but it can vary if you selected a different location in the installer. - Copy your SSH keys to
%homedrive%%homepath\.ssh
. - If you need
ssh
to work behind the proxy you also need to install proxytunnel
Getting Started
Install
This might require elevated privileges in some environments.
$ npm install --global --production resin-cli
Login
$ resin login
(Typically useful, but not strictly required for all commands)
Run commands
Take a look at the full command documentation at https://docs.resin.io/tools/cli/, or by running resin help
.
Plugins
The Resin CLI can be extended with plugins to automate laborious tasks and overall provide a better experience when working with Resin.io. Check the plugin development tutorial to learn how to build your own!
FAQ
Where is my configuration file?
The per-user configuration file lives in $HOME/.resinrc.yml
or %UserProfile%\_resinrc.yml
, in Unix based operating systems and Windows respectively.
The Resin CLI also attempts to read a resinrc.yml
file in the current directory, which takes precedence over the per-user configuration file.
How do I point the Resin CLI to staging?
The easiest way is to set the RESINRC_RESIN_URL=resinstaging.io
environment variable.
Alternatively, you can edit your configuration file and set resinUrl: resinstaging.io
to persist this setting.
How do I make the Resin CLI persist data in another directory?
The Resin CLI persists your session token, as well as cached images in $HOME/.resin
or %UserProfile%\_resin
.
Pointing the Resin CLI to persist data in another location is necessary in certain environments, like a server, where there is no home directory, or a device running resinOS, which erases all data after a restart.
You can accomplish this by setting RESINRC_DATA_DIRECTORY=/opt/resin
or adding dataDirectory: /opt/resin
to your configuration file, replacing /opt/resin
with your desired directory.
Support
If you're having any problems, check our troubleshooting guide and if your problem is not addressed there, please raise an issue on GitHub and the resin.io team will be happy to help.
You can also get in touch with us in the resin.io forums.
License
The project is licensed under the Apache 2.0 license.