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 tohttp://localhost:11434)SHTYM_LLM_SETTINGS__MODEL: Model to use (defaults togpt-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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file shtym-0.1.3.tar.gz.
File metadata
- Download URL: shtym-0.1.3.tar.gz
- Upload date:
- Size: 12.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
eaabb85df4e94ef3987868e0773159efaa35e22cbe338e529a2f3fe1014a0e59
|
|
| MD5 |
3af6773292d98a0bf83d39cec4738a2e
|
|
| BLAKE2b-256 |
fbf3c0f0fce6402b55ba922f0ed5d6baec4f51847790e0caf66ce96fb6edf778
|
Provenance
The following attestation bundles were made for shtym-0.1.3.tar.gz:
Publisher:
release.yml on osoekawaitlab/shtym-py
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
shtym-0.1.3.tar.gz -
Subject digest:
eaabb85df4e94ef3987868e0773159efaa35e22cbe338e529a2f3fe1014a0e59 - Sigstore transparency entry: 749154278
- Sigstore integration time:
-
Permalink:
osoekawaitlab/shtym-py@2eac9de79cb321529adf06f87a36cd639a85dbd7 -
Branch / Tag:
refs/tags/v0.1.3 - Owner: https://github.com/osoekawaitlab
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@2eac9de79cb321529adf06f87a36cd639a85dbd7 -
Trigger Event:
push
-
Statement type:
File details
Details for the file shtym-0.1.3-py3-none-any.whl.
File metadata
- Download URL: shtym-0.1.3-py3-none-any.whl
- Upload date:
- Size: 15.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
064f5ff7cc9c95e20eaaa3847836cce65c5881eec317cba4b82d04057ded8a37
|
|
| MD5 |
5f9fe83a0548e209af0ffef32581524e
|
|
| BLAKE2b-256 |
ec6a225f1adcc1dfcc625c9275bb28416958edc671cb09561f6607c9a697fa1d
|
Provenance
The following attestation bundles were made for shtym-0.1.3-py3-none-any.whl:
Publisher:
release.yml on osoekawaitlab/shtym-py
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
shtym-0.1.3-py3-none-any.whl -
Subject digest:
064f5ff7cc9c95e20eaaa3847836cce65c5881eec317cba4b82d04057ded8a37 - Sigstore transparency entry: 749154293
- Sigstore integration time:
-
Permalink:
osoekawaitlab/shtym-py@2eac9de79cb321529adf06f87a36cd639a85dbd7 -
Branch / Tag:
refs/tags/v0.1.3 - Owner: https://github.com/osoekawaitlab
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@2eac9de79cb321529adf06f87a36cd639a85dbd7 -
Trigger Event:
push
-
Statement type: