CLI

TotalCross CLI Tool

With time, most developers grow a preference for their favorite IDE. For that reason we are planning to provide a CLI Tool that can be used with any Java IDE of your choice (IntelliJ, Eclipse, Netbeans and Visual Studio Code as well). This CLI Tool will create projects, package, and deploy them. You will aso be able to register and log in as shown bellow.

Be aware that our CLI Tool is its alpha version.

Minimum Requirements

You will need to have installed on your computer:

Install TotalCross CLI Tool in 2 steps

Make sure all dependencies (Java 8, Maven and Node.js) are installed on your machine.

Step 1: Open your Terminal/CMD/Powershell and type npm install --global totalcross-npm-cli.

Install TotalCross CLI using npm

Step 2: Verify your installation by typing totalcross --version.

Verifying your installation

Done. TotalCross CLI Toll is successfully installed.

Register in 3 steps

To have access to all features you need a TotalCross account. Create and verify your account in three steps. If you already have a TotalCross account, skip this session.

Step 1: Open your Terminal/CMD/Powershell.

Step 2: Type totalcross register and fill in your information.

Registration on CLI

Step 3: Your account will be created when you fill in all fields. You will receive an email shortly asking you to verify your account.

Your TotalCross account has been created.

Login

Step 1: Open your Terminal/CMD/Powershell.

Step 2: Type totalcross login and enter your email and password used during registration.

Login on CLI

Ready! You are logged in.

Hello World

Write your first program.

Step 1: Open your Terminal/CMD/Powershell.

Step 2: Type totalcross create. You will be asked for the following information that you will be typing into the terminal as they appear.

Step 3: After answering the questions, your project will be created and ready to be developed. Type ls to check if your project was created in a folder with the name of the project (what you entered as project artifactID).

Package

Step 1: Open your Terminal/CMD/Powershell

Step 2: cd into your project folder

Step 3: Run totalcross package

Step 4: Wait a minute or so. The result of the package will be in the folder target/install/<platform>

Deploy & Run

Deploy is working only for linux arm programs. This feature performs the implementation and execution of the platform via ssh.

CLI
CLI

In the version, TotalCross CLI v1.1.2 (Alpha), the deploy has been disabled for windows

Step 1: open your Terminal/CMD/Powershell.

Step 2: cd into your project folder.

Step 3: run totalcross deploy, fill in the device information to deploy.

Step 4: In You want to run after deploy ?, check yes, if you just want to deploy choose the no.

Step 5: see the result on the screen or with VNC

Now you know how to create, package, deploy and run using TotalCross.

Usage

Commands

To view detail on any command, use: totalcross [options] [command]

  • create create new TotalCross project

  • package runs mvn package

  • deploy deploy your application

  • login login into your TotalCross account

  • registercreate TotalCross account

Options:

  • -V, --version output the version number

  • -h, --help output usage information

Feedback

TotalCross CLI is still under active development and we’d love to hear your feedback through GitLab issues.