The init command generates a new pack, integration, or script template.
Creates a new pack, integration, or script template.
Argument | Description |
|---|---|
-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 | Create an integration/script based on a specific template. Integration template options: Script template options: |
-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 |
--common-server | Copy the |
--xsiam | Create an Event Collector based on a template, and create matching sub-directories. |
If
integrationorscriptis not set, the command automatically creates a pack, even ifpackwas not set.If a
nameis not given, a prompt shows asking for an input. A pack, integration, or script cannot be created without a givenname.The
nameparameter cannot have spaces (' ') in it.If no
idis given when an integration or script is created, a prompt will show asking for an input. You can use thenameparameter as theidfor the YAML file, or provide a different identifier.If activated from the content repository and no
outputis given, a pack will be created in the Packs directory.If activated from the content repository or within a pack directory and no
outputis given, an integration will be created in the Integrations directory and a script will be created in the Scripts directory.If no
outputis 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_imagewas 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
xsiamandintegrationare set,outputis required.
demisto-sdk init -n My_PackCreates a new content pack named
My_Packunder thePacksdirectory in content repository.demisto-sdk init --integration -n MyNewIntegration -o path/to/my/dirCreates a new integration template in a specified directory. In this example, the integration is called
myIntegrationand is created in the directoryPacks/myNewPack/Integrations.demisto-sdk init --script --id "My Script ID" -n MyScriptCreates a new script under the
Scriptsdirectory. In this example, the new script is namedmyScriptand the YAML file will have the IDMy Script ID.demisto-sdk init --pack -n My_Pack -a path/yourAuthorImage.pngCreates a new content pack named
My_Packunder thePacksdirectory 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 --xsiamCreates a new pack named
My_Packunder thePacksdirectory in content report, and adds the relevant empty XSIAM directories under theMy_Packdirectory.demisto-sdk init --integration -n MyNewIntegration -o path/Packs/My_Pack/Integration --xsiamCreates a new integration named
MyNewIntegrationEventCollectorwithin thepath/Packs/My_Pack/Integrationdirectory. In addition, creates the relevant folders and files for parsing rules and modeling rules underMy_Pack.