Skip to main content

Sigma Command Line Interface

Tests Coverage Badge Status

This is the Sigma command line interface using the pySigma library to manage, list and convert Sigma rules into query languages.

Getting Started

Installation

The easiest way to install the Sigma CLI is via pipx or pip. For this purpose run one of the following:

python -m pipx install sigma-cli
python -m pip install sigma-cli

on macOS use

python3 -m pip install sigma-cli
brew install sigma-cli

Another way is to run this from source in a virtual environment managed by Poetry:

git clone https://github.com/SigmaHQ/sigma-cli.git
cd sigma-cli
poetry install
poetry shell

Usage

The CLI is available as sigma command. A typical invocation is:

sigma convert -t <backend> -p <processing pipeline 1> -p <processing pipeline 2> [...] <directory or file>

E.g. to convert process creation Sigma rules from a directory into Splunk queries for Sysmon logs run:

sigma convert -t splunk -p sysmon sigma/rules/windows/process_creation

Required backends must be installed using the following command prior to conducting conversions.

To list all available plugins run the following command:

sigma plugin list

Install a plugin of your choice with:

sigma plugin install <backend>

E.g. to install the splunk backend run:

sigma plugin install splunk

Available conversion backends and processing pipelines can be listed with sigma list. Use -O or --backend-option for passing options to the backend as key=value pairs (-O testparam=123) . This backend option parameter can be used multiple times (-O first=123 -O second=456).

Backends can support different output formats, e.g. plain queries and a file that can be imported into the target system. These formats can be listed with sigma list formats <backend> and specified for conversion with the -f option.

In addition, an output file can be specified with -o.

Example for output formats and files:

sigma convert -t splunk -f savedsearches -p sysmon -o savedsearches.conf sigma/rules/windows/process_creation

Outputs a Splunk savedsearches.conf containing the converted searches.

Separate File Output

For scenarios where you need to convert multiple rules into separate files (e.g., for version control or selective deployment), use the --output-dir parameter along with --output-filename-template:

sigma convert -t esql -p ecs_windows --output-dir translated_rules/ rules/

This will create a separate file for each converted rule in the translated_rules/ directory.

Template Variables:

The --output-filename-template parameter accepts the following variables:

  • {path}: Relative source directory path (e.g., windows for rules/windows/rule.yml)
  • {stem}: Filename without extension (e.g., rule for rule.yml)
  • {index}: Query index for rules that generate multiple queries (empty if only one query)

Examples:

Flat output structure (all files in one directory):

sigma convert -t esql -p ecs_windows --output-dir translated/ --output-filename-template "{stem}.esql" rules/

Preserve directory structure:

sigma convert -t esql -p ecs_windows --output-dir translated/ --output-filename-template "{path}/{stem}.esql" rules/

Handle rules with multiple queries:

sigma convert -t esql -p ecs_windows --output-dir translated/ --output-filename-template "{stem}-{index}.esql" rules/

Given input structure:

rules/
├── windows/
│   └── rule_1.yml
├── linux/
│   └── rule_2.yml

With --output-filename-template "{path}/{stem}.esql", the output will be:

translated/
├── windows/
│   └── rule_1.esql
├── linux/
│   └── rule_2.esql

Integration of Backends and Pipelines

Backends and pipelines can be integrated by adding the corresponding packages as dependency with:

poetry add <package name>

A backend has to be added to the backends dict in sigma/cli/backends.py by creation of a Backend named tuple with the following parameters:

  • The backend class.
  • A display name shown to the user in the targets list (sigma list targets).
  • A dict that maps output format names (used in -f parameter) to descriptions of the formats that are shown in the format list (sigma list formats <backend>). The formats must be supported by the backend!

The dict key is the name used in the -t parameter.

A processing pipeline is defined in the pipelines variable dict in sigma/cli/pipelines.py. The variable contains a ProcessingPipelineResolver that is instantiated with a dict that maps identifiers that can be used in the -p parameter to functions that return ProcessingPipeline objects. The descriptive text shown in the pipeline list (sigma list pipelines) is provided from the name attribute of the ProcessingPipeline object.

Maintainers

The project is currently maintained by:

Metadata

Release files for sigma-cli 3.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for sigma-cli 3.1.0
File Size Uploaded
sigma_cli-3.1.0.tar.gz 35.3 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for sigma-cli 3.1.0
File Interpreter ABI Platform
sigma_cli-3.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 74.4 kB

Release files / sigma_cli-3.1.0.tar.gz

Download URL sigma_cli-3.1.0.tar.gz
Size 35.3 kB
Tags Source
SHA-256 checksum
How to use checksums
e87e4f241b309e84f67fb38aa768ddd6d911f90e061c885c0aa16a6dcb7fbad7
BLAKE2b-256 checksum
How to use checksums
1363f6bae3c67004d3f0f496805d25cf8d7e355c59341b58ae534778e33c17be
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jul 7, 2026.

Transparency log

Release files / sigma_cli-3.1.0-py3-none-any.whl

Download URL sigma_cli-3.1.0-py3-none-any.whl
Size 39.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
378d94d5194448e8282571d3c6e2ffd8e6d231f0de5096e69c179ed6c5979df7
BLAKE2b-256 checksum
How to use checksums
18c043205055103ee533f4a74d47a40833571406d7624653a56457259f993f27
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jul 7, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

3.1.0 This release

2 release files

3.0.3

2 release files

3.0.2

2 release files

3.0.1

2 release files

3.0.0

2 release files

2.0.2

2 release files

2.0.1

2 release files

2.0.0

2 release files

1.0.6

2 release files

1.0.5

2 release files

1.0.4

2 release files

1.0.3

2 release files

1.0.2

2 release files

1.0.1

2 release files

1.0.0

2 release files

0.7.10

2 release files

0.7.9

2 release files

0.7.8

2 release files

0.7.7

2 release files

0.7.6

2 release files

0.7.5

2 release files

0.7.4

2 release files

0.7.3

2 release files

0.7.2

2 release files

0.7.1

2 release files

0.7.0

2 release files

0.6.1

2 release files

0.6.0

2 release files

0.5.3

2 release files

0.5.2

2 release files

0.5.1

2 release files

0.5.0

2 release files

0.4.9

2 release files

0.4.8

2 release files

0.4.7

2 release files

0.4.6

2 release files

0.4.5

2 release files

0.4.4

2 release files

0.4.3

2 release files

0.4.2

2 release files

0.4.1

2 release files

0.4.0

2 release files

0.3.4

2 release files

0.3.3

2 release files

0.3.2

2 release files

0.3.1

2 release files

0.3.0

2 release files

0.2.1

2 release files

0.2.0

2 release files

0.1.1

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page