Skip to main content

GitRescue

An LLM agent that fixes git mistakes from plain-language requests, safely.

pip install gitrescue
export GITRESCUE_API_KEY=...            # Groq by default
gitrescue "I committed to main instead of my feature branch"

The agent inspects the repository, plans, runs fixes step by step through a fixed set of tools, verifies the end state and reports what it did. By default it works on a temporary copy of your repository and applies the result only after you approve the final plan.

Safety model

Every tool call passes through a policy engine that the model cannot change:

  • Allowlist: 21 tools in three risk tiers (READ, LOCAL_REVERSIBLE, DESTRUCTIVE). No shell.
  • Hard blocks: force-pushing main/master, the remote default branch or another author's branch; deleting remote branches; git clean; config and credential changes; paths outside the repository. Repository hooks never run.
  • Backups: before every change, HEAD, all branches, the stash, the index and the full working tree are pinned under refs/gitrescue/backups/<id>. restore_backup undoes anything.
  • Approval: DESTRUCTIVE tools (reset, rebase, resolve_conflict, push_force_with_lease) show a preview and need a human yes.
  • Invariant: after each change, no previously reachable commit or uncommitted work may be lost without a backup; on violation the step is rolled back automatically.
  • Untrusted content: commit messages, file contents and branch names reach the model only as escaped data inside <tool_result untrusted="true"> blocks.

Commands

command
gitrescue "<request>" fix something (--no-sandbox to work in place)
gitrescue replay [run_id] print a recorded run (JSONL traces)
gitrescue eval [--reference] run the 15 eval scenarios
gitrescue mcp -C <repo> MCP server (stdio) with the same tools and policy
gitrescue tools list tools and risk tiers

Configuration

GITRESCUE_API_KEY, GITRESCUE_BASE_URL (default https://api.groq.com/openai/v1), GITRESCUE_MODEL, GITRESCUE_MAX_STEPS (15), GITRESCUE_MAX_TOKENS (200000), GITRESCUE_MAX_COST_USD with GITRESCUE_COST_PER_MTOK_IN/_OUT, GITRESCUE_PROTECTED_BRANCHES, GITRESCUE_TRACE_DIR. Any OpenAI-compatible endpoint with tool calling works.

Metadata

Release files for gitrescue-agent 0.1.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 gitrescue-agent 0.1.0
File Size Uploaded Provenance Actions
gitrescue_agent-0.1.0.tar.gz 57.4 kB With provenance Details for gitrescue_agent-0.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for gitrescue-agent 0.1.0
File Interpreter ABI Platform Actions
gitrescue_agent-0.1.0-py3-none-any.whl Python 3 none any Details for gitrescue_agent-0.1.0-py3-none-any.whl

Total release size: 142.3 kB

Release files / gitrescue_agent-0.1.0.tar.gz

Download URL gitrescue_agent-0.1.0.tar.gz
Size 57.4 kB
Tags Source
SHA-256 checksum
How to use checksums
9cb160f29357992f755ec464c77ab518ddee3c5a2c9eab4704f258274d705bd8
BLAKE2b-256 checksum
How to use checksums
cc36d62a40a1ee7cf11ed725db799c2509bcae33b6a385357334071e1ce0c990
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 8, 2026.

Transparency log

Release files / gitrescue_agent-0.1.0-py3-none-any.whl

Download URL gitrescue_agent-0.1.0-py3-none-any.whl
Size 84.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
2fff147687a84b1fb10dddadf3d20d87a39c5f28bc3431b95be89f7b924af291
BLAKE2b-256 checksum
How to use checksums
47a31e1b778134dbcfe64d3cf84d6c85e53c03fc7ed85b1306d9faaff34b67f6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 8, 2026.

Transparency log

Security for gitrescue-agent 0.1.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.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for gitrescue_agent-0.1.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 8, 2026.

Transparency log

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.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files Full provenance

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