> For the complete documentation index, see [llms.txt](https://cortex-docs.paloaltonetworks.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://cortex-docs.paloaltonetworks.com/xsoar-6-administrator-guide/6.15/learn-about-cortex-xsoar/get-started-in-cortex-xsoar/use-the-command-line-interface.md).

# Use the Command Line Interface

Use the CLI to run system and integration commands, automations, scripts, and user notifications in Cortex XSOAR 6.15.

Cortex XSOAR enables you to run system commands, integration commands, automations, and more from an integrated command line interface (CLI). With the CLI’s auto-complete feature, you can easily find relevant commands, scripts, and arguments. The CLI is available throughout Cortex XSOAR, with the exception of the Marketplace and while editing Playbooks.

{% hint style="info" %}
When entering a command in the CLI, you can use the up/down arrow buttons to do a reverse history search for previous commands with the same prefix.
{% endhint %}

You can run various commands in the CLI by typing the following:

* **`!`**: Integration commands, automations, and built-in commands. For example, add evidence, assign an analyst, etc.
* **`/`**: System commands/operations. For example, add notes, close an investigation, etc.
* **`@`**: User tagging. Send notifications to administrators, teams, analysts, etc.

Example:

To run the print script with a value of hello and the key `a` from the context:

**`!Print value="hello ${a}"`**

To explicitly use the following characters, place them within single or double quotes. An escape character \ is not required.

**`&&, ||, !, {, }, [, ], (, ), ~, *, ?`**

To explicitly use the following characters, place them within single or double quotes and use an escape character **`\`**.

\*\*`\, \n, \t, \r, ", ^, :,` \*\*comma, and space

When writing a query or complex text in the CLI, we strongly recommend enclosing your text with the backtick (\`) character. Text within the backticks does not require you to escape single quotation marks ('), double quotation marks ('') or backslashes (\\.

Examples:

To run the searchIncidentv2 script with query of all **myfield** that equals "this is a test" using escape characters:

**`!SearchIncidentsV2 query="myfield:\"this is a test\""`**

To run the same query using backticks:

**`` !SearchIncidentsV2 query=`myfield:"this is a test"` ``**

To run the Python command returning Hello World using escape characters:

**`!py script="demisto.results(\"hello world\")"`**

To run the Python command returning Hello World using backticks:

**`` !py script=`demisto.results("hello world")` ``**

{% hint style="info" %}
(Multi-tenant) The CLI is not available from the main account in a multi-tenant deployment. You can, however, [run commands across multiple tenants](/cortex-xsoar-6-multi-tenant-guides/6.14/configure-multi-tenant/configure-the-multi-tenant-deployment/run-a-command-on-multiple-tenants.md) from the main account.
{% endhint %}

#### Common Arguments

The following common arguments are available for every script run from the CLI.

| Argument Name      | Description                                                                                                                                                                                                                                                                                                                                                                                                                                                   |
| ------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| auto-extract       | <p>Decides whether/when to extract indicators.</p><p>Possible values:</p><ul><li><strong>inline</strong> - Extract indicators within the indicator extraction run context (synchronously).</li><li><strong>outOfBand</strong> - Extract indicators in parallel (asynchronously) to other actions.</li><li><strong>none</strong> - Do not extract indicators (recommended for scripts with large outputs when indicator extraction is not required).</li></ul> |
| execution-password | Supplies a password to run a password protected automation.                                                                                                                                                                                                                                                                                                                                                                                                   |
| execution-timeout  | Defines how long a command waits in seconds before it times out.                                                                                                                                                                                                                                                                                                                                                                                              |
| extend-context     | <p>Select which information from the raw JSON you want to add to the context data.</p><p>For a single value: <strong>contextKey=RawJsonOutputPath</strong></p><p>For multiple values: <strong>contextKey1=RawJsonOutputPath1::contextKey2=RawJsonOutputPath2</strong></p>                                                                                                                                                                                     |
| ignore-outputs     | Possible values: **true** or **false**. If set to **true**, will not store outputs into the context (besides extended context).                                                                                                                                                                                                                                                                                                                               |
| raw-response       | Possible values: **true** or **false**. If set to **true**, returns the raw JSON result from the script.                                                                                                                                                                                                                                                                                                                                                      |
| retry-count        | Determines how many times the script attempts to run before generating an error.                                                                                                                                                                                                                                                                                                                                                                              |
| retry-interval     | Determines the wait time (in seconds) between each execution of the script.                                                                                                                                                                                                                                                                                                                                                                                   |
| using              | Selects which integration instance runs the command.                                                                                                                                                                                                                                                                                                                                                                                                          |
| using-brand        | Selects which integration runs the command. If the selected integration has multiple instances, the script may run multiple times. Use the **using** argument to select a single integration instance.                                                                                                                                                                                                                                                        |
| using-category     | Selects which category of integrations runs the command. If the selected category includes multiple integration instances, the script may run multiple times. Use the **using** argument to select a single integration instance.                                                                                                                                                                                                                             |


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://cortex-docs.paloaltonetworks.com/xsoar-6-administrator-guide/6.15/learn-about-cortex-xsoar/get-started-in-cortex-xsoar/use-the-command-line-interface.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `build a script that syncs our docs to a CMS` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
