Skip to main content

runspec-linux

Linux system-administration runnables (plus Python-venv management, crontab, filesystem, and the cross-platform web/TLS/API probes) for runspec. pip install it into a venv and the runnables are discoverable by runspec local, runspec serve (MCP), and runspec-console.

All runnables emit JSON on stdout. Read-only runnables are autonomy = "autonomous"; state-changing ones are autonomy = "confirm".

Nothing here runs as root. A tool runs as whoever owns its venv (runspec

= 0.68.0): you in a personal venv, or the service account in a shared one. --run-as picks another unprivileged account and refuses root. The tools that need root (package upgrades/installs, reboot-host, set-sysctl, enable-passwordless-sudo) are in runspec-linux-root, for a root-owned admin venv.

Install

pip install runspec-linux

Runnables

Group Runnables
System system-info, disk-usage, block-devices, check-memory, cpu-info, pressure
Processes list-processes
Services list-services, check-service, restart-service, service-detail, failed-units
Logs tail-log, search-log, journalctl
Network network-interfaces, ping-host, check-port, show-connections, trace-route, route-table, socket-stats, dns-config, open-ports
Kernel params get-sysctl
Files find-large-files, backup-files, owning-package
Sessions last-logins, who
Containers list-containers, container-logs, restart-container
Packages (read-only) list-packages, list-autoremovable
Python venvs create-venv, install-into-venv, configure-pip
TCP nc-command
Commands which
Cron cron (multi-verb: list/add/remove/clear)
Filesystem filesystem (multi-verb, backed by runspec-fs-core)
Web / TLS / API cert-check, cert-chain, tls-info, http-check, http-headers, redirect-trace, dns-lookup, api-spec

The package runnables auto-detect apt / dnf / yum / zypper / pacman. The web/TLS/API probes are pure HTTP (shared with runspec-windows via runspec-webops-core) and run anywhere.

system-info
list-packages --filter nginx
check-port --host db-01 --port 5432
cert-check --url https://internal.example.com

Python venvs

create-venv, install-into-venv and configure-pip take a per-invocation --run-as <user> (+ --become-method sudo|su) rather than a declarative run_as, so the service account that owns a shared venv is chosen per call:

create-venv --python /usr/bin/python3.12 --dest /opt/venvs/ops --run-as svc-ops --group ops
install-into-venv --venv /opt/venvs/ops --package "runspec-linux==0.13.2" --run-as svc-ops

Public Python API

The pure logic lives in runspec-linux-core — no runspec dependency, no runspec.toml, no entry points (so it surfaces no runnables). A corporate wrapper package that only wants a helper should depend on the core alone:

from runspec_linux_core import nc_send, system_info, install_into_venv

The helpers are also re-exported from runspec_linux for back-compat. Core helpers return plain data and raise (ToolNotFoundError / CommandError) on failure; the runnable wrappers catch these to render the CLI/agent behaviour.

Development

python -m venv .venv && . .venv/bin/activate
pip install -e ".[dev]"
ruff check . && ruff format --check .
pytest

Metadata

Release files for runspec-linux 0.19.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 runspec-linux 0.19.0
File Size Uploaded
runspec_linux-0.19.0.tar.gz 37.8 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for runspec-linux 0.19.0
File Interpreter ABI Platform
runspec_linux-0.19.0-py3-none-any.whl Python 3 none any Details

Total release size: 69.0 kB

Release files / runspec_linux-0.19.0.tar.gz

Download URL runspec_linux-0.19.0.tar.gz
Size 37.8 kB
Tags Source
SHA-256 checksum
How to use checksums
c4996b284e03d789e68092a0300061ad7ef3a4fb8926473764f253b6acbdbe4f
BLAKE2b-256 checksum
How to use checksums
5ef6868879a60dcd56f973f0178d9d51dea5f41682797c68be0d75e2ee76a088
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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 Sep 30, 2026.

Transparency log

Release files / runspec_linux-0.19.0-py3-none-any.whl

Download URL runspec_linux-0.19.0-py3-none-any.whl
Size 31.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
14960b5162e5d372a14bc8670a3ddf25b27570deffd00538f92d6021ab7bd082
BLAKE2b-256 checksum
How to use checksums
ded81cbf15eb617b586063f8a08bc5d8d795a92616d3fde15491d8c626010a1e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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 Sep 30, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.19.0 This release

2 release files

0.18.0

2 release files

0.17.0

2 release files

0.16.0

2 release files

0.15.1

2 release files

0.15.0

2 release files

0.14.0

2 release files

0.13.3

2 release files

0.13.2

2 release files

0.13.1

2 release files

0.13.0

2 release files

0.12.0

2 release files

0.10.0

2 release files

0.9.0

2 release files

0.8.1

2 release files

0.8.0

2 release files

0.7.0

2 release files

0.6.2

2 release files

0.6.1

2 release files

0.6.0

2 release files

0.5.0

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.0

2 release files

0.2.0

2 release files

0.1.3

2 release files

0.1.2

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