Skip to main content

Agentic SSH toolkit for stateful, token-efficient infrastructure workflows.

Project description

assh

assh is an agentic SSH toolkit for stateful, token-efficient remote execution.

assh provides a typed Python package and CLI for:

  • repo and global target resolution
  • stateful remote execution with output shaping
  • environment-set injection
  • reusable workflow scripts
  • Docker and Kubernetes helpers
  • SSH-driven remote worker deployment and task lifecycle management

Status

v0.1.0 is the first MVP release.

The current release includes:

  • async-first SSH transport with persisted remote working directory state
  • JSON, XML, and Rich output from a shared canonical result model
  • repo-local and global SQLite-backed target and env-set state
  • push and fetch helpers for remote file transfer
  • deployable remote worker support for long-running task lifecycle control
  • automated scenario coverage derived from Astra and Nexus workflows
  • a guarded real-VM validation suite exercised against root@192.237.244.107

Install

Local development

uv sync --group dev
uv run assh --help

Install as a tool

uv tool install --from . assh

Quick start

uv run assh init
uv run assh target add vm root@192.237.244.107
uv run assh run "uname -a && whoami && pwd" --target vm

Persist a remote workspace across commands:

uv run assh chain \
  --target vm \
  --step "mkdir -p /tmp/assh-demo" \
  --step "cd /tmp/assh-demo" \
  --step "printf 'hello from assh\n' > note.txt"

uv run assh run "pwd && cat note.txt" --target vm

Use env sets with automatic redaction:

uv run assh env set deploy APP_ENV production
uv run assh env set deploy API_TOKEN super-secret-token
uv run assh env enable deploy
uv run assh run "printf 'APP_ENV=%s\nTOKEN=%s\n' \"\$APP_ENV\" \"\$API_TOKEN\"" --target vm

Use the remote worker for long-running tasks:

uv run assh worker deploy --target vm
uv run assh task start "printf 'start\n'; sleep 10; printf 'done\n'" --target vm
uv run assh task list --target vm
uv run assh task logs <task-id> --target vm

Validation

Core local checks:

uv run ruff check .
uv run mypy src
uv run pytest
uv build

Guarded real-VM validation:

ASSH_E2E_ENABLE=1 \
ASSH_E2E_TARGET=root@192.237.244.107 \
ASSH_E2E_WORKDIR=/tmp/assh-scenarios \
ASSH_E2E_STRICT_HOSTKEY=accept-new \
uv run pytest -m e2e tests/e2e/test_vm_manual.py -vv

Documentation

Release workflow

  • .github/workflows/ci.yml runs lint, typecheck, tests, and package builds on pushes and pull requests.
  • .github/workflows/release.yml verifies the tagged revision before publishing to PyPI.

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

assh_toolkit-0.1.0.tar.gz (75.4 kB view details)

Uploaded Source

Built Distribution

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

assh_toolkit-0.1.0-py3-none-any.whl (28.2 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: assh_toolkit-0.1.0.tar.gz
  • Upload date:
  • Size: 75.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.10.11 {"installer":{"name":"uv","version":"0.10.11","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for assh_toolkit-0.1.0.tar.gz
Algorithm Hash digest
SHA256 7f56e495ff6e3be215bb0cc59770c59550b96f407b9180365aa3a5fda3f5d54e
MD5 6f2521975382e6e593f76061c4daf6db
BLAKE2b-256 40c17ebeb1ffde125b179eb4be3b46a57fd2359e1398c5a61fe1a8ad9780f6c9

See more details on using hashes here.

File details

Details for the file assh_toolkit-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: assh_toolkit-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 28.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.10.11 {"installer":{"name":"uv","version":"0.10.11","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for assh_toolkit-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 0311401fb3d01e277bd235e6565b9411abd4946d1ef55c4b442b9a5c345a3651
MD5 b4c9d1067f90ffeba360ea841e124d72
BLAKE2b-256 869c76067f6ecd70a21ee8ffc131957e2b526405a4f9f4795f8fb16fc982a72a

See more details on using hashes here.

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