The Toit CLI is used for interacting with the Toit console and your Toit devices.
Download the Toit executable for macOS.
You might need to accept this macOS warning when download begins.
- Unpack the
toit_darwin.tgzfile and save the executable file named
toitinto a folder - for example the
Watch the installation video, if you need guidance.
To make sure you can run the Toit CLI in a terminal window from any directory, add the Toit executable to your PATH environment variable by editing the shell configuration script. For the zsh you can update the PATH in .zprofile or .zhsrc. For bash in .profile or .bashrc.
For example, if you put
toit into your
Applications folder, and your shell is
If your shell is bash, then execute:
You can determine your shell by running
To verify that you have successfully configured the PATH with the
toit executable, open a new terminal window and type
The output is a list of all available commands in the Toit CLI.
You may need administrator rights to run
toit at the end of the installation process.
Toit comes with a language server and provides a Visual Studio Code Language Extension for the Toit programming language.
You can download Visual Studio Code here.
The Toit Language Extension provides built-in language support for the Toit programming language, but also a device view and a serial view from where you can interact directly with your devices.
The Toit language extension also provides helpful commands for the developer, such that you can run or deploy Toit programs on your devices directly from Visual Studio Code.
On macOS, you need to configure the VSCode PATH in Visual Studio Code.
Start by launching Visual Studio Code. In the View menu, choose to open the Command Palette.
shell command to find the Shell Command: Install 'code' command in PATH.
The Toit Language Extension is currently only supported for Visual Studio Code.