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 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-bannerDisable banner

--no-colors

Disable colors

--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 options

-h, --help

Output usage information

--dashboard <dashboard>

Dashboard url to use 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", the version of npm will also be output)

-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]

-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 (default: 1)

-y, --line <line>

Line for source map query (default: 1)

-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>.

Appc Daemon

The Appcelerator Daemon is a server that hosts services which power the tooling for Axway products such as Titanium SDK.


Daemon options

-h, --help

Display help

-v, --version

Outputs the appcd version

--config=<json>

Serialized JSON string to mix into the appcd config

--config-file=<file>

Path to a appcd JS config file

--no-colors

Disables colors


appcd config

Get and set config options.

appcd dump

Dumps the config, status, health, and debug logs to a file.

appcd exec

Connects to the Appc Daemon and executes the request.

appcd logcat

Streams Appc Daemon debug log output.

appcd restart

Stops the Appc Daemon if running, then starts it.

appcd start

Starts the Appc Daemon if it's not already running.

appcd status

Displays the Appc Daemon status.

appcd stop

Stops the Appc Daemon if running.

appcd help

Displays the help screen.


Cloud/ACS

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

Cloud/ACS commands

cloud/acs options

-h, --helpOutput usage information

--dashboard <dashboard>

Dashboard url to use for logins

-l, --log-level <level>

Change log level

-o, --output <format>

Format output (only "json" is supported)

-v, --versionOutput the version number

-q, --quiet

Reduce the amount of text output to the console

--no-bannerTurn off banner

-n, --no-colors

Turn off colors

--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 <promptType>

Prompt type ["cli","socket","socket-bundle"], defaults to "cli"

--username <username>

Username for login

--password <password>

Password for login

-e, --env <environment>

Environment such as production, preproduction, development, etc

-O, --org-id <orgId>

Organization id for logins

-P, --plugin-paths <pluginPaths>

Comma-separated search paths for plugins

-r, --registry <registry>

Registry server url to use

--vpc-env <vpcEnv>

VPC environment for logins

-d, --dir <dir>

Directory to load app from

--dates

Turn on dates in logging

cloud/acs new

Create a new cloud/acs app.

cloud/acs 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/acs list

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

cloud/acs 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/acs 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/acs 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/acs 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/acs 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/acs login

Login to the ACS cloud.

cloud/acs logout

Logout of the ACS cloud

cloud/acs 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/acs 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/acs 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/acs config

Config how many app servers in cloud to use.

cloud/acs whoami

Display current login user.

cloud/acs 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/acs 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/acs transfer-domain

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

cloud/acs restart

Restart an app running in the API Runtime cloud. If no appname provided it can run in app dir or with -d to specify an app dir.

Config

Get, set, or list configuration settings.

Config examples

Display the entire config: 

Get a configuration key's value:

 

Set a configuration key's value to a string:

Set a configuration key's value to an object:

Set a deep configuration key's value:


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

-h, --help 

output usage information

-t, --type <type>

component type

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

Install examples

Install component dependencies for project (requires package.json):

Install a component locally:

Install a component globally:

Install a titanium module

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.
--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 such as `app`, `api`, `timodule` or `applewatch`.

New examples

Create new project via interactive prompting:

Create a new titanium project

Create a new api 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 

NOTE: executing add or rm without an orgId will prompt you with a list of available orgs.

org add

Add an organization to a component.

org list

Lists organizations for a component.

org rm | remove

Remove an organization from a component.

Org examples

List orgs for a component:

Add an org to a component:

Remove an org 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.

Owner examples

Lists owners for a component:

Removes an owner from a component:

Add an owner to 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.

--image <name[:tag]>

Name of the docker image

--app-version <version>

Version of the app to be published. Only use with '--image' option

--prerelease

Assign as a pre-release build rather than a latest build

Remove

Remove installed Appcelerator CLI

Remove options

Option

Description

-a, --all

Remove all installed but non-active versions

-f, --force

Force the removal to proceed


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 clean 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 windows. (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. When --target is "device", then you can specify "all" to install the app to all connected devices.
-D, --deploy-type <type>

Controls several settings such as optimization, encryption, and analytics. Type can be development, test, or production.

When --target is "emulator", the deploy type defaults to development, but can be set to test.

When --target is "device", the deploy type defaults to test, but can be set to development.

When --target is "dist-playstore", the deploy type is production and cannot be overwritten.

Note that test will minify and encrypt your JavaScript source code. Any JavaScript syntax errors, even files you are not using, will result in a build failure.

-K, --keystore <path>

Location of the keystore file.

--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.

--no-launchDisables launching the app after installing.

-O, --output-dir <dir>

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

-P, --store-password <password>Password for the keystore.
--sigalg <algorithm>The digital signature algorithm to sign the .apk with. Possible algorithms are MD5withRSA, SHA1withRSA, and SHA256withRSA.

-T, --target <value>

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

iOS build options and flags

Option

Description

-C, --device-id <name>Name of the device or emulator to install the application to. When --target is "device", then you can specify "all" to install the app to all connected devices.

-D, --deploy-type <type>

Controls several settings such as optimization, encryption, and analytics. Type can be development, test, or production.

When --target is "simulator", the deploy type defaults to development, but can be set to test.

When --target is "device", the deploy type defaults to test, but can be set to development.

When --target is "dist-appstore" or "dist-adhoc", the deploy type is production and cannot be overwritten.

Note that test will minify and encrypt your JavaScript source code. Any JavaScript syntax errors, even files you are not using, will result in a build failure.

--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 32.5 MB libTiCore.a file. Removed since 8.0.0 and moving to the native JavaScriptCore library.
--launch-watch-appLaunch both the watch app and main app; only used when target is simulator.
--launch-watch-app-onlyLaunch only the watch app; only used when target is simulator.
--sim-focusFocus the iOS simulator (default is true). To not focus the simulator, use --no-sim-focus.

-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). Default is universal, however if --target is set to "ipad", then the value defaults to ipad.

-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.

--launch-bundle-id <id>After installing the app in the iOS Simulator, launch a different app instead of the app that was just built. Useful if you need to launch a test runner that in turn launches your app.

-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.

-R, --distribution-name <name>

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

--sim-focusFocus the iOS Simulator after launching. Defaults to true.

-T, --target <value>

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

--watch-app-name <name>Name of the watch app to launch; only used when target is simulator.
-W, --watch-device-id <udid>Watch simulator UDID to launch when building an app with a watch app; only used when target is simulator.
-Y, --sim-type <type>iOS Simulator type: iphone or ipad; only used when target is simulator.

 

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.

Note: An app can only be installed to a single device at a time.

-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>Windows Publisher ID. Required to build the application.
--wp-product-guid <GUID>Deprecated as of 6.1.0. Windows 8 product ID, used for upgrading Win 8 apps to Win 8.1. Deprecated and will be removed in future version, use --win-product-guid instead.
-H, --win-product-guid <GUID>Since Release 6.1.0. Windows 10 product ID, used for upgrading Windows 8.1 apps to Windows 10.

-O, --output-dir <dir>

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

--ws-cert <file>Deprecated as of Release 6.1.0. Location of the Windows Store certificate file. Only used when target is ws-local or dist-winstore. Deprecated and will be removed in future version, use --win-cert instead.
-R, --win-cert <file>Since Release 6.1.0. Location of the Windows Store certificate file. Only used when target is ws-local or dist-winstore.
--wp-sdk <version>Deprecated as of Release 6.1.0. Windows Phone SDK version. Deprecated and will be removed in future version, use --win-sdk instead.
-S, --win-sdk <version>Since Release 6.1.0. Windows 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. You can target more specific SDK version, such as 10.0.15063.0.
-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.


Please ask your Confluence administrator to update the license for the MultiExcerpt Plugin for Confluence 4+ .
Admin Info: The error is: license VERSION_MISMATCH

Search for components in the registry.

Search options

Option

Description

-f, --filter <FILTER>Overwrite any existing projects.

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.

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

-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.

 

Use options

 

Option

Description

-d, --project-dir <projectDir>

Directory containing the project.

-f, --forceForce unpublish.


User

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

User examples

 

Remove a user:

Add a user:

User commands

user add

Adds a user to 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.