Trinity CLI is a command line tool that helps you manage your elastOS applications, including creating a new application, running during development, and publishing.
You need a few things installed on your computer for the CLI to run well:
Windows users: Please read the preliminary steps for windows 10 users below first.
$ sudo npm install -g @elastosfoundation/trinity-cli --unsafe-perm
We do not provide native support for windows. Nevertheless, windows developers can use the Trinity CLI using Windows 10 WSL (Linux support).
WSL can install a minimal version of Linux Ubuntu inside windows 10. After that, you can start a linux terminal and setup/run Trinity-CLI.
In order for adb, the android communication tool, to work through WSL, you will have to install the android SDK, same version, on both your windows host and the Ubuntu guest (for both ADBs being able to share the same daemon instance).
Launch ubuntu in WSL (from a windows powershell):
Note that when using WSL, Ubuntu can access your windows files from /mnt/c/.
Setup your ubuntu environment:
# Base requirements sudo apt -y install openjdk-8-jdk build-essential curl dirmngr apt-transport-https lsb-release ca-certificates # Install NodeJS 12 instead of 8 or 10 curl -sL https://deb.nodesource.com/setup_12.x | sudo -E bash - sudo apt -y install nodejs
Go to https://developer.android.com/studio#downloads -> download options -> command line tools only.
Download both windows and linux ZIP files.
Unzip both ZIP files.
Install android platform tools using the SDK manager (on both windows and linux):
A platform-tools folder gets created at the root of [extracted_android_tools_folder]
First on windows (to start the daemon on windows), then on ubuntu:
During the next steps, always install and run trinity-cli from WSL.
You can now go on with installing Trinity CLI.
You can now create a first elastOS DApp, and run it on your device. Check the trinity project setup page