thump (Thumper Bun harness)
Semantic harness for Bun — a clean, observable, agent-native layer over the Bun JavaScript runtime.
Part of the Thumper project (thump binary). The Rust side now provides the preferred native execution path.
This Python package provides a structured, event-driven interface for running Bun commands (bun run, bun add, bun install, bun remove, etc.) while emitting a stable NDJSON event stream.
It is designed to be used from:
- Command line
- TUI / IDE integrations
- AI agents (via ACP / stdio)
Features
- Stable event envelope — every operation emits structured events (
*.started,process.stdout,process.exited, etc.) withop_id/session_idcorrelation. - Raw output preservation — stdout/stderr from Bun is never lost.
- Operation abstraction — clean success/error paths with normalized error model.
- Live process streaming — subprocess execution with real-time event emission.
- First-class commands:
script runpackage add/install/remove
- Works great from Rust, Python, or directly on the CLI.
Installation (development)
git clone https://github.com/New1Direction/thumper.git
cd thumper/thump # or pip install -e . from the thump/ directory
pip install -e .
Or run directly:
python -m thump --help
Usage
From Python
from thump import script_run, package_add
result = script_run("dev", cwd="my-project")
result = package_add(["hono", "zod"], cwd="my-project", dev=True)
From CLI
python -m thump script run dev
python -m thump package add hono --dev
python -m thump package install
Streaming events
All commands emit NDJSON to stdout. Each line is either:
- A structured event (with
event,op_id,data, etc.) - A final result object (
{"ok": true, "operation": "..."})
This makes it trivial to consume from Rust, Go, another Python process, or an agent.
Architecture
Bun CLI
↓
thump (Python semantic layer)
↓
Stable NDJSON event stream + final results
↓
Consumers: CLI • TUI Jobs • ACP agents • Rust adapter
Related Projects
- thumper — The Rust TUI/CLI (Thumper) — primary binary with native Bun execution.
Status
This is the Python-first implementation (Phase 1) as described in the design document.
A native Rust implementation of the same protocol is planned for later.
License
MIT
Metadata
Release files for thump 0.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| thump-0.2.0.tar.gz | 26.3 kB | Without provenance | Details for thump-0.2.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| thump-0.2.0-py3-none-any.whl | Python 3 | none | any | Details for thump-0.2.0-py3-none-any.whl |
Total release size: 50.2 kB
Release files / thump-0.2.0.tar.gz
| Download URL | thump-0.2.0.tar.gz |
|---|---|
| Size | 26.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
63d91fb0fad7df10bb79f5a614cece103113abd4909a9e6fdcdc7f06ad77d05c
|
|
BLAKE2b-256 checksum How to use checksums |
13804e82921d2aa56e21e73f1d8bcc4f2c5cdc71c5fe4f70a669be53020f6a99
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.9.6
|
Release files / thump-0.2.0-py3-none-any.whl
| Download URL | thump-0.2.0-py3-none-any.whl |
|---|---|
| Size | 23.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
a3ece309c6edc60568877ea001c6502a5e74ab8e0c8f5717c88ea73c32662bef
|
|
BLAKE2b-256 checksum How to use checksums |
2f8fd9d7a1496d3dfcbd2bbffbe38be0f683351f48dff6837af0dc3d650336bb
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.9.6
|
Security for thump 0.2.0
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.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.