Skip to main content

AI-powered summary filter that distills any command's output.

Project description

shtym

AI-powered summary filter that distills any command's output.

Overview

Shtym is a command wrapper designed to reduce context size for both human users and AI coding agents. It wraps command execution and, when an LLM is available, summarizes the output; otherwise it passes output through unchanged.

Installation

pip install shtym

# with Ollama support (requires a running Ollama instance)
pip install "shtym[ollama]"

Configuration

When using Ollama, you can configure the behavior using environment variables:

  • SHTYM_LLM_SETTINGS__BASE_URL: Ollama server URL (defaults to http://localhost:11434)
  • SHTYM_LLM_SETTINGS__MODEL: Model to use (defaults to gpt-oss:20b)

Example:

export SHTYM_LLM_SETTINGS__BASE_URL=http://localhost:11434
export SHTYM_LLM_SETTINGS__MODEL=llama2
stym run pytest tests/

Usage

Wrap any command with stym run:

# Run tests
stym run pytest tests/

# Run linter
stym run ruff check .

# Build project
stym run npm run build

# Any command with options
stym run ls -la

# Pipe output to other commands
stym run pytest tests/ | grep FAILED

Key Features

  • Exit code inheritance: Shtym preserves the wrapped command's exit code, making it CI/CD friendly
  • Clean stdout: Output contains only command results, no progress indicators or metadata
  • Transparent wrapper: Works seamlessly with existing workflows and scripts
  • Optional LLM summaries: If Ollama is available, output is summarized by the configured model; otherwise passthrough is used automatically

Design Philosophy

Shtym follows Unix conventions for command wrappers (like sudo, timeout, time):

  • Executes commands as subprocesses
  • Inherits and propagates exit codes exactly
  • Maintains clean stdout for composability
  • Enables reliable integration with automated workflows

Development

For development documentation, see:

License

MIT

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

shtym-0.1.2.tar.gz (8.9 kB view details)

Uploaded Source

Built Distribution

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

shtym-0.1.2-py3-none-any.whl (9.9 kB view details)

Uploaded Python 3

File details

Details for the file shtym-0.1.2.tar.gz.

File metadata

  • Download URL: shtym-0.1.2.tar.gz
  • Upload date:
  • Size: 8.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for shtym-0.1.2.tar.gz
Algorithm Hash digest
SHA256 424df56d988a01ebbdd775f937f13a60bbaec503d1f2008dda9fc85f0b07147b
MD5 7d1c180ba258ab1a1edd87aee3250385
BLAKE2b-256 84897187e4018053df972cc767e2f97d3ecebcf36658081e3f8774666a21c3a8

See more details on using hashes here.

Provenance

The following attestation bundles were made for shtym-0.1.2.tar.gz:

Publisher: release.yml on osoekawaitlab/shtym-py

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

File details

Details for the file shtym-0.1.2-py3-none-any.whl.

File metadata

  • Download URL: shtym-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 9.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for shtym-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 53de79c8466c970be234e5bc7ed76dc7ba863f84c941ca6f574a8a91d1e6b1d9
MD5 5a274ed9b2378f38933dc5faecaeab70
BLAKE2b-256 a7a51dd54c7b239442154a1f1b594bb234767811c01a58635378553fb5faf79d

See more details on using hashes here.

Provenance

The following attestation bundles were made for shtym-0.1.2-py3-none-any.whl:

Publisher: release.yml on osoekawaitlab/shtym-py

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