---
sourceDocument: Brazil Build or modify applications
sourceDocumentLink: https://www.servicenow.com/docs/r/application-development

 Release :

    - brazil

ft:locale :

    - en-US

ft:publication_title :

    - Brazil Build or modify applications

ft:clusterId :

    - cadev

bundleId :

    - cadev

workflow :

    - Development, Data, and Analytics


---

# ServiceNow CLI

# ServiceNow CLI {#ariaid-title1}

Release version: Brazil  
Updated September 10, 2026  
![](https://www.servicenow.com/docs/portal-asset/ico-clock) 3 minutes to read
Summarize  
![AI sparkle icon](https://servicenow.com/docs/portal-asset/ai-sparkle-icon) Summarized using AI  
This content was generated using new OpenAI-powered functionality. Results are provided on an as is basis and are not guaranteed to be accurate or complete.  

## Summary of ServiceNow CLI

The ServiceNow CLI is a command-line interface tool that enables you to perform instance operations directly from your local system.
It supports basic CRUD (Create, Read, Update, Delete) operations on records and allows you to develop and deploy custom components to personalize your ServiceNow UI.
You can also create custom commands tailored to your applications and automate setup and operational tasks through scripting.
Show full answer Show less  

## Key Features

* **Instance Operations:** Perform CRUD actions on records within your ServiceNow instance.
* **Custom Command Development:** Extend the CLI by creating custom commands to manage your specific applications.
* **Command Architecture:** CLI commands are stored on your connected instance and map to asynchronous REST endpoints, ensuring up-to-date command availability.
* **Configuration Management:** Connection profiles and CLI settings are stored in a `config.json` file in your home directory, supporting multiple profiles with different hosts, credentials, and output formats. Sensitive credentials are securely stored in the OS keychain, not in the config file.
* **Command Structure and Arguments:** Commands follow a structured syntax allowing flexible argument ordering and support input types such as strings, numbers, and JSON objects.
* **Output Formats:** Choose from JSON (default), YAML, text (tab-separated), table (human-readable), or no output, adaptable to your integration or tooling needs. Output format can be set globally in profiles or overridden per command with the `--output` argument.
* **Cross-Platform Installation:** Installable on Mac, Windows, or Linux systems via the ServiceNow Store.
* **Extensibility:** Add, update, or remove CLI extensions to enhance functionality or integrate additional ServiceNow applications, such as CMDB.

## Practical Benefits for ServiceNow Customers

* **Simplify Instance Management:** Execute routine and complex instance operations efficiently from your local environment without navigating the UI.
* **Automate Workflows:** Integrate CLI commands into scripts to automate setup, deployment, and maintenance tasks, improving operational efficiency.
* **Customize and Extend:** Build and deploy custom commands and UI components to tailor your ServiceNow environment to your organization's unique requirements.
* **Secure Configuration:** Manage multiple instance connections securely and conveniently with named profiles and OS keychain credential storage.
* **Flexible Output Handling:** Adapt CLI output to fit your preferred data processing tools, facilitating integration with other systems and workflows.

## Getting Started

* Request and install the ServiceNow CLI from the ServiceNow Store.
* Create and manage connection profiles using the configuration file to connect securely to your instances.
* Explore available commands, including those provided by additional plugins like CMDB, to maximize CLI capabilities.
* Use built-in help commands to discover command options, examples, and enable debug logging for troubleshooting.  
The ServiceNow CLI is a command-line interface that lets you perform
instance operations from your local system. You can extend the CLI to include new commands that
meet your application's needs.

## Benefits {#servicenow-cli__section_a1z_jcg_f4b}

The ServiceNow CLI lets you:

* Perform basic CRUD operations on records in your instance.
* Develop custom components and deploy them to your instance to personalize a UI.
* Create custom commands that enable you to manage custom applications from the command line.
* Use the ServiceNow CLI in scripts to simplify setup tasks and operational activities.
{#servicenow-cli__ul_stw_lcg_f4b}

## Architecture {#servicenow-cli__section_mrl_kbh_f4b}

Commands are stored in a table on the instance you are connected to. When the ServiceNow CLI connects to the instance, it receives all the available commands supported by that
instance.

Commands map to a REST endpoint that executes asynchronously. For more information, see [Create a custom command in ServiceNow CLI](https://www.servicenow.com/docs/UG3yIuwSeQuXMKPsT0e4kg "Manage your custom application from the command line by creating custom commands in the ServiceNow CLI.").

## Activating ServiceNow CLI {#servicenow-cli__section_mkq_tcr_2nb}

Install ServiceNow CLI by requesting it from
the ServiceNow Store. Visit the [ServiceNow Store](https://store.servicenow.com/sn_appstore_store.do#!/store/home) to view all the available apps, and for information about submitting requests to the store. For cumulative release notes information for all released apps, see the [ServiceNow Store version history release notes](https://www.servicenow.com/docs/r/store-release-notes/sn-store-release-notes.html).{#servicenow-cli__servicenow-cli-rn-activation}

## Configuration file {#servicenow-cli__section_g4p_fzt_j4b}

The ServiceNow CLI stores profile information in
a config.json file which, by default, is stored in your home directory
at the following path:  
* Linux and Mac: \~/.snc/config.json
* Windows: %USERPROFILE%\\.snc\\config.json
{#servicenow-cli__ul_evp_nf5_j4b}

The CLI uses this file to determine what information to use to connect to an instance, and what settings to use to generate output. By default, the ServiceNow CLI uses the settings found in the default profile to connect to an instance. To use alternate settings, you can create and reference additional named profiles. For more information, see [Configuring and managing your ServiceNow CLI connection profiles](https://www.servicenow.com/docs/6tsjZckTUx~TTJ_8~vc_mQ "Create a connection profile to connect with your instance, view connection profiles, refresh your connection and available commands, or delete profiles you no longer need.").

The following example shows a  configuration  file with a default profile and a named profile. Each profile can use different credentials and specify different hosts and output formats.  

    {
       "profiles":{
          "default":{
             "host":"https://myinstance.service-now.com",
             "loginmethod":"basic",
             "username":"admin",
             "output":"json",  
             "hostversion":"Paris",
             "appversion":"1.0"
             },
          "user1":{
             "host":"https://otherinstance.service-now.com",
             "loginmethod":"basic",
             "username":"user1",
             "output":"yaml",
             "hostversion":"Paris",
             "appversion":"1.0"
             }
          }
    }

Note:  
Sensitive credential information is only stored in the OS keychain, not in the configuration file.

## Command structure {#servicenow-cli__section_igh_ysm_j4b}

ServiceNow CLI commands follow this structure:

1. The base call to the `snc` program.
2. The top-level command group followed by any child command groups.
3. The command that specifies which operation to perform.
4. General CLI arguments required by the operation. You can specify arguments in any order.

{#servicenow-cli__ol_nz1_nrm_j4b}  

    $ snc <command-group> <command> [arguments]

Arguments can take various types of input values, such as numbers, strings, and JSON objects.
The types supported depend on the command you specify.

## Argument values {#servicenow-cli__section_hs4_4vt_j4b}

Many argument values in the ServiceNow CLI are simple string or numeric values,
such as the table and table name in the following example.  

    $ snc record create --table incident --data "{short_description: 'New Incident'}"

You can surround strings that do not contain any space characters with quotation marks or not.
However, you must use quotation marks around strings that include one or more space
characters.

## Output formats {#servicenow-cli__section_zkf_xst_j4b}

The ServiceNow CLI supports four output formats:

* `json`: The output is formatted as JSON. This is the default.  


      {
         "default": {
            "appversion": "1.0.8",
            "host": "https://myinstance.service-now.com",
            "hostversion": "Paris",
            "loginmethod": "basic",
            "output": "json",
            "username": "admin"
         },
         "user1": {
            "appversion": "1.0.8",
            "host": "https://otherinstance.service-now.com",
            "hostversion": "Paris",
            "loginmethod": "basic",
            "output": "yaml",
            "username": "admin"
         }
      }

* `yaml`: The output is formatted as YAML. Use YAML to handle the output with services and tools that emit or consume YAML-formatted strings.  

      default:
         appversion: 1.0.8
         host: https://myinstance.service-now.com
         hostversion: Paris
         loginmethod: basic
         output: json
         username: admin
      user1:
         appversion: 1.0.8
         host: https://otherinstance.service-now.com
         hostversion: Paris
         loginmethod: basic
         output: yaml
         username: admin

* `text`: The output is formatted as multiple lines of tab-separated string values. Use this output with traditional UNIX text tools such as grep, sed, and awk, and the text processing performed by PowerShell.  

      default   https://myinstance.service-now.com   Paris   1.0.8   basic   admin   json 
      user1   https://otherinstance.service-now.com   Paris   1.0.8   basic   admin   yaml

* `table`: The output is formatted as a table which presents the information in a human-readable format.  

      NAME   HOST   HOST   VERSION   APP   VERSION   LOGIN   METHOD   USERNAME   OUTPUT 
      -------------------------------------------------------------------------------
      default   myinstance   Paris   1.0.8   basic   admin   json 
      user1   otherinstance   Paris   1.0.8   basic   admin   yaml

* `none`: The CLI does not print the output to the console. Success, error, and progress messages still display.

{#servicenow-cli__ul_zwq_zdt_l4b}

You can specify command output in two ways:  

Use the `output` option in a named profile in the configuration file
:   The following example sets the default output format to text.  

        {
            "profiles":{
               "default":{
                  "output":"text"
              }
        }

Use the `--output` argument on the command line
:   The following example sets the output of a single command to JSON. This option on the
    command overrides any currently set value in the configuration file.  

        $ snc record query --table incident --query 'active=true' --output json

* **[Install the ServiceNow CLI](https://www.servicenow.com/docs/iaxcaOEPEzLHnEr6XrWcsQ)**   
  Install the ServiceNow CLI on a Mac, Windows, or Linux machine.
* **[Configuring and managing your ServiceNow CLI connection profiles](https://www.servicenow.com/docs/6tsjZckTUx~TTJ_8~vc_mQ)**   
  Create a connection profile to connect with your instance, view connection profiles, refresh your connection and available commands, or delete profiles you no longer need.
* **[Get help with ServiceNow CLI](https://www.servicenow.com/docs/5VMdF7wfpab64GgTPHkp_w)**   
  See available commands, command options, and examples, or generate debug logging output.
* **[Perform record operations using ServiceNow CLI](https://www.servicenow.com/docs/WmvgCBUK5I8mGmuPZfqQbQ)**   
  Create, read, update, delete, and query records in your instance using the ServiceNow CLI command-line tool.
* **[Create a custom command in ServiceNow CLI](https://www.servicenow.com/docs/UG3yIuwSeQuXMKPsT0e4kg)**   
  Manage your custom application from the command line by creating custom commands in the ServiceNow CLI.
* **[Manage ServiceNow CLI extensions](https://www.servicenow.com/docs/8ZpirJAa6KLDD62eA~7P5Q)**   
  Add extensions to the ServiceNow CLI to load additional functionality and commands, update existing extensions, or remove extensions you no longer need.
* **[ServiceNow CLI available commands](https://www.servicenow.com/docs/OSvecm2dtY8N2S0Pq~S5Yw)**   
  Commands and command arguments available to the base system ServiceNow CLI.
* **[Commands installed with CMDB Application CLI and API](https://www.servicenow.com/docs/ZBmJPP0q4wuaJYn_BK2qoA)**   
  Commands and command groups available to the ServiceNow CLI when the app-cmdb-api-cli plugin is installed.

