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. |
--integration | Create an integration. |
--script | Create a script. |
--pack | Create a pack. |
-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. |
-clt, --console-log-threshold | Minimum logging threshold for the console logger. Default value is |
-flt, --file-log-threshold | Minimum logging threshold for the file logger. Default value is |
-lp, --log-file-path | Path to the log file. Default path is |
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 myNewPackName
Creates a new content pack under the Packs directory in the content repo with the name
myNewPackName
. After the pack initialization ends, you have the option to create a new integration in the content pack.demisto-sdk init --integration -n myIntegration -o Packs/myNewPack/Integrations
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 --integration -n myFeed -t FeedHelloWorld
Creates a new feed integration. In this example, a new integration named
myFeed
is created, based on theFeedHelloWorld
integration. The init command has several preset templates that you can choose as the basis for your integration or script. By default the template is theBaseIntegration
andBaseScript
but you can also useHelloWorld
,HelloIAMWorld
, orFeedHelloWorld
for integrations andHelloWorldScript
for scripts. These templates have more robust integration information and examples. Additionally, some templates are used to create the basic structure for feed and IAM integrations.demisto-sdk init --script --id "My Script ID" -n myScript
Creates a new script under the Scripts directory. In this example, the new scripted is named
myScript
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 the Packs directory in the content repo, 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
.