Skip to main content

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.) with op_id / session_id correlation.
  • 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 run
    • package 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)

Source distribution for thump 0.2.0
File Size Uploaded
thump-0.2.0.tar.gz 26.3 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for thump 0.2.0
File Interpreter ABI Platform
thump-0.2.0-py3-none-any.whl Python 3 none any Details

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

Release history Release notifications | RSS feed

This release

0.2.0 This release

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