---
sourceDocument: Australia Build or modify applications
sourceDocumentLink: https://servicenow-prod.fluidtopics.net/r/pt-BR/application-development

 Release :

    - australia

ft:locale :

    - pt-BR

ft:publication_title :

    - Australia Build or modify applications

ft:clusterId :

    - cadev

bundleId :

    - cadev

workflow :

    - Development, Data, and Analytics


---

# ServiceNow SDK CLI

# ServiceNow SDK CLI {#ariaid-title1}

* Versão de lançamento: Australia
* 
* Atualizado 12 de mar. de 2026
* 
* ![](https://www.servicenow.com/docs/portal-asset/ico-clock) 21 min. de leitura

Use the ServiceNow SDK command-line interface (CLI) to manage changes between a local application and the application on an instance.
From the command-line tool on your system, enter `now-sdk` to start the CLI and return a list of available commands or `now-sdk [command]` to begin using the ServiceNow SDK.  
Nota:  
If you use `npx` to install the ServiceNow SDK in application rather than globally, you must use `npx @servicenow/sdk [command]` rather than `now-sdk [command]` with the ServiceNow SDK CLI.

The CLI includes the following commands and global options:
{#servicenow-sdk-cli-commands__table_ynq_2fh_jzb__entry__2}

| Option | Description |
|-|-|
| --version, -v | Return the version of the CLI. |
| --help, -h | Return information about commands, sub-commands, and parameters. |
| --debug, -d | Return the debug logs generated with a command. |
[Tabela 1. Global options]

{#servicenow-sdk-cli-commands__table_ynq_2fh_jzb}

## upgrade {#ariaid-title2}

Upgrade to the latest version of the ServiceNow SDK for use with instances beginning with the Washington DC release.
Upgrading the ServiceNow SDK doesn't update any applications you have previously created or converted with the ServiceNow SDK.  
The `upgrade` command has the following structure:

    now-sdk upgrade [--debug <flag>]

{#now-sdk-upgrade-command__table_vx2_vvr_rzb__entry__4}

| Parameter | Type | Description | Default value |
|-|-|-|-|
| --debug, -d | Boolean | An option to return the debug logs generated during the upgrade process. | false |
[Tabela 2. Optional parameters]

{#now-sdk-upgrade-command__table_vx2_vvr_rzb}  
For example:

    now-sdk upgrade --debug true

For more information, see [Upgrade the ServiceNow SDK](https://servicenow-prod.fluidtopics.net/PLlUHAUWo8cM9qz2nAqCQQ "Upgrade to the latest version of the ServiceNow SDK for use with instances beginning with the Washington DC release.").

## auth {#ariaid-title3}

Authenticate to an instance and store, update, or view user credentials for accessing an instance on your system.
The `auth` command has parameters for adding credentials, deleting credentials, listing credentials, and setting credentials to use by default. `save`, `clear`, `list`, and `set-default` subcommands and the following structure:

    now-sdk auth [<subcommand>]

For more information, see [Authenticating to a ServiceNow instance with the ServiceNow SDK](https://servicenow-prod.fluidtopics.net/vl5mxRyynLXvgW_3_PtxYQ "Authenticate to a ServiceNow instance and store user credentials for accessing the instance on your system with the ServiceNow SDK.").

### add {#now-sdk-auth-command__section_nvk_jwb_l2c}

Store credentials in the device keychain or credential manager on your system.  
The `auth` command has the following structure with the `--add` parameter:

    npx @servicenow/sdk auth [--add <instance url>] [--type <auth method>] [--alias <alias>]

Nota:  
Using the `npx` command installs the ServiceNow SDK in your application directory instead of globally.
{#now-sdk-auth-command__table_qp2_2j1_l2c__entry__4}

| Parameter | Type | Description | Default value |
|-|-|-|-|
| --add | String | The URL of the target instance to access and to which you install applications. The instance must be on the Washington DC release or later. | --- |
[Tabela 3. Required parameters]

{#now-sdk-auth-command__table_qp2_2j1_l2c} {#now-sdk-auth-command__table_erc_hwb_l2c__entry__4}

| Parameter | Type | Description | Default value |
|-|-|-|-|
| --type | String | The method to use to authenticate with the target instance. Specify `basic` for basic authentication or `oauth` for OAuth 2.0 authentication. | basic |
| --alias | String | The alias for the instance and user credentials. The alias can be used for authentication with the `init`, `transform`, `dependencies`, and `install` commands. | --- |
[Tabela 4. Optional parameters]

{#now-sdk-auth-command__table_erc_hwb_l2c}  
For example:

    npx @servicenow/sdk auth --add https://myinstance.service-now.com --type oauth --alias devuser1

### save {#now-sdk-auth-command__section_kkt_dml_rzb}

Store credentials in the device keychain or credential manager on your system.  
The `save` subcommand has the following structure:

    now-sdk auth save [<alias>] [--host <instance url>] [--username <user>] [--default <flag>]

    now-sdk auth save [<alias>] [--host <instance url>] [--type <flag>] [--default <flag>]

{#now-sdk-auth-command__table_udn_jml_rzb__entry__4}

| Parameter | Type | Description | Default value |
|-|-|-|-|
| alias | String | The alias for the instance and user credentials. The alias can be used for authentication with the `create`, `convert`, `fetch`, and `install` commands. | --- |
| --username | String | A ServiceNow AI Platform user name for authenticating to the instance. The user must have admin access. | --- |
[Tabela 5. Required parameters]

{#now-sdk-auth-command__table_udn_jml_rzb} {#now-sdk-auth-command__table_wdn_jml_rzb__entry__4}

| Parameter | Type | Description | Default value |
|-|-|-|-|
| --host | String | The URL of the target instance to access and to which you install and fetch applications. The instance must be on the Australia release. | --- |
| --type | String | The method to use to authenticate with the target instance. Specify `basic` for basic authentication or `oauth` for OAuth 2.0 authentication. For more information, see [Authenticating to a ServiceNow instance with the ServiceNow SDK](https://servicenow-prod.fluidtopics.net/vl5mxRyynLXvgW_3_PtxYQ "Authenticate to a ServiceNow instance and store user credentials for accessing the instance on your system with the ServiceNow SDK."). | basic |
| --default, -d | Boolean | An option to set the `alias` as the default alias. | false |
[Tabela 6. Optional parameters]

{#now-sdk-auth-command__table_wdn_jml_rzb}

For example:

    now-sdk auth save devuser1 --host https://myinstance.service-now.com --username user1 --default true

    now-sdk auth save devuser1 --host https://myinstance.service-now.com --type oauth --default true

### delete {#now-sdk-auth-command__section_ibw_rxb_l2c}

Remove credentials in the device keychain or credential manager on your system.  
The `auth` command has the following structure with the `--delete` parameter:

    now-sdk auth [--delete <alias or all>]

{#now-sdk-auth-command__table_jbw_rxb_l2c__entry__4}

| Parameter | Type | Description | Default value |
|-|-|-|-|
| --delete | String | The alias for the instance and user credentials. To delete all credentials, set this parameter to `--delete all`. | --- |
[Tabela 7. Required parameters]

{#now-sdk-auth-command__table_jbw_rxb_l2c}  
For example:

    now-sdk auth --delete devuser1

### clear {#now-sdk-auth-command__section_rgz_dml_rzb}

Remove credentials in the device keychain or credential manager on your system.  
The `clear` subcommand has the following structure:

    now-sdk auth clear [<alias>]

{#now-sdk-auth-command__table_vvj_c2r_rzb__entry__4}

| Parameter | Type | Description | Default value |
|-|-|-|-|
| alias | String | The alias for the instance and user credentials. | all |
[Tabela 8. Optional parameters]

{#now-sdk-auth-command__table_vvj_c2r_rzb}  
For example:

    now-sdk auth clear devuser1

### list {#now-sdk-auth-command__section_c1q_dyb_l2c}

View credentials saved in the device keychain or credential manager on your system. Passwords and authentication codes aren't returned.  
The `auth` command has the following structure with the `--list` parameter:

    now-sdk auth [--list]

{#now-sdk-auth-command__table_d1q_dyb_l2c__entry__4}

| Parameter | Type | Description | Default value |
|-|-|-|-|
| --list | String | Lists all available authentication credentials. | --- |
[Tabela 9. Required parameters]

{#now-sdk-auth-command__table_d1q_dyb_l2c}  
For example:

    now-sdk auth --list

### list {#now-sdk-auth-command__section_iqs_2ml_rzb}

View credentials saved in the device keychain or credential manager on your system. Passwords and authentication codes aren't returned.  
The `list` subcommand has the following structure:

    now-sdk auth list [<alias>]

{#now-sdk-auth-command__table_pkb_n2r_rzb__entry__4}

| Parameter | Type | Description | Default value |
|-|-|-|-|
| alias | String | The alias for the instance and user credentials. | all |
[Tabela 10. Optional parameters]

{#now-sdk-auth-command__table_pkb_n2r_rzb}  
For example:

    now-sdk auth list devuser1

### use {#now-sdk-auth-command__section_od4_nyb_l2c}

Set the credentials to be used by commands by default.  
The `auth` command has the following structure with the `--use` parameter:

    now-sdk auth [--use <alias>]

{#now-sdk-auth-command__table_pd4_nyb_l2c__entry__4}

| Parameter | Type | Description | Default value |
|-|-|-|-|
| --use | String | The alias for the instance and user credentials. | --- |
[Tabela 11. Required parameters]

{#now-sdk-auth-command__table_pd4_nyb_l2c}  
For example:

    now-sdk auth --use devuser1

### set-default {#now-sdk-auth-command__section_zbs_fml_rzb}

Set the credentials to be used by commands by default.  
The `set-default` subcommand has the following structure:

    now-sdk auth set-default [<alias>]

{#now-sdk-auth-command__table_ok3_r2r_rzb__entry__4}

| Parameter | Type | Description | Default value |
|-|-|-|-|
| alias | String | The alias for the instance and user credentials. | --- |
[Tabela 12. Required parameters]

{#now-sdk-auth-command__table_ok3_r2r_rzb}  
For example:

    now-sdk auth set-default devuser1

## initcreate {#ariaid-title4}

Create an application or convert an existing application to support development in source code. The application is added in the current directory.Create a custom scoped application and, if specified, deploy it to an instance.
To create an application with your default credentials, you can run the `init` command without any optional parameters. For example, `now-sdk init`. To convert an existing application, you must include
the `--from` parameter to provide the sys_id of an application on an instance or a path to a local directory that contains an application.

After initializing an application, you must install the required third-party dependencies using your preferred package manager before building the application. For example, if you use Node Package Manager (npm), run `npm
install`.  
The `init` command has the following structure:

    npx @servicenow/sdk init [--from <sys_id or path>] [--appName <name>] [--packageName <name>] [--scopeName <name>] [--auth <alias>] [--template <template>]

Nota:  
Using the `npx` command installs the ServiceNow SDK in your application directory instead of globally.
{#now-sdk-create-command__table_bny_zfc_l2c__entry__4}

| Parameter | Type | Description | Default value |
|-|-|-|-|
| --from | String | A sys_id of an application on the instance or a path to a local directory that contains an application to convert to support development in source code. Converting an application adds the necessary files and directories for using the ServiceNow SDK locally and downloads the application metadata. The application isn't changed on the instance until you build and install it on the instance. After installing a converted application, the Package JSON field of the custom application record \[sys_app\] contains the path to the package.json file for the application. | --- |
| --appName | String | A name for the application. | --- |
| --packageName | String | A name for the application package used in the package.json file. The package name must adhere to Node Package Manager (npm) package naming standards. | --- |
| --scopeName | String | The scope of the application. The scope name must be unique on the instance, begin with x_\<prefix\>, and be 18 characters or fewer. For more information, see [Namespace identifier](https://servicenow-prod.fluidtopics.net/CNFm~q~1Jp9ut0uVOsIlqw "The system adds a namespace identifier to the front of application artifacts such as tables, scripts, and configuration records."). | --- |
| --auth, -a | String | An alias for the credentials to use to authenticate to the instance. | If set, the default alias. |
| --template | String | A template for the default structure of the application. * base: An application with only the basic structure necessary for development in source code. * javascript.basic: An application configured for development in ServiceNow Fluent and JavaScript. * javascript.react: An application configured for development in ServiceNow Fluent, JavaScript, and React. * typescript.basic: An application configured for development in ServiceNow Fluent and TypeScript. TypeScript source files in the src/server directory are transpiled into JavaScript modules. * typescript.react: An application configured for development in ServiceNow Fluent, TypeScript, and React. TypeScript source files in the src/server directory are transpiled into JavaScript modules. * partial.javascript.react: Adds template files and directories to an existing application for development in ServiceNow Fluent, JavaScript, and React. * partial.typescript.react: Adds template files and directories to an existing application for development in ServiceNow Fluent, TypeScript, and React. {#now-sdk-create-command__ul_hs1_ksz_hgc} | --- |
[Tabela 13. Optional parameters]

{#now-sdk-create-command__table_bny_zfc_l2c}  
For example:

    npx @servicenow/sdk init --from dbce0f6a3b3fda107b45b5d355e45af6 --appName Example App --packageName example-app --scopeName x_snc_example --auth devuser1 --template base

For more information, see [Create or convert an application with the ServiceNow SDK](https://servicenow-prod.fluidtopics.net/xQWzN8z8274UB99F0CusDg "Create an application or convert an existing application to develop in source code with the ServiceNow SDK.") or [Convert an application with the ServiceNow SDK](https://servicenow-prod.fluidtopics.net/rfSE6E~ZQUVxowy6nLLEag "Convert an existing application to support development in source code with the ServiceNow SDK.").
The `create` command has the following structure:

    now-sdk create <scopeName> <directory> [--appName <name>] [--packageName <name>] [--description <description>] [--sampleTable <flag>] [--offline <flag>] [--auth <alias>] [--interactive <flag>] [--open-browser <flag>] [--projectType <type>] [--template <type>]

{#now-sdk-create-command__table_lfx_51l_rzb__entry__4}

| Parameter | Type | Description | Default value |
|-|-|-|-|
| scopeName | String | The scope of the application. The scope name must be unique on the instance, begin with x_\<prefix\>, and be fewer than 12 characters. For more information, see [Namespace identifier](https://servicenow-prod.fluidtopics.net/CNFm~q~1Jp9ut0uVOsIlqw "The system adds a namespace identifier to the front of application artifacts such as tables, scripts, and configuration records."). | --- |
| directory | String | The local directory in which to create the application directories and files. | Current working directory |
[Tabela 14. Required parameters]

{#now-sdk-create-command__table_lfx_51l_rzb} {#now-sdk-create-command__table_mfx_51l_rzb__entry__4}{#now-sdk-create-command__ide-desc}

| Parameter | Type | Description | Default value |
|-|-|-|-|
| scopeName | String | The scope of the application. The scope name must be unique on the instance, begin with x_\<prefix\>, and be 18 characters or fewer. For more information, see [Namespace identifier](https://servicenow-prod.fluidtopics.net/CNFm~q~1Jp9ut0uVOsIlqw "The system adds a namespace identifier to the front of application artifacts such as tables, scripts, and configuration records."). This parameter is required if the `--interactive` parameter is set to false. | --- |
| directory | String | The local directory in which to create the application directories and files. | Current working directory |
| --debug, -d | Boolean | An option to return the debug logs generated during the build process. | false |
| --appName | String | The name of the application. This parameter is required if the `--interactive` parameter is set to false. | --- |
| --packageName | String | A name for the application package used in the package.json file.The package name must adhere to Node Package Manager (npm) package naming standards. | --- |
| --description | String | A short description of your application. | --- |
| --sampleTable | Boolean | An option for creating a sample table in the application. If true, a sample table named \<scope\>_to_do is created. | If the `--interactive` parameter is true, the default is true. If the `--interactive` parameter is false, the default is false.false |
| --offline, -o | Boolean | An option for creating the application locally without connecting to an instance and skipping installing an application to the instance. If true, the scope name isn't validated during creation so you must verify that the scope name is valid before installing to your instance.​ Nota: This parameter is ignored when the `auth` parameter is set. | false |
| --auth, -a | String | An alias for the credentials to use to authenticate to the instance. | If set, the default alias. |
| --interactive, -i | Boolean | An option to answer a guided set of prompts to create the application. | truefalse |
| --open-browser, -b | Boolean | An option to open the application record in your default browser after successfully installing the application. Nota: This parameter is ignored when the `offline` parameter is set to true. | false |
| --projectType | String | The type of application, which determines the default application configuration. * fluent: The default application configuration is set up for using ServiceNow Fluent, JavaScript modules, and third-party libraries. * module: The default application configuration is set up for using only JavaScript modules and third-party libraries. {#now-sdk-create-command__ul_bsz_kss_tdc} | fluent |
| --template, -t | String | An option to specify whether to use JavaScript or TypeScript in modules. This option determines the configuration of the package.json and now.config.json files and adds a tsconfig.json file for TypeScript projects. * javascript: The application is configured to build .js files from the src/server directory into modules.{#now-sdk-create-command__js-template} * typescript: The application is configured to build .ts files from the src/server directory into modules.{#now-sdk-create-command__ts-template} {#now-sdk-create-command__ul_lrs_k3y_qdc} | javascript |
| --install | Boolean | An option to install the application to the instance after creation. This option is ignored if you're offline. | If the `--interactive` parameter is true, the default is true. If the `--interactive` parameter is false, the default is false. |
[Tabela 15. Optional parameters]

{#now-sdk-create-command__table_mfx_51l_rzb}  
For example:

    now-sdk create x_snc_example /path/to/app_folder --interactive false --appName Example App --packageName example-app --description example_app_description --sampleTable true --auth devuser1 --open-browser true --projectType fluent --template typescript

## build {#ariaid-title5}

Compile source files and generate an installable packageoutput build artifacts. Third-party library dependencies are converted into XML files that can be installed with the application.
The `build` command has the following structure:

    now-sdk build <source> [--frozenKeys <flag>]

{#now-sdk-build-command__table_vx2_vvr_rzb__entry__4}

| Parameter | Type | Description | Default value |
|-|-|-|-|
| source | String | The path to the directory that contains the package.json file for your application. The package.json should be in the base directory of your application. | Current working directory |
| --frozenKeys | Boolean | An option to validate that the keys.ts file is up to date for continuous integration (CI) builds. If true and changes were made to the application's ServiceNow Fluent code, the keys.ts file isn't updated and the build fails. The keys.ts file is automatically generated in the src/fluent/generated directory. | false |
| --debug, -d | Boolean | An option to return the debug logs generated during the build process. | false |
| --generate-deletes | Boolean | An option to generate delete record updates for files removed between builds. | true |
| --lint | Boolean | An option to lint source files before building. | true |
| --optimize, -o | Boolean | An option to optimize packaging by reusing unchanged dependency XML files. | true |
[Tabela 16. Optional parameters]

{#now-sdk-build-command__table_vx2_vvr_rzb}  
For example:

    now-sdk build /path/to/package --frozenKeys true

For more information, see [Build and installdeploy an application with the ServiceNow SDK](https://servicenow-prod.fluidtopics.net/GCQJKq4yOxXXoDY~k7hdzw "Build and installdeploy a local application developed with the ServiceNow SDK on a ServiceNow instance.").

## installdeploy {#ariaid-title6}

Package the build artifacts and installInstall or update an application on an instance. Before using the `install``install` command, you must use the `build` command to generate an installable package.
The `install` command has the following structure:

    now-sdk install [--source <package path>] [--reinstall <flag>] [--auth <alias>] [--open-browser <flag>] [--info <flag>]

{#now-sdk-deploy-command__table_fwn_q5d_m2c__entry__4}

| Parameter | Type | Description | Default value |
|-|-|-|-|
| --source | String | The path to the directory that contains the package.json file for your application. The package.json should be in the base directory of your application. | Current working directory |
| --reinstall, -r | Boolean | An option to uninstall and reinstall the application on the instance to ensure that the metadata on the instance matches the metadata in the installation package. Aviso: Metadata that is on the instance but not in your local application is removed. If you have previous versions of modules in the EcmaScript Module \[sys_module\] table that aren't needed, re-installing an application removes previous versions of the application's modules from the table. | false |
| --auth, -a | String | An alias for the credentials to use to authenticate to the instance. Nota: For CI/CD pipelines, you can set the following environment variables to authenticate with an instance at runtime using basic authentication: * SN_SDK_INSTANCE_URL: The URL of the target instance to access and to which you install applications. * SN_SDK_USER: A username for the instance. * SN_SDK_USER_PWD: The password associated with the user. * SN_SDK_NODE_ENV: Set to SN_SDK_CI_INSTALL to enable CI server support. {#now-sdk-deploy-command__ul_frl_2x3_qfc} | If set, the default alias. |
| --open-browser, -b | Boolean | An option to open the application record in your default browser after successfully installing the application. | false |
| --info, -i | Boolean | An option to return details about the most recent installation of this application, such as the status and records updated. When this parameter is used, the application isn't installed. | false |
| --demoData | Boolean | Install demo data | true |
[Tabela 17. Optional parameters]

{#now-sdk-deploy-command__table_fwn_q5d_m2c}  
For example:

    now-sdk install --source /path/to/package --reinstall false --auth devuser1 --open-browser true --info true

For more information, see [Build and installdeploy an application with the ServiceNow SDK](https://servicenow-prod.fluidtopics.net/GCQJKq4yOxXXoDY~k7hdzw "Build and installdeploy a local application developed with the ServiceNow SDK on a ServiceNow instance.").
The `install` command has the following structure:

    now-sdk install [--source <package path>] [--reinstall <flag>] [--auth <alias>] [--open-browser <flag>] [--info <flag>]

{#now-sdk-deploy-command__table_xh2_5hs_rzb__entry__4}

| Parameter | Type | Description | Default value |
|-|-|-|-|
| --source | String | The path to the directory that contains the package.json file for your application. The package.json should be in the base directory of your application. | Current working directory |
| --reinstall, -r | Boolean | An option to uninstall and reinstall the application on the instance to ensure that the metadata on the instance matches the metadata in the installment package. Aviso: Metadata that is on the instance but not in your local application is removed. If you have previous versions of modules in the EcmaScript Module \[sys_module\] table that aren't needed, re-installing an application removes previous versions of the application's modules from the table. | false |
| --auth, -a | String | An alias for the credentials to use to authenticate to the instance. | If set, the default alias. |
| --open-browser, -b | Boolean | An option to open the application record in your default browser after successfully installing the application. | false |
| --info, -i | Boolean | An option to return details about the most recent installment of this application, such as the status and records updated. When this parameter is used, the application isn't installed. | false |
[Tabela 18. Optional parameters]

{#now-sdk-deploy-command__table_xh2_5hs_rzb}  
For example:

    now-sdk install --auth devuser1 --source /path/to/package --reinstall false --open-browser true --info true

## dependencies {#ariaid-title7}

Download application dependencies and TypeScript definitions from an instance to enable IntelliSense and code validation for an application.Download the application dependencies configured in the now.config.json file and script dependencies, such as TypeScript type definitions for Glide APIs and script includes, from the instance.
The `dependencies` command downloads dependencies and TypeScript definitions for scripts and ServiceNow Fluent code:

* For scripts, this command downloads TypeScript definitions for all Glide APIs and scans the modules and scripts in your application and generates type definitions for the script includes that they use. Type definitions are added in the @types/servicenow directory. After downloading script dependencies, you must update your tsconfig.json file to include the type definitions.
* For ServiceNow Fluent, this command downloads the dependencies listed in an application's now.config.json file and generates TypeScript definitions for them in the @types/servicenow/fluent directory.

{#now-sdk-dependencies-command__ul_k1w_52n_13c}

To download all script and ServiceNow Fluent dependencies for an application, you can use the `dependencies` command with no parameters. If needed, provide the application directory and authentication alias too.

The `dependencies` command has the following structure:

    now-sdk dependencies [--directory <package path>] [--auth <alias>][--type-defs-only <flag>] [--fluent-only <flag>] [--add <table> <sys_ids or names>] [--scope <name>]

{#now-sdk-dependencies-command__table_fwn_q5d_m2c__entry__4}

| Parameter | Type | Description | Default value |
|-|-|-|-|
| --directory | String | The path to the directory that contains the package.json file for your application. The package.json should be in the base directory of your application. | Current working directory |
| --auth, -a | String | An alias for the credentials to use to authenticate to the instance. | If set, the default alias. |
| --type-defs-only | Boolean | An option to download TypeScript definitions for only script dependencies. Script types are downloaded in the @types/servicenow directory. | false |
| --fluent-only | Boolean | An option to download dependencies and TypeScript definitions for only ServiceNow Fluent dependencies from other application scopes. You must list an application's dependencies in its now.config.json file. ServiceNow Fluent types are generated in the @types/servicenow/fluent directory. | false |
| --add | String | Adds the dependencies that you want to download to the application's now.config.json file. You must specify the type of dependencies to add using the table name and then the names or sys_ids of each item to add, separated by spaces. --add <table_name> <sys_id1> <sys_id2> <sys_id3> * To add table dependencies, you can use the `table` alias and names of tables instead of the sys_ids. For example: --add tables incident problem change_request * To add role dependencies, you can use the `role` alias and names of roles instead of the sys_ids. For example: --add roles admin user itil {#now-sdk-dependencies-command__ul_dth_k11_b3c} Use a wildcard (`*`) to add all items from a specified table and scope. For example: --add sys_security_acl "*" | --- |
| sysIds | Array | A list of sys_ids of dependencies to download and generate TypeScript definitions from. This parameter only applies if you use the `--add` parameter. | --- |
| --scope | String | The application scope from which to download dependencies. This parameter is required if you use the `--add` parameter. | --- |
[Tabela 19. Optional parameters]

{#now-sdk-dependencies-command__table_fwn_q5d_m2c}  
For example:

    now-sdk dependencies --directory /path/to/package --auth devuser1 --add sys_ui_view fa776f6d97700100f309124eda2975bc --scope global

For more information, see [Downloading dependencies with the ServiceNow SDK](https://servicenow-prod.fluidtopics.net/VksjUu5ubzAvjCk1G9w7qg#downloading-dependencies-now-sdk "Download application dependencies and TypeScript definitions from an instance for IntelliSense and validation of scripts and ServiceNow Fluent code.Download the application dependencies configured in the now.config.json file and script dependencies, such as TypeScript type definitions for Glide APIs and script includes, from the instance.").

## transform {#ariaid-title8}

Download application metadata (XML) from the instance and transform the metadata into ServiceNow Fluent source code to synchronize the application changes on the instance into your local application.
After initializing an application, you can run the `transform` command without any parameters to transform new application metadata from the instance into source code in the src/fluent/generated
directory and synchronize changes to metadata into source code in the src/fluent directory. To transform metadata that existed when the application was initialized into source code, use the
`--from` parameter to provide the path to a local directory or file that contains XML. If metadata exists in the local application as both XML and source code, the XML version takes precedence when installed on the
instance.  
The `transform` command has the following structure:

    now-sdk transform [--from <path>] [--directory <package path>] [--preview <flag>] [--auth <alias>] [--format <flag>]

{#now-sdk-transform-command__table_bny_zfc_l2c__entry__4}

| Parameter | Type | Description | Default value |
|-|-|-|-|
| --from | String | A path to a local directory or file that contains metadata XML to transform into ServiceNow Fluent code. | --- |
| --directory | String | The path to the directory that contains the package.json file for your application. The package.json should be in the base directory of your application. | Current working directory |
| --preview | Boolean | An option to preview the transformed ServiceNow Fluent code from the command line without saving the changes. | false |
| --auth, -a | String | An alias for the credentials to use to authenticate to the instance. | If set, the default alias. |
| --format, -f | Boolean | An option to format new and updated ServiceNow Fluent source code when it's transformed. | true |
[Tabela 20. Optional parameters]

{#now-sdk-transform-command__table_bny_zfc_l2c}  
For example:

    now-sdk transform --from metadata/update --directory /path/to/package --preview true --auth devuser1 --format true

For more information, see [Convert an application with the ServiceNow SDK](https://servicenow-prod.fluidtopics.net/rfSE6E~ZQUVxowy6nLLEag "Convert an existing application to support development in source code with the ServiceNow SDK.") or [Build and installdeploy an application with the ServiceNow SDK](https://servicenow-prod.fluidtopics.net/GCQJKq4yOxXXoDY~k7hdzw "Build and installdeploy a local application developed with the ServiceNow SDK on a ServiceNow instance.").

## download {#ariaid-title9}

Download all application metadata (XML) from an application on an instance to compare with the metadata in your local application.
Updates to JavaScript modules aren't included when downloading application metadata from your instance.  
The `download` command has the following structure:

    now-sdk download <directory> [--source <package path>] [--incremental <flag>]

{#now-sdk-download-command__table_fwd_rcf_m2c__entry__4}

| Parameter | Type | Description | Default value |
|-|-|-|-|
| directory | String | A path to any directory in which to download the metadata. Nota: This directory should be a different directory from the metadata directory in your application. | --- |
[Tabela 21. Required parameters]

{#now-sdk-download-command__table_fwd_rcf_m2c} {#now-sdk-download-command__table_sbb_xds_rzb__entry__4}

| Parameter | Type | Description | Default value |
|-|-|-|-|
| --source | String | The path to the directory that contains the package.json file for your application. The package.json should be in the base directory of your application. | Current working directory |
| --incremental | Boolean | An option to download only changes to application metadata made on the instance and recorded in the Customer Updates \[sys_update_xml\] table. | false |
[Tabela 22. Optional parameters]

{#now-sdk-download-command__table_sbb_xds_rzb}  
For example:

    now-sdk download /path/to/directory --source /path/to/package --incremental true

## clean {#ariaid-title10}

Remove the build artifacts that were output with the previous build.
The `clean` command has the following structure:

    now-sdk clean <source>

{#now-sdk-clean-command__table_vx2_vvr_rzb__entry__4}

| Parameter | Type | Description | Default value |
|-|-|-|-|
| source | String | The path to the directory that contains the package.json file for your application. The package.json should be in the base directory of your application. | Current working directory |
[Tabela 23. Optional parameters]

{#now-sdk-clean-command__table_vx2_vvr_rzb}  
For example:

    now-sdk clean /path/to/package

## pack {#ariaid-title11}

Package the build artifacts that were output with the previous build into an installable ZIP file.
The `pack` command has the following structure:

    now-sdk pack <source>

{#now-sdk-pack-command__table_vx2_vvr_rzb__entry__4}

| Parameter | Type | Description | Default value |
|-|-|-|-|
| source | String | The path to the directory that contains the package.json file for your application. The package.json should be in the base directory of your application. | Current working directory |
[Tabela 24. Optional parameters]

{#now-sdk-pack-command__table_vx2_vvr_rzb}  
For example:

    now-sdk pack /path/to/package

## convert {#ariaid-title12}

Convert an existing application from an instance to support modifying it locally in Visual Studio Code and deploying application changes on the instance with the ServiceNow SDK.
Converting an application adds the necessary files and directories for using the ServiceNow SDK locally and downloads the application metadata. The application isn't changed on the instance until you build and install it on the instance. After installing a converted application, the Package JSON field of the custom application record \[sys_app\] contains the path to the package.json file for the application.  
The `convert` command has the following structure:

    now-sdk convert <scopeName> <packageName> [<directory>] [--auth <alias>] [--projectType <type>] [--template <type>]

{#now-sdk-convert-command__id_i3l_dm4_pdc__entry__4}

| Parameter | Type | Description | Default value |
|-|-|-|-|
| scopeName | String | The scope of the existing application. | --- |
| packageName | String | A name for the application package used in the package.json file. The package name must adhere to Node Package Manager (npm) package naming standards. | --- |
[Tabela 25. Required parameters]

{#now-sdk-convert-command__id_i3l_dm4_pdc}{#now-sdk-convert-command__section_a23_rcz_mzb__entry__16}{#now-sdk-convert-command__ide-desc}

| Parameter | Type | Description | Default value |
|-|-|-|-|
| directory | String | The local directory in which to create the application directories and files. | Current working directory |
| --auth, -a | String | An alias for the credentials to use to authenticate to the instance. | If set, the default alias. |
| --projectType | String | The type of application, which determines how application files are downloaded and the default application configuration. * fluent: Existing application metadata is downloaded and converted into ServiceNow Fluent code in the src/fluent directory. The default application configuration is set up for using ServiceNow Fluent, JavaScript modules, and third-party libraries. Nota: A limited number of metadata types, such as Metadata Snapshots \[sys_metadata_link\] and UX Assets \[sys_ux_lib_asset\], can't be represented as ServiceNow Fluent code and aren't transformed. These metadata types remain as metadata XML files in the metadata directory of your application. * module: Existing application metadata is downloaded as metadata XML in the metadata directory. The default application configuration is set up for using only JavaScript modules and third-party libraries. {#now-sdk-convert-command__ul_bsz_kss_tdc} | modulefluent |
| --template, -t | String | An option to specify whether to use JavaScript or TypeScript in modules. This option determines the configuration of the package.json and now.config.json files and adds a tsconfig.json file for TypeScript projects. * javascript: The application is configured to build .js files from the src/server directory into modules.{#now-sdk-convert-command__js-template} * typescript: The application is configured to build .ts files from the src/server directory into modules.{#now-sdk-convert-command__ts-template} {#now-sdk-convert-command__ul_lrs_k3y_qdc} | javascript |
[Tabela 26. Optional parameters]

For example:

    now-sdk convert x_snc_example example-app /path/to/app_folder --auth user1-dev --projectType fluent --template typescript

## fetch {#ariaid-title13}

Download application metadata from an instance and update the metadata XML files in your local application to match.
Updates to JavaScript modules aren't included when downloading application metadata from your instance.  
The `fetch` command has the following structure:

    now-sdk fetch [--directory <package path>] [--auth <alias>]

{#now-sdk-fetch-command__table_sbb_xds_rzb__entry__4}

| Parameter | Type | Description | Default value |
|-|-|-|-|
| --directory | String | The path to your application. | Current working directory |
| --auth, -a | String | An alias for the credentials to use to authenticate to the instance. | If set, the default alias. |
| --debug, -d | Boolean | An option to return the debug logs generated during the fetch process. | false |
[Tabela 27. Optional parameters]

{#now-sdk-fetch-command__table_sbb_xds_rzb}  
For example:

    now-sdk fetch --auth devuser1 --directory /path/to/package


