Skip to main content
Glama

gh-repro

Deterministic 1-line local reproducers from failing GitHub Actions runs — without Docker.

gh-repro reads a failing GitHub Actions run (gh run view --log-failed) alongside your .github/workflows/*.yml, strips timestamps/ANSI/group noise, redacts accidental tokens, and outputs the exact minimal local command (pytest, go test, vitest, jest, cargo test) with the failing step's working-directory and env.

Why gh-repro?

  • nektos/act spins up Docker to re-run entire workflows (slow, heavy, and often breaks on GitHub secrets or hosted services).

  • gh run view --log-failed dumps thousands of raw log lines mixed with UTC timestamps and ANSI codes.

  • gh-repro gives you the exact failing test node and cwd/env in < 1 second — both for humans (gh repro) and coding agents (gh repro --mcp).

Related MCP server: SuperBased Observer

Install

gh extension install dev-shiki/gh-repro

Or build from source (Go 1.24+):

go install github.com/dev-shiki/gh-repro@latest

Usage

# Inspect the latest failed workflow run in the current repo
gh repro

# Inspect failing checks on PR #123
gh repro --pr 123

# Inspect a specific run ID and emit JSON
gh repro --run-id 123456789 --json

# Offline mode from a saved `gh run view --log-failed` file
gh repro --log-file failed.log

# Execute the extracted minimal repro command locally (never runs without --run)
gh repro --pr 123 --run

Example output:

[1] test-python / Run pytest (pytest)
    cwd: backend
    env: map[APP_ENV:test DATABASE_URL:sqlite:///:memory:]
    cmd: pytest tests/test_auth.py::TestToken::test_refresh
    err: FAILED tests/test_auth.py::TestToken::test_refresh - AssertionError: expired token [REDACTED]

MCP Server Mode (Claude Code / Cursor / Windsurf / Antigravity)

The same single binary exposes a zero-dependency stdio MCP server (reproduce_ci_failure, read-only):

{
  "mcpServers": {
    "gh-repro": {
      "command": "gh",
      "args": ["repro", "--mcp"]
    }
  }
}

Security Design

  • Safe by default: Never executes extracted commands unless --run is explicitly passed.

  • No shell injection: --run invokes exec.Command(bin, args...) directly without sh -c interpolation.

  • Secret redaction: Masks ghp_, github_pat_, AKIA, sk-, and Bearer tokens in extracted error tails.

  • Safe YAML: Uses gopkg.in/yaml.v3 structured decoding on .github/workflows/*.yml.

Available Tools

1 tool
reproduce_ci_failureA

Extract a minimal 1-line local repro command, working directory, env, and cleaned error tail from a failing GitHub Actions run (read-only, never executes).

Inputs: pr, repo, run_id, log_file, +1 more.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A3.9/5.0

    Scored across 1 tool

    Disambiguation5/5

    With only one tool in the set, there is zero risk of misselection; the tool's purpose (extracting a minimal repro from a failing GitHub Actions run) is unmistakable and read-only.

    Naming Consistency4/5

    The single name `reproduce_ci_failure` follows a clean snake_case verb_noun pattern that would scale predictably, but with only one tool there is no actual pattern to be consistent across.

    Tool Count3/5

    One tool is borderline thin even for a narrow purpose; a plausible companion like listing recent failing runs or fetching full logs would round out the surface without bloat.

    Completeness3/5

    The tool returns a rich bundle (command, cwd, env, error tail), but there is no way to discover which run failed or drill into raw logs, leaving an agent dependent on input it must obtain elsewhere.

    Maintenance

    ActivityMaintained
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • F
      license
      Not graded
      quality
      A
      maintenance
      Local MCP server that lets your AI coding agent query its own cross-tool project history - file/command freshness, past test failures, cost & token spend, cache status, and session handoff - over stdio, 100% local, no telemetry.
      62
      -
    • A
      license
      Not graded
      quality
      C
      maintenance
      VCR for MCP servers: a zero-dependency stdio proxy that records and replays MCP JSON-RPC tool calls to local cassette files, enabling deterministic, offline testing of AI agent workflows without side-effects or rate limits.
      1
      MIT
    • A
      license
      Not graded
      quality
      C
      maintenance
      Local-first MCP and coding-agent reliability harness that captures bounded, sanitized failure evidence and generates deterministic executable regression tests. Capture is opt-in; no API key or hosted service is required.
      2
      Apache 2.0