Tessel CLI is the command line interface for the Tessel microcontroller (http://tessel.io). [CLI source.]
Node.js is a prerequisite for installing the Tessel command line. You can install it from the official website, or if you have brew installed:
brew install node
Once Node.js is installed, run this installation script from your terminal:
npm install -g http://s3.amazonaws.com/builds.tessel.io/cli/tessel-cli-current.tar.gz
Push a file and its containing directory into flash memory (persists across power cycles). For more information about what files/folders are sent to Tessel, see the deploying section. Options:
-a, --args
Arguments to passin as process.argv-q, --quiet
[Tessel] Hide tessel deployment messages-m, --messages
[Tessel] Forward stdin as child process messages-l, --logs
[Tessel] Stay connected and print logs-s, --single
[Tessel] Push a single script file to Tessel-h, --help
Show usage for tessel push
Run a script and its containing directory temporarily without writing it to flash. For more information about what files/folders are sent to Tessel, see the deploying section. Options:
-a, --args
Arguments to passin as process.argv-i, --interactive
Enter the REPL-q, --quiet
[Tessel] Hide tessel deployment messages-m, --messages
[Tessel] Forward stdin as child process messages-l, --logs
[Tessel] Stay connected and print logs-s, --single
[Tessel] Push a single script file to Tessel-u --upload-dir
Directory where uploads from process.sendfile should be saved-v, --version
Print tessel-node's version-h, --help
Show usage for tessel push
Interactive JavaScript shell - see REPL docs below
Connects to wifi
Connects to a wifi network without a password
See current wifi status
Disconnect from the current network and forget its credentials
Creates a tarball of all the files that would be sent over to Tessel. This is helpful for checking what files may be too large or missing from any particular script.
Dumps tessel binary code
Uploads new firmware in DFU mode. No tag given: list available tags Relative or absolute filepath: push a local binary to tessel
Run test script to make LEDs blink back and forth
Updates tessel to the newest released firmware localed at filepath or url.
Updates tessel's firmware Options:
-l, --list
List firmware versions-w, --wifi
Optional version of CC3000 wifi firmware to install-b, --build
Optional build of the firmware version (does not update wifi)-f, --force
Forcibly reload firmware onto Tessel-d, --dfu
Apply firmware update to device in DFU mode
Runs through debug script and uploads logs
Show version of CLI
Show version of the connected Tessel
When a host computer deploys code to Tessel (either via the run
or push
command), the host computer bundles up the entire "project directory" and sends it to the Tessel. The CLI must wrap up all the dependencies (node_modules and subfolders) before sending the project over because the Tessel has no mechanism for fetching them from the host computer once the script has initiated on Tessel. The CLI defines the root of a "project directory" as the highest level folder that contains a node_modules folder or a package.json (note: if you pass the -s flag, only a single file is sent). This means that when tessel run
or tessel push
is called, the CLI will traverse up the directory tree until it finds a folder that matches that criteria. It will not bundle the home folder of a filesystem because it's probably greater than the 32MB available on Tessel.
If you're having trouble figuring out which files are being sent to Tessel, use the tessel pack
command.
Source: tessel-repl or tessel-run with the interactive flag set.
Tessel has a REPL, an interactive JavaScript shell. Enter the REPL by running tessel repl
.
Require tessel as usual with var tessel = require('tessel')
Now play! Try tessel.led[1].toggle()
to turn one of the LEDs on or off.
Tessel REPL is under development; feel free to contribute.