The official balena CLI tool.
Go to file
Paulo Castro abf573fa47 Begin the transition to oclif with 'balena env add' (fix dropped leading
zero in device UUID).

This commit is fairly chunky because it adds the oclif dependency for
the first time, and refactors the CLI help and docs generation code to
accommodate both Capitano and oclif.

Change-type: patch
Signed-off-by: Paulo Castro <paulo@balena.io>
2019-06-04 13:51:56 +01:00
.github Add maintainer, reviewers, and devexp team as code owners 2019-03-12 13:34:27 +00:00
automation Begin the transition to oclif with 'balena env add' (fix dropped leading 2019-06-04 13:51:56 +01:00
bin Begin the transition to oclif with 'balena env add' (fix dropped leading 2019-06-04 13:51:56 +01:00
doc Begin the transition to oclif with 'balena env add' (fix dropped leading 2019-06-04 13:51:56 +01:00
lib Begin the transition to oclif with 'balena env add' (fix dropped leading 2019-06-04 13:51:56 +01:00
patches Fix 'local configure' on macOS standalone installation 2019-05-10 16:18:13 +01:00
tests Rename everything from 'resin' to 'balena' 2018-10-29 22:29:02 +01:00
typings Bump min Node.js version to 8.0, ts-node to 8.1 and typescript to 3.4. 2019-06-04 13:51:55 +01:00
.editorconfig fix resin local push help message and lint errors 2017-03-21 12:06:05 +03:00
.gitignore .gitignore: Add fast-boot.json generated by balena-dev command 2019-06-03 13:57:12 +03:00
.hound.yml Change java_script to javascript in hound config 2015-10-19 14:21:10 -04:00
.npmrc Use an .npmrc to prevent creating a package-lock on each install 2019-05-31 16:52:55 +03:00
.prettierrc Fix prettier configuration to avoid linting errors 2018-03-05 16:02:09 +01:00
.resinci.yml Update README and INSTALL docs (review typos and some rewording) 2019-05-01 18:15:47 +01:00
.travis.yml Bump min Node.js version to 8.0, ts-node to 8.1 and typescript to 3.4. 2019-06-04 13:51:55 +01:00
appveyor.yml Bump min Node.js version to 8.0, ts-node to 8.1 and typescript to 3.4. 2019-06-04 13:51:55 +01:00
balena-completion.bash Rename everything from 'resin' to 'balena' 2018-10-29 22:29:02 +01:00
CHANGELOG.md v10.17.5 2019-06-04 09:10:48 +03:00
coffeelint.json Add Coffeelint support 2014-10-31 09:48:53 -04:00
gulpfile.coffee dependencies: bump gulp to v4 2019-05-02 11:53:54 +01:00
INSTALL.md Fix video url 2019-05-15 14:33:54 +01:00
LICENSE Change license to Apache 2.0 2016-01-03 23:58:51 -04:00
package.json Begin the transition to oclif with 'balena env add' (fix dropped leading 2019-06-04 13:51:56 +01:00
README.md Update README and INSTALL docs (review typos and some rewording) 2019-05-01 18:15:47 +01:00
TROUBLESHOOTING.md Unify the CLI instructions between capitanodoc.ts and README.md, move 2019-04-29 14:27:32 +01:00
tsconfig.json Bump min Node.js version to 8.0, ts-node to 8.1 and typescript to 3.4. 2019-06-04 13:51:55 +01:00
tslint.json Add tslint config to enable consistent lint process 2019-04-24 12:48:52 +01:00

balena CLI

The official balena CLI tool.

npm version dependencies Gitter

About

The balena CLI (Command-Line Interface) allows you to interact with the balenaCloud and the balena API through a terminal window on Linux, macOS or Windows. You can also write shell scripts around it, or import its Node.js modules to use it programmatically. As an open-source project on GitHub, your contribution is also welcome!

Installation

Check the balena CLI installation instructions on GitHub.

Getting Started

Choosing a shell (command prompt/terminal)

On Windows, the standard Command Prompt (cmd.exe) and PowerShell are supported. We are aware of users also having a good experience with alternative shells, including:

On macOS and Linux, the standard terminal window is supported. Optionally, bash command auto completion may be enabled by copying the balena-completion.bash file to your system's bash_completion directory: check Docker's command completion guide for system setup instructions.

Logging in

Several CLI commands require access to your balenaCloud account, for example in order to push a new release to your application. Those commands require creating a CLI login session by running:

$ balena login

Proxy support

HTTP(S) proxies can be configured through any of the following methods, in order of preference:

  • Set the `BALENARC_PROXY` environment variable in URL format (with protocol, host, port, and optionally basic auth).
  • Alternatively, use the balena config file (project-specific or user-level) and set the `proxy` setting. It can be:
  • Alternatively, set the conventional `https_proxy` / `HTTPS_PROXY` / `http_proxy` / `HTTP_PROXY` environment variable (in the same standard URL format).

To get a proxy to work with the balena ssh command, check the installation instructions.

Command reference documentation

The full CLI command reference is available on the web or by running balena help and balena help --verbose.

Support, FAQ and troubleshooting

If you come across any problems or would like to get in touch:

Contributing

The balena CLI is an open source project and your contribution is welcome!

The CLI was originally written in CoffeeScript, but we have decided to migrate to TypeScript in order to take advantage of static typing and formal programming interfaces. The migration is taking place gradually, as part of maintenance work or the implementation of new features.

After cloning this repository and running npm install you can build the CLI using npm run build. You can then run the generated build using ./bin/balena. In order to ease development:

  • you can build the CLI using the npm run build:fast variant which skips some of the build steps or
  • you can use ./bin/balena-dev which live transpiles the sources of the CLI.

In either case, before opening a PR be sure to also test your changes with npm test.

Note on editing this README document

This file is edited/created by hand, but it is then automatically parsed to extract selected subsections for the CLI's web documentation page. The code that parses this file is in automation/capitanodoc/capitanodoc.ts .

License

The project is licensed under the Apache 2.0 License. A copy is also available in the LICENSE file in this repository.