Skip to end of metadata
Go to start of metadata

The Appcelerator Command-Line Interface (CLI) is a Node.js-based command-line tool for managing, building, and deploying Appcelerator projects, including Alloy, Titanium and Arrow projects.  The Appcelerator CLI provides a unified mechanism for using the other CLI components.

This article provides in-depth information about the CLI commands and options.  For information about setting up the CLI and perform some common tasks, see Appcelerator CLI Tasks.

appc commands

If you don't specify all of the required options, appc prompts you for the missing options.

Global options

Option

Description

-h, --helpOutput usage information

--dashboard <dashboard> 

Dashboard URL used for logins

-l, --log-level <LOG_LEVEL>Sets the log output level. Specify either: trace, debug, info, warn or error.

-o, --output <format>

Format output (only "json" is supported)

-v, --version

Output the version of the CLI (if -o "json" is used, the version of npm will also be output)

-q, --quiet

Reduce the amount of text output to the console

--no-colors

Disable colors

--colorsEnable color output

--no-services

Disable services

--no-progress, --no-progress-bars

Disable progress bars

--no-prompt

Disable prompt

--prompt-port <promptPort>

Port to use socket-based prompting

--prompt-type <PROMPT_TYPE>Prompt type. Specify either cli, socket or socket-bundle. Default is cli.
--username <USERNAME>Username for login
--password <USER_PASSWORD>Password for login
-e, --env <ENVIRONMENT>Environment to run the command. Specify either production, preproduction or development.

-O, --org-id <orgId>

Organization id for login

-P, --plugin-paths <pluginPaths>

Comma-separated search paths for plugins

-r, --registry <REGISTRY>

Registry server URL to use

-s, --server <SECURITY_SERVER>

Security server URL used for logins

-v, --vpc-env <vpcEnv>

vpc environment for login

Access

Manage a component's access rights.

Access commands

access get

Retrieves the component's access rights.

Example to get a module's access rights: $ appc access get connector/com.foo@1.0.0

access set

Sets the component's access rights.

Access rights can be either:

  • public: everyone can see the component.
  • private (default): only the publisher can see the component.
  • org: Only certain organizations can see the component.  Use the appc org command to add or remove organizations.
  • user: Only certain users can see the component.  Use the appc user command to add or remove users.
  • user_or_org: Only certain users or organizations can see the component.  Use the appc user or appc org command to add or remove users or organizations, respectively.

Example to set a module's access rights:  appc  access set connector/com.foo@1.0.0 private

Alloy

Run an Alloy CLI command.  See the Alloy Command-Line Interface Reference for more information.

Alloy commands

alloy options

-h, --help

Output usage information

-v, --version

Output the version number

-a, --app <app>

Test app folder for running "alloy test"

-A, --apply

Applies command changes [extract-i18n]

-b, --noBanner

Disable the banner

-c, --config <config>

Pass in compiler configuration

-f, --force

Force the command to execute

-l, --logLevel <logLevel>

Log level (default: 3 [DEBUG])

-n, --no-colors

Turn off colors

-o, --outputPath <outputPath>

Output path for generated code

-p, --project-dir <project-dir>

Titanium project directory

-q, --platform <platform>

Target mobile platform [android,ios,mobileweb]

-s, --spec <spec>

Test spec to use with "alloy test"

-w, --all

Require flag for generate styles

-x, --column <column>

Column for source map query

-y, --line <line>

Line for source map query

-z, --source <source>

Source original file for source map query

--widgetname <name>

Widget name, used with generate command

--testapp <name>

Test app name to import, used with new command

alloy new

Create a new alloy project.

alloy compile

Compile into titanium source code.

alloy extract-i18n

Extracts i18n strings from the source code (js and tss files).

alloy generate

Generate a new alloy type such as a controller.

alloy copy

Copy the controller, view, and style files from <source> to <destination>.

alloy move

Move the controller, view, and style files from <source> to <destination>.

alloy remove

Remove the controller, view, and style files at <source>.

Cloud

Manages Arrow Cloud applications by running an Arrow Cloud CLI command.  See the Arrow Cloud Command-Line Interface Reference for more information.

Cloud commands

cloud options

-h, --helpoutput usage information
-v, --versionoutput the version number
-d, --dir <dir>directory to load app from
-n, --no-colorsturn off colors
--no-bannerturn off banner
--dates turn on dates in logging

cloud new

Create a new cloud app.

cloud add

Add a new end point to an existing app which is based on built-in MVC framework.      

cloud cname

Set or remove cname of an existing app. If no appname provided it can run in app dir or with -d to specify an app dir.     

cloud domain

Set or remove domain of an existing app. If no appname provided it can run in app dir or with -d to specify an app dir.     

cloud list

Show the status of all apps or the app specified by appname.    

cloud logcat

Tail the log entries output from your app. If no appname provided it can run in app dir or with -d to specify an app dir. 'logcat -h' for more options.

cloud loglist

List the log entries during the specified start datetime and end datetime. If no appname provided it can run in app dir or with -d to specify an app dir. 'loglist -h' for more options.    

cloud accesslog

List the user access logs during the specified start datetime and end datetime. If no appname provided it can run in app dir or with -d to specify an app dir. 'accesslog -h' for more options.

cloud usage

List the system resource usage logs during the specified start datetime and end datetime. If no appname provided it can run in app dir or with -d to specify an app dir. 'usage -h' for more options.

cloud crt

Manage the custom SSL certificates for accessing apps via https. SSL certificates are used for servers in cloud based on certificate names (SubjectAltName or CN). If no appname provided it can run in app dir or with -d to specify an app dir. 'crt -h' for more options. This feature is available to enterprise user only.

cloud login

Login to the ACS cloud.

cloud logout

Logout of the ACS cloud

cloud publish

Publish an app to the ACS cloud. run in app dir or with -d to specify an app dir.

Icon

If acs cli complains that npm is not found even though npm is in the path, ensure that the directory containing npm is in the NODE_PATH (e.g. NODE_PATH=/usr/lib/node_modules).


cloud run

Run a local version of the cloud for development and test. run in app dir or with -d to specify an app dir.    

cloud unpublish

Un-publish an app from the ACS cloud. If no appname provided it can run in app dir or with -d to specify an app dir.

cloud remove

Remove an app from both ACS cloud side and local side. If no appname provided it can run in app dir or with -d to specify an app dir. To remove local dir at the same time -d should be used. In addition, --force must be used to indicate to remove local dir.

cloud config

Config how many app servers in cloud to use.

cloud whoami

Display current login user.

cloud server

Set the server size for an app. If no appname provided it can run in app dir or with -d to specify an app dir. 'server -h' for more options.

cloud download

Download the app source file with specified app name and version. If no appname provided it can run in app dir or with -d to specify an app dir, and the currently deployed app version will be downloaded if no app version option provided.  'download -h' for more options.

cloud transfer-domain

Transfer a domain name from an app to another. 'transfer-domain -h' for more options.

Config

Get, set, or list configuration settings.

Config commands

config get

Retrieves a configuration setting.

config list

Lists configuration settings.

config set

Sets a configuration setting.

Generate

Generate an Appcelerator component.

Generate options

Option

Description

-D, --description <DESCRIPTION>Brief description of your project.
-P, --plugin-paths <PLUGIN_PATHS>Comma-separated search paths for plugins.
-t, --type <TYPES>Comma-separated list of component types to generate.

Help

Displays the help screen.

Info

Since Release 5.0.0.  Gets the current system information.

Install

Installs Appcelerator component. If no component is specified, the command will install the dependencies specified in the project's package.json file.

Install options

Option

Description

-f, --forceForce install
-g, --globalInstall the component globally for all projects. Saves it in the global cache.
-P, --plugin-paths <PLUGIN_PATHS>Comma-separated search paths for plugins.
--skip-npmSkip install NPM dependencies. Only install Appcelerator components.

Login

Logs into the AMPLIFY Appcelerator Services.

Login options

Option

Description

-H, --host <HOST_SERVER>Host for login.
-t, --token <TOKEN>Login using a generated token.

Logout

Logout from the AMPLIFY Appcelerator Services.

Logout options

Option

Description

-D, --deauthorizeDelete device authorization on logout.

New

Create a new app and/or server project.

New options

Option

Description

-f, --forceOverwrite any existing projects.
-i, --id <PROJECT_ID>ID for your project.
-n, --name <PROEJCT_NAME>Name of the project.
--no-servicesSkip registering for AMPLIFY Appcelerator Services for Titanium projects.
-p, --platforms <PLATFORMS>Platforms for Titanium projects.
-P, --plugin-paths <PLUGIN_PATHS>Comma-separated search paths for plugins.
--project-dir <PROJECT_DIRECTORY>Directory containing the project.
-S, --subtype <SUBTYPE>Project subtype, such as sample or new.
-t, --type <TYPES>

Project type. Specify either:

  • arrow for a cloud project
  • titanium for a mobile client project
  • timodule for a Titanium module project.

Org

Manager registry organizations for a component.  Only applicable if the component access rights are set to either org or user_or_org.

Org commands

org add

Add an organization to a component.

org list

Lists organizations for a component.

org rm | remove

Remove an organization from a component.

Owner

Manager registry owners for a component.  Owners are specified by their AMPLIFY Appcelerator Services username or email.

Owner commands

owner add

Adds an owner to a component.

owner list

Lists owners of a component.

owner rm | remove

Removes an owner from a component.

Platform

Runs a specified API against AMPLIFY Appcelerator Services.

Publish

Publish a component to the registry.  You should run this command from inside the project's directory.

Publish options

Option

Description

-f, --forceOverwrite any existing projects.
-P, --plugin-paths <PLUGIN_PATHS>Comma-separated search paths for plugins.

Remove

Remove installed Appcelerator CLI

Run

Run a project–either build and run a Titanium application, or build and locally run an Arrow application.

The following options only apply to Titanium applications:

Generic build options and flags

Option

Description

-b, --build-only

Only perform the build; when specified, does not install or run the app.

When building a Windows project using appc run -p windows -T wp-device --wp-sdk ## --build-only, you can now use SDK values (e.g. 10.0.10240.0, 10.0.10586.0, etc.).

-f, --force

Force a full rebuild.

--skip-js-minifyBypasses JavaScript minification. Simulator builds are never minified. Only supported for Android and iOS.

--log-level <level>

Minimum logging level. Supported options are trace, debug, info, warn, and error.

-p, --platforms <platform>

Target build platform: Supported values are android, ios, and mobileweb. (iphone and ipad are currently accepted as synonyms for ios.)

-d, --project-dir <directory>

Directory containing the project, otherwise the current working directory is assumed.

-s, --sdk <version>

Titanium SDK version to build with. If not specified, uses the configured default SDK.

Android Build Options

Option

Description

-A, --android-sdk <path>

Path to the Android SDK.

-C, --device-id <name>Name of the device or emulator to install the application to.
-D, --deploy-type <type>Type of deployment when using an emulator. Type can be test or development.

-K, --keystore <path>

Location of the keystore.

--key-password <keypass>Password of the keystore private key. Defaults to value specified with --store-password.
--liveviewStarts a LiveView session to let you quickly preview changes to your application's UI. Requires Appcelerator Studio.

-L, --alias <alias>

Alias for the keystore.

-O, --output-dir <dir>

Output directory (used when target is dist-playstore).

-P, --store-password <password>Password for the keystore.

-T, --target <value>

Target to build for. Target can be emulator, device, or dist-playstore.

iOS Build Options and Flags

Option

Description

--force-copyForces files to be copied instead of symlinked for simulator builds only.
--force-copy-allIdentical to the --force-copy flag except this will also copy the 236.7 MB libTiCore.a file.
--launch-watch-appSince Appc CLI 5.0.0 or Titanium CLI 4.1.4. Launch both the watch app and main app; only used when target is simulator.
--launch-watch-app-onlySince Appc CLI 5.0.0 or Titanium CLI 4.1.4. Launch only the watch app; only used when target is simulator.
--liveviewEnables LiveView allowing you to quickly preview changes to your application's UI. Requires Appcelerator Studio.
--retinaUse the retina version of the iOS Simulator.
--sim-focusFocus the iOS simulator (default is true).
--tallIn combination with --retina flag, start the tall version of the retina simulator.
-C, --device-id <name>Name of the device or emulator to install the application to.

-D, --deploy-type <type>

Type of deployment (test or development). Only used when target is simulator or device.
Defaults to development when building for the iOS Simulator and defaults to test when building for iOS device.
When deploy type is set to test, all of your JavaScript code is minified and encrypted. Any JavaScript syntax errors, even files you are not using, will result in a build failure.

-V, --developer-name <name>

iOS Developer Certificate to use; required when target is device.

-F, --device-family <value>

Device family to build for (iphone, ipad, or universal).

-R, --distribution-name <name>

iOS Distribution Certificate to use; required when target is dist-appstore or dist-adhoc.

-I, --ios-version <value>

iOS SDK version to build for. Default: latest installed iOS SDK.

-K, --keychain <value>

Path to the distribution keychain to use instead of the system default; only used when target is device, dist-appstore, or dist-adhoc.

-O, --output-dir <dir>

Output directory. Only used when target is dist-adhoc.

-P, --pp-uuid <uuid>

Provisioning profile uuid; required when target is device, dist-appstore, or dist-adhoc.

-Y, --sim-type <type>iOS Simulator type: iphone or ipad; only used when target is simulator.

-S, --sim-version <value>

iOS Simulator version; only used when target is simulator.

-T, --target <value>

Target to build for: simulator, device, dist-appstore, or dist-adhoc.

--watch-app-name <name>Since Appc CLI 5.0.0 or Titanium CLI 4.1.4. Name of the watch app to launch; only used when target is simulator.
-W, --watch-device-id <udid>Since Appc CLI 5.0.0 or Titanium CLI 4.1.4. Watch simulator UDID to launch when building an app with a watch app; only used when target is simulator.

Mobile Web and Windows Hybrid Build Options

Option

Description

-C, --device-id <value>UDID of the Windows Phone 8 device or emulator to build for. Prior to Release 4.0.0, this is either de for device or xd for emulator.

-D, --deploy-type <type>

Type of deployment (production or development). Production performs optimizations.

-T, --target <value>

Target to build for: web for Mobile Web apps, winstore for Window 8 Store apps or wp8 for Windows Phone 8 apps.

-G, --wp8-publisher-guidWindows Publisher GUID. Required for Windows Phone 8 builds.

 

Windows Build Options

OptionsDescription
-C, --device-id <value>UDID of the Windows Phone 8 device or emulator to build for. Only used when the target is wp-emulator or wp-device.

-D, --deploy-type <type>

Type of deployment (test, development or production). Only used when the target is wp-emulator, wp-device or ws-local.

-G, --wp-publisher-guid <GUID>Windows Phone Publisher ID. Only used when the target is wp-emulator, wp-device or dist-phonestore.
-I, --win-publisher-id <ID>Since Release 5.0.0. Windows Publisher ID. Required to build the application.
-H, --wp-product-guid <GUID>Since Release 5.0.0. Windows 8 product ID, used for upgrading Win 8 apps to Win 8.1.

-O, --output-dir <dir>

Output directory. Only used when target is dist-phonestore or dist-winstore.

-R, --ws-cert <file>Location of the Windows Store certificate file. Only used when target is ws-local or dist-winstore.
-S, --wp-sdk <version>Windows Phone SDK version. When you run CLI on Windows 10, you can specify 10.0 to indicate building for Windows 10 Universal Windows Platform (UWP) app.
-V, --vs-target <version>

Visual Studio target to build for.

  • 12.0 to use Visual Studio 2013
  • 14.0 to use Visual Studio 2015
  • Visual Studio Community 2017 to use Visual Studio Community 2017
  • Visual Studio Professional 2017 to use Visual Studio Professional 2017
  • Visual Studio Enterprise 2017 to use Visual Studio Enterprise 2017

-T, --target <value>

Target to build for:

  • wp-emulator to run a Windows Phone app on the emulator
  • wp-device to run a Window Phone app on a device connected to your host machine
  • dist-phonestore to pakcage a Windows Phone app
  • ws-local to run a Windows Store app on your local machine
  • dist-winstore to package a Windows Store app
--skipInstallDependenciesSince Release 6.1.0. Skip installing dependency packages. If you had trouble with app deployment on device, try this option.

Search for components in the registry.

Search options

Option

Description

-f, --filter <FILTER>Overwrite any existing projects.
-j, --jsonOutput results as JSON.

Setup

Runs the setup wizard and checks your environment.

Switch

Since Release 5.0.0. Switch organizations without logging in or out of the CLI.

Switch options

Option

Description

--org-id <ORG_ID>Switch to a specific organization without prompting.

Titanium | ti

Execute titanium commands.  See the Titanium Command-Line Interface Reference for more information.

Unpublish

Unpublish a project or component.  The component name is only required if the project is run outside the project directory.

Unpublish options

Option

Description

-h, --help

Output usage information.

-d, --project-dir <projectDir>

Directory containing the project.

-f, --forceForce unpublish.

Use

Selects the version of the CLI to use. Running the command with no options lists the available versions.

User

Manage registry users for a component.  Only applicable if the component access rights are set to either user or user_or_org.

User commands

user add

Adds a user to a component.

user list

Lists users associated with a component.

user rm | remove

Removes a user from a component.

Whoami

Displays information about the currently logged-in user.

Whoami options

Option

Description

-f, --full

Provides information about all the organizations, apps, etc. the user is a part of.

-l, --log-level <level>

Change log level

-o, --output <OUTPUT_FORMAT>Output format. Currently only json is supported.