Mobile Web Wearable Web

Command Line Interface

The Web CLI (command line interface) provides the functional tools for developing Tizen Web applications without the Tizen IDE. It includes the entire developing process from creating to running and debugging the project. The CLI is located in the $<TIZEN_SDK_HOME>/tools/ide/bin directory. For developing an application using the CLI, add the CLI directory path to $PATH using the following command:

export PATH=$PATH:$<TIZEN_SDK_HOME>/tools/ide/bin

The CLI in the IDE provides the functional commands for:

Note
To use the CLI, you need the Java Runtime Environment version 6 or higher.

The following table lists the available CLI commands.

Table: CLI commands
Command Options Description Example
tizen cli-config
tizen cli-config [-g|--global] <key>=<value>
tizen cli-config -l | --list
  • -l, --list:

    Shows the list of all CLI configuration keys and values.

  • -g, --global:

    Sets the CLI configuration key and value as global.

Queries, sets, replaces, and unsets CLI setting options.

The key and the name are separated by an equal sign.

The CLI configuration keys are:

  • default.profiles.path=<path of profile.xml>

    Sets the path to the profile.xml file.

  • default.sdb.timeout=<timeout value>

    Sets the default connection timeout value. The default is 60000 milliseconds.

  • Set the profile.xml path globally:

    $ tizen cli-config -g default.profiles.path=/home/workspace/.metadata/.plugins/org.tizen.common.sign/profiles.xml
    
  • List all options for which values are set:

    $ tizen cli-config -l
    default.build.architecture=x86
    default.build.compiler=llvm
    default.build.configuration=Debug
    default.profiles.path=/home/mustafa/workspace/0904/.metadata/.plugins/org.tizen.common.sign/profiles.xml
    default.sdb.timeout=60000
    
tizen list
tizen list web-project
Shows what kind of template each profile supports, and the list corresponding with the given sub-command.
  • List all templates:

    $ tizen list web-project
       [PROFILE]           [TEMPLATE]
       mobile-2.3           TizenWebUIBuilderforTAUEmptyApplication
       mobile-2.3           TizenWebUIBuilderforTAUSinglePageApplication
       mobile-2.3           TizenWebUIBuilderforTAUNavigationApplication
       mobile-2.3           jQueryMobileNavigationApplication
       mobile-2.3           jQueryMobileMasterDetailApplication
       mobile-2.3           TizenWebUIFrameworkNavigationApplication
       mobile-2.3           TizenWebUIFrameworkSinglePageApplication
       mobile-2.3           TizenWebUIFrameworkMasterDetailApplication
       mobile-2.3           jQueryMobileSinglePageApplication
       mobile-2.3           TizenWebUIBuilderforTAUMultiPageApplication
       mobile-2.3           BasicBasicApplication
       mobile-2.3           jQueryMobileMultiPageApplication
       mobile-2.3           TizenWebUIFrameworkMultiPageApplication
       wearable-2.3         IMEApplicationWebIMEapplication
       wearable-2.3         BasicjQuerytemplate
       wearable-2.3         BasicBasicapplication
       wearable-2.3         WearableUIBasicapplication
       wearable-2.3         WearableUIListapplication
    
tizen create
tizen create web-project [-p|--profile <profile name>] [-t|--template <predefined template>] 
                         [-n|--name <project name>] [-- <project location>]
  • -p, --profile:

    Sets the profile name.

  • -t, --template:

    Sets the template name.

  • -n, --name:

    Sets the project name.

  • --:

    Sets the project destination directory.

Creates a Tizen Web project. If an option is empty, the default project is generated from the default template.
  • Create the template project based on the basic Tizen mobile UI project:

    $ tizen create web-project -p mobile-2.3 -t BasicBasicApplication -n basic -- /home/workspace
    
tizen build-web
tizen build-web [-opt | --optimize] [-euf | --exclude-uifw] [-e | --exclude] [-out | --output] [--]
  • -opt, --optimize:

    Optimizes the application size. The Javascript and CSS files are minimized and the Tizen Web UI framework source is excluded. The related link address is modified to a platform-dependent location instead.

  • -euf, --exclude-uifw:

    Specifies whether to exclude the Tizen Web UI framework. Uses the Tizen UI framework in the target. This option is only used for applications using the Tizen UI framework.

  • -e, --exclude:

    Specifies the exclude file list. Excludes the file pattern. By default, the following resources are excluded:

    .build/*, .build, .sign/*, .sign, webUnitTest/*, webUnitTest, .externalToolBuilders/*, .externalToolBuilders, .buildResult/*, .buildResult, .settings/*, .settings, .package/*, .package, .tproject, .project, .sdk_delta.info, .rds_delta, *.wgt, .tizen-ui-builder-tool.xml

  • -out, --output:

    Sets the output directory name. If you omit this option, the .buildResult directory is created under the project directory by default.

Builds the Tizen Web project with the default values (if you do not set the options).

In the Web application, there is no need to build a project. However, you can optimize the application (for example, minimize the JavaScript or CSS file and exclude the Tizen Web UI framework sources).

  • Build the project with default options:

    $ tizen build-web -- /home/workspace/basic
    $ cd /home/workspace/basic/.buildResult
    
tizen package
tizen package [-t | --type <package type>] [-s | --sign <security profile name>] [-r | --reference <native package file path>] [--]
  • -t, --type:

    Sets the package type.

  • -s, --sign:

    Sets the profile name to use for signing.

  • -r, --reference:

    Sets the reference of the native package file (tpk) for hybrid application packing. Various options are allowed.

  • --:

    Sets the built project path or package file path with a file name.

Packages the Tizen application with signing. If there is a package file path in the options, the package is re-signed. And if a reference option is given, the package is re-signed with the referenced packages.

The Tizen application is signed with a certified profile named profiles.xml. You can create the default profile from the Tizen IDE, which generates the file in a hidden directory in your workspace (<Your workspace directory>/.metadata/.plugins/org.tizen.common.sign/profiles.xml). Set the path of the profile.xml file once before packaging the Tizen application (you can use the tizen cli-config command).

  • Set up the path of the profile.xml file that you already have:

    $ tizen cli-config -g default.profiles.path=/home/workspace/profiles.xml
    
  • Set up the path of the profile.xml file that is created from the IDE:

    $ tizen cli-config –g default.profiles.path=/home/workspace/.metadata/.plugins/org.tizen.common.sign/profiles.xml
    
  • Package the profile:

    $ tizen package --type wgt --sign myprofile -- /home/workspace/basic/.buildResult
    
    $ cd /home/workspace/basic/.buildResult
    
    basic.wgt
    
  • Re-sign the package:

    $ tizen package --type wgt --sign myprofile2 -- /home/workspace/basic/.buildResult/basic.wgt
    
  • Re-sign a hybrid application package:

    $ tizen package --type wgt --sign myprofile2 --reference /home/workspace/a.tpk --reference /home/workspace/b.tpk -- /home/workspace/basic/.buildResult/basic.wgt
    
tizen install
tizen install <-t | -target <target name>> <-n | --name <package name>> [--]
  • -t, --target:

    Sets the target, which installs the Tizen package.

  • -n, --name:

    Sets the Tizen package file name, which is going to be installed on the target.

  • --:

    Sets the path where the package is.

Installs a Tizen application to a Tizen device.
  • Install the basic application named basic.wgt to the emulator-26101:

    $ tizen install --target emulator-26101 --name basic.wgt -- /home/workspace/basic/.buildResult
    
tizen uninstall
tizen uninstall <-t | --target <target name>> <-p | --pkgid <package id>>
  • -t, --target:

    Sets the target, which uninstalls the Tizen package.

  • -p, --pkgid:

    Sets the installed Tizen package ID on the target.

Uninstalls a Tizen application from a Tizen device.
  • Uninstall the basic application whose pkgid is cRG1sLZpWb from the emulator-26101:

    $ tizen uninstall --target emulator-26101 --pkgid cRG1sLZpWb
    
tizen run
tizen run <-t | --target <target name>> <-p | --pkgid <package id>>
  • -t, --target:

    Sets the target, which runs the Tizen package.

  • -p, --pkgid:

    Sets the installed Tizen package ID on the target.

Runs the Tizen application.
  • Run the basic application whose pkgid is org.tizen.basic on the emulator-26101:

    $ tizen run --target emulator-26101 --pkgid cRG1sLZpWb
    
tizen version
tizen version
Prints the CLI version number of the executable and exits.
  • Show the version:

    $ tizen version
    Tizen CLI 1.0.0
Go to top