> 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/init.md).

# init

Creates a new pack, integration, or script template.

<details>

<summary>Arguments</summary>

| `-n, --name`         | The name given to the files and directories of new pack/integration/script being created.                                                                                                                                                             |
| -------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `--id`               | The ID used for the integration/script YAML file.                                                                                                                                                                                                     |
| `-o, --output`       | The output directory to which the created object is saved. The default output directory is the current working directory.                                                                                                                             |
| `--integration`      | Create an integration.                                                                                                                                                                                                                                |
| `--script`           | Create a script.                                                                                                                                                                                                                                      |
| `--pack`             | Create a pack with its sub directories.                                                                                                                                                                                                               |
| `-t, --template`     | <p>Create an integration/script based on a specific template.</p><p>Integration template options: <code>HelloWorld</code>, <code>HelloIAMWorld</code>, <code>FeedHelloWorld</code>.</p><p>Script template options: <code>HelloWorldScript</code>.</p> |
| `-a, --author_image` | For packs only: The author image path is shown in Marketplace under the PUBLISHER section. The file size should be up to 4Kb and 120x50 pixels.                                                                                                       |
| `--demisto_mock`     | Copy the `demistomock`. Relevant for initializing scripts and integrations in a pack.                                                                                                                                                                 |
| `--common-server`    | Copy the `CommonServerPython`. Relevant for initializing scripts and integrations in a pack.                                                                                                                                                          |
| `--xsiam`            | Create an Event Collector based on a template, and create matching sub-directories.                                                                                                                                                                   |

</details>

<details>

<summary>Notes</summary>

* If `integration` or `script` is not set, the command automatically creates a pack, even if `pack` was not set.
* If a `name` is not given, a prompt shows asking for an input. A pack, integration, or script cannot be created without a given `name`.
* The `name` parameter cannot have spaces `(' ')` in it.
* If no `id` is given when an integration or script is created, a prompt will show asking for an input. You can use the `name` parameter as the `id` for the YAML file, or provide a different identifier.
* If activated from the content repository and no `output` is given, a pack will be created in the Packs directory.
* If activated from the content repository or within a pack directory and no `output` is given, an integration will be created in the Integrations directory and a script will be created in the Scripts directory.
* If no `output` is given and the command is not activated from the content repo or a pack directory, the pack/integration/script will be created in your current working directory.
* If a pack was created but no `author_image` was given - an empty Author\_image.png file will be created in the pack root directory. Later when validating the user will be asked to add it manually.
* The default templates are based on StarterPack/BaseIntegration and StarterPack/BaseScript found in the content repo.
* If `xsiam` and `integration` are set, `output` is required.

</details>

<details>

<summary>Examples</summary>

* `demisto-sdk init -n My_Pack`

  Creates a new content pack named `My_Pack` under the `Packs` directory in content repository.
* `demisto-sdk init --integration -n MyNewIntegration -o path/to/my/dir`

  Creates a new integration template in a specified directory. In this example, the integration is called **`myIntegration`** and is created in the directory **`Packs/myNewPack/Integrations`**.
* `demisto-sdk init --script --id "My Script ID" -n MyScript`

  Creates a new script under the `Scripts` directory. In this example, the new script is named `myScript` and the YAML file will have the ID **`My Script ID`**.
* `demisto-sdk init --pack -n My_Pack -a path/yourAuthorImage.png`

  Creates a new content pack named `My_Pack` under the `Packs` directory in the content repository, and adds an author image that will be shown under the PUBLISHER section in the Marketplace. The image file will be created under the pack root directory.
* `demisto-sdk init --pack -n My_Pack --xsiam`

  Creates a new pack named `My_Pack` under the `Packs` directory in content report, and adds the relevant empty XSIAM directories under the `My_Pack` directory.
* `demisto-sdk init --integration -n MyNewIntegration -o path/Packs/My_Pack/Integration --xsiam`

  Creates a new integration named `MyNewIntegrationEventCollector` within the `path/Packs/My_Pack/Integration` directory. In addition, creates the relevant folders and files for parsing rules and modeling rules under `My_Pack`.

</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/init.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.
