Skip to main content

A black box for AI coding agents.

Project description

Runtrace

A black box for AI coding agents.

Run any coding agent through Runtrace and get a clean local report: command output, git diff, changed files, and review checklist.

Runtrace — a black box for AI coding agents

Python 3.11+ License MIT CLI No network required

Try it in 30 seconds

git clone https://github.com/husi0x/runtrace.git
cd runtrace
python -m venv .venv
source .venv/bin/activate
pip install "$PWD"
runtrace demo

Runtrace prints the report paths after demo:

xdg-open .runtrace/runs/<printed-run-id>/report.html

Why Runtrace?

AI coding agents can change 20 files in one run. Runtrace shows what they actually did.

Each run creates a local folder under .runtrace/runs/<run_id>/ with:

metadata.json    # machine-readable run record
output.log       # full command output
report.md        # readable Markdown report
report.html      # self-contained HTML report

Runtrace records command timing, exit code, live output, git branch/commit/status/diff when available, changed files, and deterministic review findings.

If the directory is not a git repository, Runtrace still records command output and marks git tracking as unavailable.

Example workflows

Use it with Codex:

runtrace run --name "codex bugfix" -- codex exec "fix the failing tests"
runtrace report
runtrace show latest

Use it with tests:

runtrace run --name "pytest baseline" -- pytest -q
runtrace report

Use portable subprocess mode when you do not want best-effort PTY handling:

runtrace run --no-pty --name "tests" -- pytest -q

CLI commands

Command What it does
runtrace init Creates .runtrace/config.toml for custom review checks
runtrace demo Records a safe demo run and generates reports
runtrace run -- <command> Records any command
runtrace run --no-pty -- <command> Records a command with portable subprocess mode
runtrace report Generates Markdown and HTML reports
runtrace index Generates .runtrace/index.html for all runs
runtrace dashboard Alias for runtrace index
runtrace export Prints a compact JSON summary for the latest run
runtrace export --output summary.json Writes the JSON summary to a file
runtrace list Lists previous runs
runtrace runs Alias for runtrace list
runtrace show <run_id> Shows one run in the terminal
runtrace show latest Shows the newest run
runtrace latest Shortcut for runtrace show latest
runtrace clean --keep 20 Deletes old runs, keeping the newest 20
runtrace version Prints the installed version

See docs/CLI.md for full command details and common mistakes.

Reports

Runtrace generates local Markdown, HTML, index, and JSON summary artifacts:

runtrace report
runtrace index
runtrace export --output summary.json

The full command output stays in output.log. The full machine-readable run record stays in metadata.json. The JSON export intentionally skips huge logs and full diffs.

Sample output is included in examples/sample-output. See docs/REPORTS.md for details.

Configuration

Create local review rules:

runtrace init

Then edit .runtrace/config.toml to change sensitive path patterns, dependency/config patterns, test command patterns, or the large-diff threshold.

See docs/CONFIG.md.

Privacy

Runtrace does not call any external API. Everything is stored locally in .runtrace/.

Reports may include command output, file paths, and git diffs. Review them before sharing publicly.

See SECURITY.md for practical security notes.

Verify locally

bash scripts/smoke.sh

Install with pipx from GitHub

pipx install git+https://github.com/husi0x/runtrace.git
runtrace demo

PyPI release prep is documented in docs/PYPI.md. Publishing is manual.

Docs

License

MIT — see LICENSE.

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

runtrace-0.2.0.tar.gz (1.3 MB view details)

Uploaded Source

Built Distribution

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

runtrace-0.2.0-py3-none-any.whl (24.5 kB view details)

Uploaded Python 3

File details

Details for the file runtrace-0.2.0.tar.gz.

File metadata

  • Download URL: runtrace-0.2.0.tar.gz
  • Upload date:
  • Size: 1.3 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.3

File hashes

Hashes for runtrace-0.2.0.tar.gz
Algorithm Hash digest
SHA256 c4eb373126d8369cdbafeb65186eea94e6811aa483a5bec58b838667fe03b580
MD5 9ab4a0c1f070918e3fbb711d1d8a485c
BLAKE2b-256 ec24ff9f0a1eb2fdbef92b0f5aa0210baf36077c13e431b22b904749ed0b8e70

See more details on using hashes here.

File details

Details for the file runtrace-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: runtrace-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 24.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.3

File hashes

Hashes for runtrace-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 29e0bd64aaae3a3839056e520d08396c1d5052d727cb73d690c4b3449c205bea
MD5 321504136981482c78ec70d6bdc932d7
BLAKE2b-256 5a9f45bcd38f65b7807a361b2e054e3c89453db88aeb28ffba057dea3c71ea30

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