ReproPack is a small CLI that turns a failing command into a shareable repro bundle: logs, environment/tooling info, git state, and (optionally) the relevant source files — with redaction on by default.
It’s designed to make “can you send a repro?” painless.
- Capture command execution:
stdout/stderrlogs- exit code + wall time
- runnable
run.shreplay script - machine-readable
repropack.jsonmanifest
- Capture environment + tools:
- macOS info:
sw_vers,uname,sysctl - tool versions (clang/cmake/python/rustc/git/etc.)
- macOS info:
- Capture git info (when available):
- HEAD SHA (or “no commits yet”)
- dirty status
git diffpatch- sanitized remotes
- Include source files:
--files changedcopies changed files into the bundle (skips common secret files)
- Redaction default ON
- scrubs common token/secret patterns from logs + diffs + remotes
- disable with
--no-redact
- Optional zip output:
--zipproducesrepro_....zip
- Replay:
repropack replay <bundle_dir>
- Rust toolchain (
rustc,cargo)
Install Rust (macOS/Linux):
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
source "$HOME/.cargo/env"git clone https://github.com/snarang181/repropack.git
cd repropack
cargo build --releaseThe compiled binary will be located at target/release/repropack.
repropack run -- bash -lc "echo hello; echo err >&2; exit 3"repropack --always run -- echo hellorepropack --zip run -- bash -lc "exit 3"
# creates repro_....zip next to the folderrepropack --files changed run -- bash -lc "exit 3"
# includes changed files in the bundlerepropack --no-redact run -- bash -lc "echo 'Bearer abcdef123'; exit 3"
# includes sensitive info in logs/diffs/remotesrepropack replay <bundle_dir>
# runs the captured command in the bundle--out <DIR>: Output directory name (default:repro_<timestamp>)--always: Always create a bundle, even if the command succeeds--zip: Create a zip archive of the bundle--files <none|changed|all>: Include source files in the bundle--no-redact: Disable redaction of sensitive info
run -- <COMMAND>: Run a command and create a repro bundle on failurereplay <BUNDLE_DIR>: Execute's bundle'srun.shto reproduce the command
The repro bundle directory contains:
repro_YYYY-MM-DD_HHMMSS/
README.md
run.sh
repropack.json
logs/
stdout.log
stderr.log
env/
sw_vers.txt
uname.txt
sysctl.txt
tool_versions.txt
repo/
head_sha.txt
status.txt
patch.diff
remotes.txt
files/ # present if --files changed
...README.md: summary with the command, result, and git info (if available)run.sh: script to replay the captured commandrepropack.json: machine-readable manifest of the bundle contentslogs/: capturedstdoutandstderrlogsrepo/patch.diff: git diff of uncommitted changes (redacted by default)
Redaction is enabled by default and applies to:
logs/*repo/*README.md,run.sh,repropack.json
Redaction uses a set of best-effort patterns for common secrets:
- GitHub tokens (
ghp, etc.) Bearertokens- AWS access keys
- Slack token patterns
- Generic API keys
token,secret,passwordpatterns
File inclusion (--files changed|all) skips common secret files:
.env- SSH Keys (
id_rsa,id_ed25519, etc.) - private keys/certificates (
.pem,.crt, etc.) - filenames containing
secret,password,token
Note: This is a best-effort tool. Always review the bundle contents before sharing.
cargo run -- run -- bash -lc "exit 3"cargo fmtcargo clippy -- -D warningscargo test