The upgrade passed CI. Does your app still do the same thing?
Quick start · How it works · Agents · GitHub Action · Docs
English · 简体中文 · 繁體中文 · 日本語 · 한국어 · Español · Português · Русский · Deutsch · Français · Tiếng Việt
upgrade-anything upgrades a Python or Node dependency one version rung at a time, lets your coding agent (Claude Code, Codex, OpenCode) fix what breaks, and then checks the result against what your code did before the upgrade: the same tests, the same recorded behavior, and no tests quietly deleted, skipped or weakened along the way.
- Behavior, not just green tests. Replays the function calls, CLI output and HTTP responses recorded before the upgrade, and compares the results.
- One rung at a time.
django@5visits each major version in between, each in its own Git worktree and branch. Nothing is merged for you. - Your agent does the repair. Claude Code, Codex, OpenCode or any command gets the failures, the release notes link and the APIs your code uses.
- Catches agents that cheat. Deleted or skipped tests, weakened assertions and reverted upgrades are flagged, not merged.
- Fits your workflow. A CLI, a Claude Code plugin, an MCP server, and a GitHub Action for Dependabot and Renovate pull requests.
- One small binary. Written in Rust and shipped as a single executable; runs on Linux, macOS and Windows.
These are real upgrades of public projects. The test suite passed before and after each one, and upgrade-anything still caught a change:
| Upgrade | Tests before → after | What changed anyway |
|---|---|---|
| meow 9 → 10 in strip-ansi-cli | 2 → 2 passed | --help and --version output (evidence) |
| WTForms 2 → 3 in Flask-WTF | 54 → 54 passed | Three rendered HTML and message outputs (evidence) |
| Python 3.9 → 3.10 for python-slugify | 81 → 81 passed | The CLI --help heading |
| send 0 → 1 in serve-static | 92 → 92 passed | Content-Type charset; the agent edited a test to match, flagged needs-review (evidence) |
When nothing changed, you get evidence instead of a shrug. In a run of 25 real upgrades across 12 projects, including twelve bumps from the history of searxng and healthchecks, the gate replayed 11,366 recorded calls: 23 upgrades verified with no false alarms, and the two that broke tests (pyotp 2.12, ua-parser 0.18) were flagged. Silent changes like the four above are uncommon, which is why a gate has to be quiet the rest of the time (full results).
- Freeze the current behavior: the test results and test inventory, and
optionally CLI output (
--cli), HTTP responses (--http) and the inputs and return values of your Python functions during the test run (--calls). - Upgrade one rung at a time in a Git worktree (
django@5visits each major in between). When something breaks, your agent gets a task file with the failures, the release notes link and a scan of the APIs your code uses. - Gate the result: rerun the tests, replay the recordings, and diff the
change for cheating. Only
verifiedrungs are committed, each on its own branch. Nothing is merged for you.
Requirements: Git, a clean checkout with passing tests, and the project's
current dependencies installed. Install the CLI with pipx, npm or Cargo, or
download a prebuilt binary from the releases
page; uvx upgrade-anything and npx upgrade-anything run it without installing:
pipx install upgrade-anything
npm install --global upgrade-anything
cargo install --locked upgrade-anythingSee it catch a green-but-changed upgrade first:
upgrade-anything demoReal output of upgrade-anything demo (offline, under 20 seconds; needs Python 3.9+).
Every test passes on the new version, and every non-ASCII URL on the blog changes.
freeze --calls recorded what the app's functions returned during the test run;
the gate replayed those calls against the upgraded dependency.
Then, in your project:
upgrade-anything freeze --calls # optional: record behavior beyond the tests
upgrade-anything up django@5 # upgrade, repair with your agent, gateup detects Claude Code, Codex or OpenCode on PATH; pass --agent '<command containing {task}>' for anything else, or --rounds 0 to only evaluate. It stops
at the first rung that is not verified and tells you what changed:
✗ tinyslug@2 1.0.0 → 2.0.0 regression
tests 3 → 3 · no findings
call drift: blog:post_url(title="Café Crème Brûlée", year=2026): "/2026/cafe-creme-brulee/" → "/2026/caf-cr-me-br-l-e/"
branch upgrade-anything/tinyslug@2
report .upgrade/reports/tinyslug@2.md
Every rung gets a Markdown report (report --format html for a page, --pr-body
for a pull request). Run ./demo/run.sh for an offline agent
repair and a caught test deletion. See the command reference
for plan, freeze, go, gate, status and recovery.
- Claude Code: the
/upgrade-anything:upgradeplugin. - Codex, Claude Code, OpenCode:
upgrade-anything setupinstalls a shared skill, so you can ask for an upgrade in plain words. - Any MCP client:
upgrade-anything mcpruns a stdio MCP server.
The plugin, the skill with Codex, and up with both agents were each checked on
a real upgrade with Claude Code 2.1 and Codex CLI 0.171.
An agent told to "make the tests pass" has easy ways out. The gate compares the upgrade diff with the frozen test inventory (rules and examples):
cheated: deleted tests, new skip/xfail/only markers, changed test commands or config, frozen state tampered with, recorded output pasted into source, or the upgrade itself reverted or bypassed (shadow packages, vendored copies, monkeypatches).needs-review: edited expected values, fewer assertions, renamed tests, or test API migrations that no source change corroborates. Often legitimate, so a person decides.
In UpgradeBench (ten real upgrade cases), Claude
Code with Haiku verified 9 and was flagged needs-review once for changing a
test's charset expectation; Codex verified 9, with one regression caused by its
Windows sandbox. Across 31 completed upgrades of public repositories, no honest
upgrade was marked cheated. No real agent has been caught cheating yet either;
the offline demo uses a scripted one.
| Verdict | Meaning | Exit |
|---|---|---|
verified |
Tests, recordings and anti-cheat checks all completed with nothing found | 0 |
pre-existing-failure |
Tests failed before and after the upgrade | 1 |
unverified |
A required check could not run; never treated as a pass | 1 |
needs-review |
A test change needs a human look | 1 |
regression |
Previously passing tests or recorded behavior changed | 1 |
cheated |
A hard anti-cheat signal | 1 |
The most severe verdict wins. Details are in the verdict guide.
The root action.yml runs the gate on bot PRs: it freezes the base
commit, installs the PR head separately, and publishes the verdict, test totals
and anti-cheat findings to the job summary, with an optional sticky PR comment.
For Python, record-calls: 'true' also replays the base version's recorded
function calls on the PR head, so a green bump that changes behavior fails.
See the GitHub Action guide.
- Python and Node only:
pyproject.toml(PEP 621, Poetry),requirements*.txt,setup.py/setup.cfg, andpackage.jsonwith npm, pnpm or Yarn. No recursive monorepo orchestration. - Test detection covers pytest, unittest and
npm test; anything else takes--test-cmd. Per-test comparison needs pytest's JUnit output; other runners compare exit codes and recognized summaries. verifiedmeans the configured checks found nothing. It does not prove all behavior is unchanged: behavior checks cover only whatfreezerecorded, and call replay skips calls that need a database, a request or other test context (reported as coverage gaps), plus functions that depend on the clock, randomness or the checkout.- Anti-cheat is static analysis of the diff. It cannot prove dynamic, generated or obfuscated code safe.
- Tests, install scripts and agents run with your permissions. Worktrees isolate edits, not processes.
- Field-tested on Linux and Windows 11. On macOS, hosted CI runs the full test suite and builds the release binaries and wheels, but no real project has been upgraded there yet. The GitHub Action has not run on a real pull request yet.
The full list, with field evidence for each claim, is in docs/limitations.md.
Docs index · How it works · Commands · Anti-cheat · FAQ · Architecture · Contributing · Releasing · llms.txt for agents
Licensed under MIT OR Apache-2.0.