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
integration
orscript
is not set, the command automatically creates a pack, even ifpack
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 givenname
.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 thename
parameter as theid
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
andintegration
are set,output
is required.
demisto-sdk init -n My_Pack
Creates a new content pack named
My_Pack
under thePacks
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 directoryPacks/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 namedmyScript
and the YAML file will have the IDMy Script ID
.demisto-sdk init --pack -n My_Pack -a path/yourAuthorImage.png
Creates a new content pack named
My_Pack
under thePacks
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 thePacks
directory in content report, and adds the relevant empty XSIAM directories under theMy_Pack
directory.demisto-sdk init --integration -n MyNewIntegration -o path/Packs/My_Pack/Integration --xsiam
Creates a new integration named
MyNewIntegrationEventCollector
within thepath/Packs/My_Pack/Integration
directory. In addition, creates the relevant folders and files for parsing rules and modeling rules underMy_Pack
.