watchtower-cli

module
v0.2.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 4, 2026 License: Apache-2.0

README

watchtower-cli

wtctl, the Watchtower command line client: checks, dashboards, alert rules, datasets and evals as code, source map and debug file upload, release markers, code instrumentation and the MCP stdio proxy for IDE agents. It calls the public /v1 API with your key; it contains no server logic.

Install

Method Command
Homebrew brew install watchtowerobservability/tap/wtctl
npm npm i -g @watchtowerobservability/cli (downloads and SHA256-verifies the release binary; GitHub Packages registry)
Go go install github.com/watchtowerobservability/watchtower-cli/wtctl@latest
Scoop scoop install https://github.com/watchtowerobservability/watchtower-cli/releases/latest/download/wtctl.json
Download the release page: wtctl_<os>_<arch> for linux, darwin and windows on amd64 and arm64, plus SHA256SUMS
Script (Linux, macOS) see below
os=$(uname -s | tr A-Z a-z); arch=$(uname -m); case $arch in x86_64) arch=amd64;; aarch64) arch=arm64;; esac
base=https://github.com/watchtowerobservability/watchtower-cli/releases/latest/download
curl -fsSLO "$base/wtctl_${os}_${arch}" && curl -fsSLO "$base/SHA256SUMS"
grep " wtctl_${os}_${arch}\$" SHA256SUMS | { command -v sha256sum >/dev/null && sha256sum -c - || shasum -a 256 -c -; } \
  && sudo install -m 0755 "wtctl_${os}_${arch}" /usr/local/bin/wtctl

Version and updates

wtctl version            # wtctl 0.2.0 (linux/amd64, go1.26.0)
wtctl version --check    # compares with the latest GitHub release
wtctl self-update        # downloads the latest release binary for this OS/arch, verifies SHA256SUMS, replaces itself

self-update takes --url <release location> (or $WTCTL_UPDATE_URL) for a mirror that serves SHA256SUMS and the wtctl_<os>_<arch> assets; --check prints the checksum it would install. A Homebrew, Scoop or npm install is better updated with that package manager.

Quick start

export WT_API_KEY=wtk_...
export WT_API_URL=https://watchtower.example.com
export WT_MCP_URL=https://watchtower.example.com/mcp
wtctl --help
wtctl mcp serve --stdio --project <id>

Configuration

Variable Meaning
WT_API_KEY API key, sent only as Authorization: Bearer to your Watchtower
WT_API_URL API base URL
WT_MCP_URL hosted MCP endpoint used by wtctl mcp serve
GITHUB_TOKEN used by wtctl instrument --open-pr

Verify provenance

gh attestation verify wtctl_linux_amd64 --repo watchtowerobservability/watchtower-cli
sha256sum -c SHA256SUMS --ignore-missing

License

Apache-2.0.

Directories

Path Synopsis
agent
container
Package container collects container metrics and events from the Docker Engine API (unix socket or Windows named pipe) and, on Linux, from cgroup v2 files for containerd and podman.
Package container collects container metrics and events from the Docker Engine API (unix socket or Windows named pipe) and, on Linux, from cgroup v2 files for containerd and podman.
custom
Package custom holds the customer-extensible check modules of wt-agent: Nagios-style plugins and Prometheus text-exposition scrapes.
Package custom holds the customer-extensible check modules of wt-agent: Nagios-style plugins and Prometheus text-exposition scrapes.
dbm
Package dbm is database monitoring beyond counters (INF-027, APM-008, APM-024): bind-safe statement text, lock/wait chains and blocking sessions.
Package dbm is database monitoring beyond counters (INF-027, APM-008, APM-024): bind-safe statement text, lock/wait chains and blocking sessions.
host
Package host collects host and process metrics with OTel semantic-convention names, through gopsutil (pure Go, no cgo, Linux/Windows/macOS).
Package host collects host and process metrics with OTel semantic-convention names, through gopsutil (pure Go, no cgo, Linux/Windows/macOS).
integrations
Package integrations holds the integration manifests (what a product looks like, what to alert on) and the database, queue and service collectors that feed them.
Package integrations holds the integration manifests (what a product looks like, what to alert on) and the database, queue and service collectors that feed them.
k8s
Package k8s is the Kubernetes side of wt-agent: a node agent (DaemonSet: kubelet usage metrics, pod logs, scrape discovery) and a cluster agent (one elected Deployment replica: object state metrics, events, spec-change history).
Package k8s is the Kubernetes side of wt-agent: a node agent (DaemonSet: kubelet usage metrics, pod logs, scrape discovery) and a cluster agent (one elected Deployment replica: object state metrics, events, spec-change history).
logs
Package logs collects system logs: file tails (with offsets kept per inode and multiline joining), journald, the Windows Event Log and a syslog receiver, all forwarded as OTLP logs.
Package logs collects system logs: file tails (with offsets kept per inode and multiline joining), journald, the Windows Event Log and a syslog receiver, all forwarded as OTLP logs.
sink
Package sink is the write side every collector module uses.
Package sink is the write side every collector module uses.
snmp
Package snmp polls devices over SNMP v1, v2c and v3, receives traps and turns both into metrics and logs.
Package snmp polls devices over SNMP v1, v2c and v3, receives traps and turns both into metrics and logs.
snmp/mibc
Package mibc compiles SMIv1/SMIv2 MIB modules into the agent's SNMP manifests and trap profiles (INF-014, INF-015, gap G-20), so a vendor MIB can be polled and its traps named without hand-written YAML.
Package mibc compiles SMIv1/SMIv2 MIB modules into the agent's SNMP manifests and trap profiles (INF-014, INF-015, gap G-20), so a vendor MIB can be polled and its traps named without hand-written YAML.
internal
ascode
Package ascode is the configuration-as-code engine shared by `wtctl apply|diff|export` and the Terraform provider: manifests of kind X named N in project P map onto the project REST API.
Package ascode is the configuration-as-code engine shared by `wtctl apply|diff|export` and the Terraform provider: manifests of kind X named N in project P map onto the project REST API.
ascode/ascodetest
Package ascodetest is an in-memory Watchtower project API for the as-code tests: it follows the REST shapes of the kinds table (list pages, POST create, PUT/PATCH/DELETE by id or name).
Package ascodetest is an in-memory Watchtower project API for the as-code tests: it follows the REST shapes of the kinds table (list pages, POST create, PUT/PATCH/DELETE by id or name).
netguard
Package netguard keeps probes and webhook senders away from private networks (SSRF).
Package netguard keeps probes and webhook senders away from private networks (SSRF).
recorder
Package recorder captures raw browser events (navigation, clicks, input, keys) in a visible Chromium on the user's machine.
Package recorder captures raw browser events (navigation, clicks, input, keys) in a visible Chromium on the user's machine.
repofile
Package repofile finds repository files from tests, whether the code sits in the monorepo (go/ under the root) or in a mirrored public repo (the module at the root).
Package repofile finds repository files from tests, whether the code sits in the monorepo (go/ under the root) or in a mirrored public repo (the module at the root).
Package pluginsdk is the Watchtower plugin SDK (ADR-0036): a plugin is a separate process served over HashiCorp go-plugin (gRPC, MPL-2.0) that implements Source, Action and/or Filter.
Package pluginsdk is the Watchtower plugin SDK (ADR-0036): a plugin is a separate process served over HashiCorp go-plugin (gRPC, MPL-2.0) that implements Source, Action and/or Filter.
examples/hello_source command
Command hello_source is the smallest data-source plugin.
Command hello_source is the smallest data-source plugin.
sources/graphite command
Command graphite is the Graphite data source: a panel's query is "<host>|<target>".
Command graphite is the Graphite data source: a panel's query is "<host>|<target>".
sources/influxdb command
Command influxdb is the InfluxDB data source: a panel's query is "<host>|<db>|<InfluxQL>", with $timeFilter in its WHERE, or "<host>|flux:<org>|<Flux>" (InfluxDB 2), with v.timeRangeStart and v.timeRangeStop in its range().
Command influxdb is the InfluxDB data source: a panel's query is "<host>|<db>|<InfluxQL>", with $timeFilter in its WHERE, or "<host>|flux:<org>|<Flux>" (InfluxDB 2), with v.timeRangeStart and v.timeRangeStop in its range().
sources/opentsdb command
Command opentsdb is the OpenTSDB data source: a panel's query is "<host>|sum:metric{tag=value}".
Command opentsdb is the OpenTSDB data source: a panel's query is "<host>|sum:metric{tag=value}".
sources/tsdb
Package tsdb has the query paths of the InfluxDB, Graphite and OpenTSDB source plugins: each builds its request, and turns the answer into time series frames.
Package tsdb has the query paths of the InfluxDB, Graphite and OpenTSDB source plugins: each builds its request, and turns the answer into time series frames.
Package wtapi provides primitives to interact with the openapi HTTP API.
Package wtapi provides primitives to interact with the openapi HTTP API.
Command wtctl is the Watchtower operator CLI.
Command wtctl is the Watchtower operator CLI.
lsp
Package lsp is the stdio language server behind `wtctl lsp` (LSP 3.17): production latency and error lenses and hovers on functions.
Package lsp is the stdio language server behind `wtctl lsp` (LSP 3.17): production latency and error lenses and hovers on functions.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL