> 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/demisto-sdk-development-guide/demisto-sdk-guide/demisto-sdk-commands/split.md).

# split

The `split` command splits downloaded scripts, integrations, and generic module files into multiple files. Integrations and scripts are split into the package format. Generic modules dashboards are split  into separate files and the modules are modified to meet the content repository standard.

Files are stored in the content repository in a directory format, which enables performing extensive code validations and maintaining a more stable codebase.

<details>

<summary>Arguments</summary>

| Argument               | Description                                                                                                                                                                                                                      |
| ---------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `-i, --input`          | The YAML/JSON file to extract from.                                                                                                                                                                                              |
| `-o, --output`         | The output directory to write the extracted code/description/image/JSON to.                                                                                                                                                      |
| `--no-demisto-mock`    | Does not add an import for `demistomock` (only for YAML files).                                                                                                                                                                  |
| `--no-common-server`   | Does not add an import for `CommonServerPython` or `CommonServerPowerShell` (only for YAML files).                                                                                                                               |
| `--no-auto-create-dir` | Does not automatically create the directory if the target directory ends with `*Integrations`/`*Scripts`/`*GenericModules`/`*Dashboards`. The automatically created directory is named according to the integration/script name. |
| `--new-module-file`    | Creates a new module file instead of editing the existing file. Only for JSON files.                                                                                                                                             |

</details>

<details>

<summary>Examples</summary>

* `demisto-sdk split -i Integrations/integration-MyInt.yml -o Integrations/MyInt`

  Splits the YAML file to a directory with the integration components (for example, code, image, description, and `Pipfile`).
* `demisto-sdk split -i Scripts/script-MyInt.yml -o Scripts/MyInt`

  Splits the YAML file to a directory with the script components (for example, code, description, and `Pipfile`).
* `demisto-sdk split -i Integrations/integration-powershell_ssh_remote.yml -o Packs/PowerShellRemoting/Integrations/`

  Splits a PowerShell integration. Output specifies just the integration's directory, so the target directory will be auto-created.
* `demisto-sdk split -i Packs/ThreatIntel/GenericModules/genericmodule-ThreatIntel.json`

  Extracts the dashboards in the Generic Module under `Packs/ThreatIntel/GenericModules/genericmodule-ThreatIntel.json`. If this command is run in the content repository, the dashboards are extracted to the relevant directory in the pack: `Packs/ThreatIntel/Dashboards`. Otherwise, the dashboards are created in the current working directory. The Generic Module is also edited to fit the content standard.
* `demisto-sdk split -i Packs/ThreatIntel/GenericModules/genericmodule-ThreatIntel.json -o Packs/ThreatIntel --new-module-file`

  Extracts the dashboards in the Generic Module under `Packs/ThreatIntel/GenericModules/genericmodule-ThreatIntel.json` and creates a new module file without changing the original file. All the new files are created in `Packs/ThreatIntel`.

</details>


---

# 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 current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://cortex-docs.paloaltonetworks.com/demisto-sdk-development-guide/demisto-sdk-guide/demisto-sdk-commands/split.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
