A Python library for the Demisto SDK
Project description
Demisto SDK
The Demisto SDK library can be used to manage your Demisto content with ease and efficiency. The library uses python 3.7+.
Usage
Installation
-
Install -
pip3 install demisto-sdk
-
Upgrade -
pip3 install --upgrade demisto-sdk
-
Demisto server demisto-sdk integration - In order that demisto-sdk and Demisto server communicate, perfrom the following steps:
- Get an API key for Demisto-server -
Settings
->Integrations
->API keys
->Get your Key
(copy it, you will be to copy it once) - Add the following parameters to
~/.zshrc
and~/.bash_profile
:
export DEMISTO_BASE_URL=<http or https>://<demisto-server url or ip>:<port> export DEMISTO_API_KEY=<API key>
for example:
export DEMISTO_BASE_URL=http://127.0.0.1:8080 export DEMISTO_API_KEY=XXXXXXXXXXXXXXXXXXXXXX
- Reload your terminal before continue.
- Get an API key for Demisto-server -
CLI usage
You can use the SDK in the CLI as follows:
demisto-sdk <command> <args>
For more information, run demisto-sdk -h
.
For more information on a specific command execute demisto-sdk <command> -h
.
Version Check
demisto-sdk
will check against the GitHub repository releases for a new version every time it runs and will issue a warning if you are not using the latest and greatest. If you wish to skip this check you can set the environment variable: DEMISTO_SDK_SKIP_VERSION_CHECK
. For example:
export DEMISTO_SDK_SKIP_VERSION_CHECK=yes
Commands
Supported commands:
- init
- Validate
- Lint
- Secrets
- Unify
- Split-yml
- Format
- Run
- Run-playbook
- Upload
- Download
- Generate-docs
- Generate-test-playbook
- Json-to-outputs
- Update-release-notes
- openapi-codegen
- postman-codegen
- generate-integration
How to setup development environment?
Follow the guide found here to setup your demisto-sdk-dev
virtual environment.
The development environment is connected to the branch you are currently using in the SDK repository.
Simply activate it by running workon demisto-sdk-dev
.
The virtual environment can be deactivated at all times by running deactivate
.
Autocomplete
Our CLI supports autocomplete for Linux/MacOS machines, you can turn this feature on by running one of the following: for zsh users run in the terminal
eval "$(_DEMISTO_SDK_COMPLETE=source_zsh demisto-sdk)"
for regular bashrc users run in the terminal
eval "$(_DEMISTO_SDK_COMPLETE=source demisto-sdk)"
License
MIT - See LICENSE for more information.
Contributions
Contributions are welcome and appreciated.
For information regarding contributing, press here.
For release guide, press here
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
File details
Details for the file demisto-sdk-1.3.5.tar.gz
.
File metadata
- Download URL: demisto-sdk-1.3.5.tar.gz
- Upload date:
- Size: 2.1 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.5.0.1 requests/2.24.0 requests-toolbelt/0.8.0 tqdm/4.60.0 CPython/3.8.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | bb8653048260e366d6cee75b8d55afa0a5a874659359c2e8d60f9b5481f1da6e |
|
MD5 | 044ac52d355b7f4dec287ccf9b23f8d9 |
|
BLAKE2b-256 | e0fb405c8bce2868fa0a92f3c5c822a0819f2f1035b713e3bb1df3944f31b85c |