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 tables list the available CLI commands.

tizen cli-config

Displays, sets, replaces, and removes CLI settings.

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.

Syntax:

      tizen cli-config [-g <key>=<value>]
      tizen cli-config -l
    

    Options:

    • -g <key>=<value>, --global <key>=<value>:

      Sets the CLI configuration key and value you want to assign as global.

    • -l, --list:

      Displays the list of all CLI configuration keys and values.

    Examples:

    • Sets the profile.xml path globally:

        $ tizen cli-config -g default.profiles.path=/home/workspace/.metadata/.plugins/org.tizen.common.sign/profiles.xml
      

      Or for Windows:

        > tizen.bat cli-config –g "default.profiles.path=C:\Users\workspace\.metadata\.plugins\org.tizen.common.sign\profiles.xml"
      
    • Lists 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

    Displays the profile templates in a list corresponding to the given sub-command.

    Syntax:

        tizen list web-project
      

      Examples:

      • Lists 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

      Creates a Tizen Web project.

      Syntax:

          tizen create web-project [-p <profile name>] [-t <predefined template>] 
                                   [-n <project name>] [-- <project location>]
        

        Options:

        • -p, --profile:

          Specifies the profile name.

        • -t, --template:

          Specifies the template name.

        • -n, --name:

          Specifies the project name.

        • --:

          Specifies the destination directory where the project is created.

        Examples:

        • Creates 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
          

          Or for Windows:

            > tizen.bat create web-project -p mobile-2.3 -t BasicBasicApplication -n basic -- C:\Users\workspace
          
        tizen build-web

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

        In the Web application, you do not 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).

        Syntax:

            tizen build-web [-opt] [-euf] [-e <file pattern>] [-out <output directory>] [--]
          

          Options:

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

          • --:

            Specifies the project directory.

          Examples:

          • Builds the project with default options:

              $ tizen build-web -- /home/workspace/basic
              $ cd /home/workspace/basic/.buildResult
            

            Or for Windows:

              > tizen.bat build-web -- C:\Users\workspace\basic
              > dir C:\Users\workspace\basic\.buildResult
            
          tizen clean

          Cleans the Tizen Web project.

          Syntax:

              tizen clean [--]
            

            Examples:

            • Cleans the project:

                $ tizen clean -- /home/workspace/basic
              

              Or for Windows:

                > tizen.bat clean -- C:\Users\workspace\basic
              
            tizen certificate

            Generates a Tizen certificate for your application.

            If you want to upload your application to the Tizen store or install the application to a Tizen device, you must generate a Tizen certificate.

            Syntax:

                tizen certificate [-a <alias name>] [-p <password>] [-c <country name>]
                                  [-s <state>] [-ct <city>] [-o <organization>]
                                  [-u <organization unit>] [-n <user name>] [-e <email>]
                                  [-f <file name>] [--]
              

              Options:

              • -a, --alias:

                Specifies an alias name of the certificate.

              • -p, --password:

                Specifies the key password of the user account.

              • -c, --country:

                Specifies the user's country code which consists of 2 letters.

              • -s, --state:

                Specifies the user's state.

              • -ct, --city:

                Specifies the user's city.

              • -o, --organization:

                Specifies the user's organization.

              • -u, --unit:

                Specifies the user's organization unit.

              • -n, --name:

                Specifies the user's name.

              • -e, --email:

                Specifies the user's email.

              • -f, --filename:

                Specifies the file name without a file extension. A certificate file is created with the file name.

                If you skip this option, the default file name, author, is used on creating the certificate file.

              • --:

                Specifies the output directory path.

                If you skip this option, the default output directory path, <TIZEN_SDK_DATA>/keystore/author/, is used on saving the certificate file.

              Examples:

              • Generates a certificate:

                  $ tizen certificate -a MyTizen -p 1234 -c KR -s Seoul -ct Gangnamgu -o Tizen -u Development -n "Gildong Hong" -e gildonghong@example.org -f mycert
                  Generating a certificate with
                    File name = mycert
                    Container Password = ****
                    Alias = MyTizen
                    Key Password = ****
                    Country = KR
                    State = Seoul
                    City = Gangnamgu
                    Name = Gildong Hong
                    Organization = Tizen
                    Organization Unit = Develop
                    E-mail = gildonghong@example.org
                  'mycert' has been generated in '~/tizen-sdk-data/keystore/author'.
                
                  $ ls ~/tizen-sdk-data/keystore/author
                  mycert.p12
                

                Or for Windows:

                  > tizen.bat certificate -a MyTizen -p 1234 -c KR -s Seoul -ct Gangnamgu -o Tizen -u Development -n "Gildong Hong" -e gildonghong@example.org -f mycert
                
              tizen security-profiles

              Manages the security profiles, which are a set of signing certificates for a Tizen application. The following commands are supported:

              • add: Adds the specified security profile which can contain several certificates.

              • list: Displays security profiles. If you specify the name of the security profile, the detailed information of the specified security profile is displayed.

              • remove: Removes the specified security profile.

              Syntax:

                  tizen security-profiles add [-n <security profile name>]
                                              [-a <author certificate path>]
                                              [-p <author password>]
                                              [-c <author CA certificate path>]
                                              [-r <author root CA certificate path>]
                                              [[-d <distributor1 certificate path>][...]]
                                              [[-dp <distributor1 password>][...]]
                                              [[-dc <distributor1 CA certificate path>][...]]
                                              [[-dr <distributor1 root CA certificate path>][...]]
                                              [--]
                
                  tizen security-profiles list [-n <security profile name>] [--]
                  tizen security-profiles remove [-n <security profile name>] [--]

                Options:

                • -n, --name:

                  Specifies the name of the security profile to add, remove, or display.

                  When you enter tizen security-profiles list without a name argument, a set of the security profile names in the profiles.xml file is displayed.

                • -a, --path:

                  Specifies the directory path where the author certificate file is located. The format of the certificate is PKCS#12, and the file extension is .p12.

                • -p, --password:

                  Specifies the password used to access the author certificate.

                • -c, --ca:

                  Specifies the directory path where the author CA certificate file is located. The file extension of the CA certificate is .cer.

                • -r, --rootca:

                  Specifies the directory path where the author Root CA certificate file is located. The file extension of the Root CA certificate is .cer.

                • -d, --dist:

                  Specifies the directory path where the distributor certificate file is located.

                  If you skip this option, the default distributor certificate file embedded in the Tizen SDK is used.

                • -dp, --dist-password:

                  Specifies the password of the distributor certificate.

                • -dc, --dist-ca:

                  Specifies the directory path where the distributor CA certificate file is located.

                • -dr, --dist-rootca:

                  Specifies the directory path where the distributor Root CA certificate file is located.

                • --:

                  Specifies the directory path where profiles.xml is located.

                  If you skip this option, the value of the default.profiles.path key in the CLI configuration is used to find the profiles.xml file, which consists of new security profiles that are generated in <TIZEN_SDK_DATA>/keystore/. The directory path is added to the CLI configuration.

                Examples:

                • Adds a new security profile:

                    $ tizen security-profiles add -n MyProfile -a ~/tizen-sdk-data/keystore/author/mycert.p12 -p 1234
                    No exist the default path of security profiles.
                    author path: ~/tizen-sdk-data/keystore/author/mycert.p12
                    author password: ****
                    distributor1 path: ~/tizen-sdk/tools/certificate-generator/certificates/distributor/tizen-distributor-signer.p12
                    distributor1 password: *************************
                    distributor1 CA path: ~/tizen-sdk/tools/certificate-generator/certificates/distributor/tizen-distributor-ca.cer
                  
                    In Configuration, Set a default profile path to '~/tizen-sdk-data/ide/keystore/profiles.xml'.
                    Wrote to '~/tizen-sdk-data/ide/keystore/profiles.xml'.
                    Succeed to add 'MyProfile' profile.
                  

                  Or for Windows:

                    > tizen.bat security-profiles add -n MyProfile -a C:\tizen-sdk-data\keystore\author\mycert.p12 -p 1234
                  
                • Displays the security profiles:

                    $ tizen security-profiles list
                    Loaded in '~/tizen-sdk-data/ide/keystore/profiles.xml'.
                    ========================================
                    Name
                    ========================================
                    MyProfile
                  
                    $ tizen security-profiles list -n MyProfile
                    Loaded in '~/tizen-sdk-data/ide/keystore/profiles.xml'.
                    ========================================
                    'MyProfile' profile information
                    ========================================
                    author path: ~/tizen-sdk-data/keystore/author/mycert.p12
                    author password: ****
                    distributor1 path: ~/tizen-sdk/tools/certificate-generator/certificates/distributor/tizen-distributor-signer.p12
                    distributor1 password: *************************
                    distributor1 CA path: ~/tizen-sdk/tools/certificate-generator/certificates/distributor/tizen-distributor-ca.cer
                  

                  Or for Windows:

                    > tizen.bat security-profiles list
                  
                    > tizen.bat security-profiles list -n MyProfile
                  
                • Removes the security profile:

                    $ tizen security-profiles remove -n MyProfile
                    Loaded in '~/tizen-sdk-data/ide/keystore/profiles.xml'.
                    Wrote to '~/tizen-sdk-data/ide/keystore/profiles.xml'.
                    Succeed to remove 'MyProfile' profile.
                  

                  Or for Windows:

                    > tizen.bat security-profiles remove -n MyProfile
                  
                tizen package

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

                Syntax:

                    tizen package [-t {tpk|wgt}] [-s <security profile name>] [-r <native package file path>] [--]
                  

                  Options:

                  • -t, --type:

                    Specifies the package type.

                  • -s, --sign:

                    Specifies the profile name to use for signing.

                  • -r, --reference:

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

                  • --:

                    Specifies the build output path or package file path, which is contained in a file name, for re-signing the package.

                  Examples:

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

                      $ tizen cli-config –g default.profiles.path=/home/tizen-sdk/tools/ide/conf/profiles.xml
                    

                    Or for Windows:

                      > tizen.bat cli-config –g "default.profiles.path=C:\tizen-sdk\tools\ide\conf\profiles.xml"
                    
                  • Sets 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
                    

                    Or for Windows:

                      > tizen.bat cli-config –g "default.profiles.path=C:\Users\workspace\.metadata\.plugins\org.tizen.common.sign\profiles.xml"
                    
                  • Packages the project:

                      $ tizen package --type wgt --sign myprofile -- /home/workspace/basic/.buildResult
                    
                      $ ls /home/workspace/basic/.buildResult
                    
                      basic.wgt
                    

                    Or for Windows:

                      > tizen.bat package --type wgt --sign myprofile -- C:\Users\workspace\basic\.buildResult
                    
                  • Re-signs the package:

                      $ tizen package --type wgt --sign myprofile2 -- /home/workspace/basic/.buildResult/basic.wgt
                    

                    Or for Windows:

                      > tizen.bat package --type wgt --sign myprofile2 -- C:\Users\workspace\basic\.buildResult\basic.wgt
                    
                  • Re-signs 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
                    

                    Or for Windows:

                      > tizen.bat package --type wgt --sign myprofile2 --reference C:\Users\workspace\a.tpk --reference C:\Users\workspace\b.tpk -- C:\Users\workspace\basic\.buildResult\basic.wgt
                    
                  tizen install

                  Installs a Tizen application on the target.

                  Syntax:

                      tizen install [-t <target name>] [-n <package name>] [--]
                    

                    Options:

                    • -t, --target:

                      Specifies the target, where the Tizen package is installed.

                    • -n, --name:

                      Specifies the Tizen package file name.

                    • --:

                      Specifies the directory path where the package is saved.

                    Examples:

                    • Installs the basic application named basic.wgt to the emulator-26101:

                        $ tizen install --target emulator-26101 --name basic.wgt -- /home/workspace/basic/.buildResult
                      

                      Or for Windows:

                        > tizen.bat install -–target emulator-26101 –-name basic.wgt -- C:\Users\workspace\basic\.buildResult
                      
                    tizen uninstall

                    Uninstalls the Tizen application on the target.

                    Syntax:

                        tizen uninstall [-t <target name>] [-p <package id>]
                      

                      Options:

                      • -t, --target:

                        Specifies the target, from where the Tizen package is uninstalled.

                      • -p, --pkgid:

                        Specifies the Tizen package ID installed on the target.

                      Examples:

                      • Uninstalls the basic application whose pkgid is cRG1sLZpWb from the emulator-26101:

                          $ tizen uninstall --target emulator-26101 --pkgid cRG1sLZpWb
                        
                      tizen run

                      Runs the Tizen application on the target.

                      Syntax:

                          tizen run [-t <target name>] [-p <package id>]
                        

                        Options:

                        • -t, --target:

                          Specifies the target, where the Tizen package is run.

                        • -p, --pkgid:

                          Specifies the Tizen package ID installed on the target.

                        Examples:

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

                            $ tizen run --target emulator-26101 --pkgid org.tizen.basic
                          
                        tizen version

                        Displays the CLI version number.

                        Syntax:

                            tizen version
                          

                          Examples:

                          • Displays the CLI version:

                              $ tizen version
                              Tizen CLI 1.0.0
                          Go to top