|Table of Contents|
Appcelerator provides a command-line interface to check and configure your environment setup, create and build applications, and much more. This guide covers how to install the Appcelerator CLI and execute some common tasks.
appc --help to see all available target options or see the Appcelerator Command-Line Interface Reference.
To setup the Appcelerator CLI, install Node.js, install the
appcelerator module using the NPM CLI, then run the
appc setup command to download and setup the latest CLI package.
The CLI requires Node.js 0.10.13 or later. The minimum Node version depends upon the appc CLI version you want to use. To obtain the exact Node version you need please refer to Titanium Compatibility Matrix. If you don't have Node installed, install it from: nodejs.org
Before installing the CLI, you should decide where you want the Node Package Manager (
npm) to install packages. By default
npm installs into
/usr/local on OS X, which requires that you run
npm as root. This is not recommended. You can avoid having to run
npm by doing one of the following:
- Make the
/usr/localdirectory writable by all:
sudo chmod 777 /usr/local
npmto install to your home directory, or another directory of your choosing by setting the
npmprefix. For example, you can add the following to your
.bash_profileor other initialization file:
In this case,
npm packages are installed to
$HOME/lib/node_modules and launch scripts are installed in
$HOME/bin must be in your PATH.
For more information, see Installing Node.
Install the CLI
appcCLI. You many need to prepend the command with
Code Block language bash
npm install appcelerator -g
Setup the AMPLIFY Appcelerator Services environment. This process will download the latest updates, setup the CLI and verify your development environment.
Code Block language bash
After getting the latest updates, you are prompted for your AMPLIFY Appcelerator Services credentials.
If you are a member or more than one organization, you will be prompted to select an organization.
Next, you must authorize your computer. Select either to send the authorization code to a phone number (using SMS/text messaging) or e-mail associated with your AMPLIFY Appcelerator Services account.
- Enter the code you received.
- Finally, the CLI will ask you about the projects you want to develop, and based on your answers, will check your environment to verify it is OK.
If you encounter an error installing
appc, see Troubleshooting npm Problems.
Update the CLI
The CLI has two components: the NPM package and the Core package, which contains the other CLI components.
To update the NPM package, run the
npm install appcelerator -g command. Note that you may need to prefix the command with
sudo on OS X systems.
To update the Core package, run the
appc setup command to download and install the latest package.
Configure the CLI
If you are using the Appcelerator CLI from behind a proxy, you need to configure your proxy server settings using the
appc config set command to set the
proxyServer variable to your proxy server settings.
appc config set proxyServer [http|https]://<username>:<password>@<domain>:<port_number> ## Example appc config set proxyServer https://admin:firstname.lastname@example.org:554
Note: We encourage you to use
appc config set cafile as a security option over
appc config set strictSSL false as the latter doesn’t do SSL key validation when making requests.
Set the Core Package Version
To use a specific version of the core package (which contains specific versions of the Alloy, Arrow and Titanium CLIs), run the
appc use <version> command. If you do not have the specified version installed, the CLI will download and install it for you.
To see a list of available versions, run the
appc use command (without a version).
appc use The following versions are available: 5.3.0 5.3.1 5.4.0 5.5.0 5.5.1 6.0.0 6.1.0 6.1.2 6.1.4 6.2.0 6.2.1 6.2.2 6.2.3 6.2.4 6.3.0 7.0.0 7.0.1 7.0.2
After setting up the CLI, please review Appcelerator CLI Tasks on building apps with the CLI.