This message was updated from the old details about the first CLI Alpha release to more current versions of both the
CLI as well as the "RC candidates for the Arduino IDE2.
Most of this was taken from a few of Paul's posts.
Arduino IDE 2
You can download the: Future Version of the Arduino IDE from the Arduino Software Page
I started with the RC3 page, but more recently I have been using the Nightly builds.
As Paul mentions in the CLI part below, the IDE has some rough points at this point with working with Teensy boards, but I have been using it to do simple testing versus using the Arduino 1 versions. One of the main limitations is that the Serial monitor code only works with USB Types that include Serial...
But I personally work around that if necessary by using TyCommander.
Paul has built a "Real" setup to plug into the Arduino Board Manager.
Once you have the IDE 2 up and running, you open open up the Preferences Page: On Windows File->Preferences
You will see a dialog that looks like:
As you can see in the Additional board manager URLS you enter:
Code:
https://www.pjrc.com/teensy/td_156/package_teensy_index.json
Close the dialog.. I found I needed to exit the IDE and restart it and then you can now install the Teensy boards.
You Open the Boards Manager and Scroll down until you see the Teensy Install and click the Install button.

You then should have the Teensy boards installed. Note: this install stuff in a different location then the Teensyduino installs.
On my Windows machine it is stored at: C:\Users\kurte\AppData\Local\Arduino15\packages\te ensy
And if you find any issues with the Arduino IDE, you might want to search the list of issues that have already been open.
You can find them up at: https://github.com/arduino/arduino-ide/issues
Arduino CLI
From post #110
Here's a quick recap, where we're at today... for anyone else who wants to give this new software a try.
Arduino CLI seems to be working pretty well, but with the caveat that uploading is done by running the GUI-based Teensy Loader. Packages are available for Windows, MacOS and Linux x86_64. If you *really* need another Linux arch, just ask. True headless mode is planned, but we're waiting on an IDE update, specifically issue 790, before we can reliably detect whether upload should be done headless or with the GUI.
Arduino IDE 2.0-rc3 isn't really usable for Teensy at this point. The main thing to be done is reporting issues, which is an awesome way to contribute to the Arduino & Teensy community. Hopefully the new 2.0 IDE will become more usable with 2.0-rc4 as the Arduino developers fix the issues we've already reported.
To use Arduino CLI, download the nightly build from this page. When you extract, it's just a single executable file. Put it somewhere like /usr/local/bin on Linux or MacOS, or edit your PATH environment variable so it runs when you type "arduino-cli" on the command line.
The first step is to run "config init" like this:
Code:
./arduino-cli config init
or on Windows....
Code:
arduino-cli.exe config init
It will create a arduino-cli.yaml config file and tell you the full pathname. Edit that file and add "https://www.pjrc.com/teensy/td_156/package_teensy_index.json". It should look like this:
Code:
board_manager:
additional_urls: [
https://www.pjrc.com/teensy/td_156/package_teensy_index.json
]
After editing, run "arduino-cli config dump". You should see something similar to this:

To install Teensy's files, run "arduino-cli core install teensy:avr". Today the package version is 1.56.1. Once it's installed, you can run commands like "arduino-cli board list" and it should probably detect Teensy, even when running in non-Serial modes. You can compile, upload, monitor (even in Teensy's non-Serial modes).
Just remember, today upload always runs the GUI-based Teensy Loader, so if running on Linux you need a full desktop environment. But if you've been wanting to use Arduino CLI for scripts or other automation, hopefully now you can begin to move forward. An update to run fully headless will be coming, once Arduino updates fix those issues mentioned above.