Lucky for us, Titanium is also available as a CLI (Command Line Interface) program. In order to use Titanium CLI you need to install node.js first. Node.js has a package manager called npm which allows you to install, update or remove packages.
To install Titanium CLI open a terminal and execute:
$ sudo npm install titanium -g
The -g parameter means to install the package globally on your system, which allows you to call the command in any arbitrary directory.
When the installation is done. You need to setup your Titanium CLI via:
$ titanium setup
This will prompt you with several options. Choose option 1 to quick setup Titanium CLI.
Create a project folder. For your first Titanium app execute:
$ titanium create
Start for example your Android emulator and execute:
$ titanium build -p android -T emulator
This will build your app for Android and execute it in the running Android emulator. During the build process you see something like:
Which results in a running Titanium app running on the Android emulator: