Skip to main content

Manage managed Tenzir pipelines through the Tenzir Platform

Project description

tzctl

tzctl manages Tenzir pipelines on a remote node through the Tenzir Platform. It treats a local directory of .tql files as the source of truth, compares that desired state with the pipelines that already exist on a node, and then shows or applies the changes needed to bring them back in sync.

What you can do with tzctl

  • Sign in to the Tenzir Platform.
  • List workspaces, nodes, and pipelines.
  • Create, update, stop, and delete individual pipelines.
  • Plan and apply declarative changes from a local project.
  • Export machine-readable output with --output json.

How it works

A tzctl project is a directory of .tql files plus a tenzir.toml configuration file.

  • Each .tql file defines one pipeline.
  • The file name, or optional frontmatter name, identifies the pipeline.
  • tzctl project plan shows the difference between your project and the node.
  • tzctl project apply creates, updates, deletes, or changes pipeline state to match your project.

Installation

uvx tzctl
uv tool install tzctl
cargo install tzctl
nix run github:tenzir/tzctl -- --help
nix profile add github:tenzir/tzctl

Quick start

  1. Authenticate:

    tzctl auth login
    
  2. Select the target workspace and inspect available nodes:

    tzctl workspace list
    tzctl workspace select <workspace>
    tzctl node list
    
  3. Configure your project in tenzir.toml:

    [workspace]
    id = "t-abcd1234"
    
    [node]
    id = "n-w2tjezz3"
    
    [pipelines]
    glob = "pipelines/**/*.tql"
    
    [defaults]
    state = "running"
    
  4. Review changes before applying them:

    tzctl project plan
    
  5. Apply the project:

    tzctl project apply
    

Common commands

tzctl auth login
tzctl auth logout

tzctl workspace list
tzctl workspace select <id|name|#>
tzctl node list

tzctl pipeline list
tzctl pipeline create path/to/pipeline.tql
tzctl pipeline set path/to/pipeline.tql
tzctl pipeline stop <name>
tzctl pipeline delete <name>

tzctl project plan
tzctl project apply
tzctl project apply --dry-run
tzctl project apply --prune
tzctl project destroy

Run tzctl --help for the full command reference.

Declarative pipeline projects

tzctl is most useful when you manage pipelines declaratively.

In this model, your repository contains the desired pipeline definitions and states. tzctl compares that local project with the current node state and reconciles the difference.

This approach helps you:

  • Review changes before applying them.
  • Keep pipeline definitions in version control.
  • Reapply the same state safely and idempotently.
  • Avoid accidental drift between environments.

Pipeline files

A pipeline file can contain optional YAML frontmatter in line comments:

// ---
// name: zeek-import
// description: Import Zeek logs
// state: running
// ---
from file "/var/log/zeek/conn.log"
read zeek-tsv

Supported frontmatter fields:

  • name
  • description
  • state (running, paused, or stopped)
  • node

If a file has no frontmatter, tzctl uses the file stem as the pipeline name.

Configuration

tzctl reads configuration from tenzir.toml and resolves values in this order:

CLI flags → TENZIR_PLATFORM_CLI_* environment variables → tenzir.toml → built-in defaults

Example:

[platform]
api_endpoint = "https://rest.tenzir.app/production-v1"

[platform.oidc]
client_id = "vzRh8grIVu1bwutvZbbpBDCOvSzN8AXh"
# client_secret_file = "/run/secrets/tenzir-client-secret"

[workspace]
id = "t-abcd1234"

[node]
id = "n-w2tjezz3"

[pipelines]
glob = "pipelines/**/*.tql"

[defaults]
state = "running"

Authentication

tzctl auth login authenticates with the Tenzir Platform and caches the token for later commands.

You can authenticate in these ways:

  • Interactive device-code login.
  • Non-interactive client-credentials login through tenzir.toml.
  • A pre-supplied token from configuration or environment variables.

Safety and output

  • tzctl project plan is read-only.
  • Destructive actions prompt for confirmation unless you pass --yes.
  • --prune deletes pipelines that exist on the node but not in your project.
  • --output json prints structured output for automation and CI.

Global options

Option Description
--dir <DIR> Project directory to use.
--config <FILE> Path to tenzir.toml.
--workspace <ID> Workspace ID to target.
--node <ID> Node ID to target.
--yes Skip confirmation prompts.
--output text|json Output format.
-v, --verbose Increase logging verbosity.
--api-endpoint <URL> Override the platform API endpoint.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

tzctl-0.1.0.tar.gz (75.1 kB view details)

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

tzctl-0.1.0-py3-none-win_amd64.whl (3.3 MB view details)

Uploaded Python 3Windows x86-64

tzctl-0.1.0-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (3.4 MB view details)

Uploaded Python 3manylinux: glibc 2.17+ x86-64

tzctl-0.1.0-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (3.2 MB view details)

Uploaded Python 3manylinux: glibc 2.17+ ARM64

tzctl-0.1.0-py3-none-macosx_11_0_arm64.whl (3.2 MB view details)

Uploaded Python 3macOS 11.0+ ARM64

File details

Details for the file tzctl-0.1.0.tar.gz.

File metadata

  • Download URL: tzctl-0.1.0.tar.gz
  • Upload date:
  • Size: 75.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for tzctl-0.1.0.tar.gz
Algorithm Hash digest
SHA256 ec122d03dfbddc64bd2e0affa452aeeb2ae9b2646d39d6c376fc0283251a53dc
MD5 3c0d60c67de544610c8f25d0c4b4ba33
BLAKE2b-256 9534ac97909425241953866fb4846a3ab59a9b0e7c9ad1b3d72d78a98bf53c15

See more details on using hashes here.

Provenance

The following attestation bundles were made for tzctl-0.1.0.tar.gz:

Publisher: release.yml on tenzir/tzctl

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file tzctl-0.1.0-py3-none-win_amd64.whl.

File metadata

  • Download URL: tzctl-0.1.0-py3-none-win_amd64.whl
  • Upload date:
  • Size: 3.3 MB
  • Tags: Python 3, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for tzctl-0.1.0-py3-none-win_amd64.whl
Algorithm Hash digest
SHA256 cd6e7e525bc3eb6fdd50c1d4920d401207269efc4de953a6e6545bf51d17ef29
MD5 f6e64925e09249bcab745a94a5bf511a
BLAKE2b-256 d048fb8ca2a064e80777f9d35257a26e41412485f08e5aee9d17099363b265aa

See more details on using hashes here.

Provenance

The following attestation bundles were made for tzctl-0.1.0-py3-none-win_amd64.whl:

Publisher: release.yml on tenzir/tzctl

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file tzctl-0.1.0-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for tzctl-0.1.0-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 6a7038afc7fd16f8c11ad1bf509bb9c1bf677d1f078837e05cbb5fc2fd9fa12f
MD5 0f89d1edaaf84a16f31eaa76a0ad4607
BLAKE2b-256 013122c565cd80dd2ab79ed8c6475f15c384eb8c1bcac0c3c09a24e6c32e9566

See more details on using hashes here.

Provenance

The following attestation bundles were made for tzctl-0.1.0-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl:

Publisher: release.yml on tenzir/tzctl

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file tzctl-0.1.0-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for tzctl-0.1.0-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 9935ce3ad5a1a8e860caba9bf6ea414d3d2513ac64bdca435878dcc23733891b
MD5 0ac49a83e691ddeeb6a5078b405d2883
BLAKE2b-256 2b046e2d5db285df62ce55373a0b4b07d471dffe51c5efe6f8c0819ed1e5a287

See more details on using hashes here.

Provenance

The following attestation bundles were made for tzctl-0.1.0-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl:

Publisher: release.yml on tenzir/tzctl

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file tzctl-0.1.0-py3-none-macosx_11_0_arm64.whl.

File metadata

  • Download URL: tzctl-0.1.0-py3-none-macosx_11_0_arm64.whl
  • Upload date:
  • Size: 3.2 MB
  • Tags: Python 3, macOS 11.0+ ARM64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for tzctl-0.1.0-py3-none-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 b3f3c104ed863e9325b4d6b2d73c35b9a8e8206054d9eaaf33d0a727502d32c8
MD5 1615b0215849ca8601b996f6231fb793
BLAKE2b-256 db4f51f77e14b2abc664ffc883c84c4bf0adbebab08551da3a5b2499ac884215

See more details on using hashes here.

Provenance

The following attestation bundles were made for tzctl-0.1.0-py3-none-macosx_11_0_arm64.whl:

Publisher: release.yml on tenzir/tzctl

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page