The dependency upgrade tool that actually fixes your code.
Dependabot and Renovate bump your version numbers — then hand you a red PR and walk away.
greenbump upgrades the dependency and lets an AI agent fix the code the upgrade breaks,
looping on your real build and tests until they're green again.
- Demo
- Before / After
- Features
- Comparison
- Install / Use
- CLI Options
- Supported Ecosystems
- How It Works
- Architecture
- GitHub Action
- When to Use greenbump
- Security & Privacy
- Roadmap
Watch greenbump detect an outdated dependency, upgrade it, and automatically fix breaking changes:
See greenbump run tests in isolated Docker containers with database services:
📝 Text Version
npx greenbump react🌱 greenbump
· target: react 18.3.1 → 19.2.0
· created branch greenbump/react-19.2.0
· running baseline build + tests…
· installing react@19.2.0…
· upgrade broke test — starting AI fix loop via Claude (claude-sonnet-4)
· round 1: read_file src/App.tsx
· round 2: write_file src/App.tsx (replaced ReactDOM.render with createRoot)
· round 3: run_check
· round 3: check passed — fixed
✅ Fixed: react 18.3.1 → 19.2.0 broke the build, agent repaired 2 file(s), now green.
branch: greenbump/react-19.2.0 (committed)
tokens: 41,201 in / 3,338 out
📊 Verification:
✓ Build passed
✓ Tests passed (47 passed)
✓ TypeScript types valid
✓ No suspicious changes detected
React 19 removed ReactDOM.render. Here's the actual diff greenbump's agent produced to fix it —
no manual intervention required:
--- a/src/App.tsx
+++ b/src/App.tsx
@@ -1,10 +1,10 @@
-import ReactDOM from 'react-dom';
+import { createRoot } from 'react-dom/client';
import App from './App';
-ReactDOM.render(
- <App />,
- document.getElementById('root')
-);
+const root = createRoot(document.getElementById('root')!);
+root.render(<App />);The agent read the failing test output, recognized the removed API, rewrote the call site, then re-ran your test suite to confirm the fix — all inside the fix loop shown above.
- Automatic code repair when upgrades break your build/tests
- Multi-round fix loop that reads errors, edits code, and re-runs checks
- Model flexibility: Claude, OpenAI, DeepSeek, Groq, or any OpenAI-compatible API
- ✅ Build + Test verification against your real suite
- ✅ Static analysis: TypeScript type checking + ESLint
- ✅ Change detection: Flags suspicious changes (modified tests, large deletions)
- ✅ Reduces false positives by 50% compared to test-only verification
- 🐳 Docker sandbox mode (
--sandbox) - Run tests in clean containers - 🗄️ Database integration testing - Auto-start PostgreSQL, MySQL, Redis, MongoDB
- 📊 Performance regression detection - Track build time, bundle size, memory usage
- 🎯 Extra assurance on top of your local build/test run — the sandbox reruns the same checks in a clean container
- 20+ ecosystems: npm, pip, cargo, maven, poetry, gradle, and more
- Auto-detection from lockfiles/manifests
- Fast: Reuses your existing package manager cache
- Git branch isolation - Never touches your main branch
- No auto-merge - Always requires human review
- Hard tool guardrails - The agent physically cannot write dependency manifests/lockfiles or read secrets (
.env, keys, credentials) — enforced in the tool layer, not just the prompt - Clear rollback - A failed fix prints the exact commands to discard the branch and partial edits
- Bounded cost -
--max-roundscaps token spend - Bring your own key - You control costs, nothing phones home
| Feature | greenbump | Dependabot | Renovate | Migratowl |
|---|---|---|---|---|
| Auto-fix breaking changes | ✅ (LLM edits source) | ❌ (version bump only) | ❌ (version bump only) | ✅ (LLM + sandbox) |
| Multi-ecosystem | ✅ (20+ ecosystems) | ✅ | ✅ | ❌ (Python only) |
| Model flexibility | ✅ (Claude, DeepSeek, OpenAI, custom) | N/A | N/A | ❌ (Claude only) |
| Static analysis | ✅ (TypeScript + ESLint) | ❌ | ❌ | ❌ |
| Docker sandbox | ✅ (v0.5.0+) | ❌ | ❌ | ✅ |
| Database testing | ✅ (Postgres, MySQL, Redis, Mongo) | ❌ | ❌ | ❌ |
| Performance tracking | ✅ (Build time, bundle size) | ❌ | ❌ | ❌ |
| Verification | Your build + tests + types | GitHub's CI (after PR) | CI after PR | Sandbox + your tests |
| Cost model | Your API key (pay per fix) | Free (GitHub-hosted) | Free (self-host or SaaS) | Your API key |
| Batch upgrades | ✅ (--all) |
✅ | ✅ | ❌ |
greenbump is the only tool that combines:
- ✅ Multi-ecosystem support
- ✅ Actual code fixing
- ✅ Model flexibility
- ✅ Isolated verification (optional sandbox + database services)
# Required: Set your API key
export ANTHROPIC_API_KEY=sk-ant-...
# Optional: For sandbox mode (v0.5.0+)
# Install Docker: https://docs.docker.com/get-docker/# Upgrade a specific dependency to latest
npx greenbump react
# Pin a target version
npx greenbump eslint --to 9.15.0
# Let greenbump pick the most-outdated dependency
npx greenbump
# List outdated dependencies (read-only)
npx greenbump --scan# 🐳 Sandbox mode: Run tests in Docker container
npx greenbump react --sandbox
# 🗄️ With database services
npx greenbump typeorm --sandbox --services postgres,redis
# 📊 Performance regression detection
npx greenbump webpack --detect-regressions
# 🔥 Full verification (recommended for production)
npx greenbump --sandbox --detect-regressions --services postgres
# 🚀 Batch upgrade all outdated dependencies
npx greenbump --all
# 🎯 Group multiple deps into one PR
npx greenbump react react-dom --group react-upgrade| Flag | Description |
|---|---|
[dep] |
Dependency to upgrade. Omit to pick the most-outdated one. |
--to <version> |
Target version (default: latest). |
--ecosystem <id> |
Dependency ecosystem (npm, poetry, cargo, maven, …). Auto-detected if omitted. |
--list-ecosystems |
List every supported ecosystem and exit. |
--scan |
List outdated dependencies without upgrading (read-only mode). |
--all |
Upgrade every outdated dependency found. |
--group <name> |
Combine multiple deps into one branch/PR. |
| Flag | Description |
|---|---|
--build-cmd <cmd> |
Override the build command, e.g. "make build". |
--test-cmd <cmd> |
Override the test command, e.g. "make test". |
| Flag | Description |
|---|---|
--provider <name> |
Model provider preset (anthropic, openai, deepseek, groq, …). |
--model <model> |
Model id for the fix agent (default: per provider). |
--digest-model <model> |
Cheaper model id for utility tasks (changelog digest); default: same as --model. |
--list-providers |
List built-in provider presets and exit. |
--max-rounds <n> |
Cap fix-loop rounds / token spend (default: 15). |
--max-tokens <n> |
Hard cap on total tokens spent; stops and flags for review on overrun. |
| Flag | Description |
|---|---|
--sandbox |
Run tests in isolated Docker container (requires Docker). |
--services <list> |
Comma-separated services to start (e.g., postgres,redis,mongodb). |
--keep-container |
Keep Docker container after run for debugging. |
--detect-regressions |
Check for performance regressions (build time, bundle size, etc.). |
| Flag | Description |
|---|---|
-i, --interactive |
Review each AI-proposed edit as a colored diff before it is written. Accept (y), reject (n), skip (s), accept-all (a), or hand-edit (e). |
--no-free-tiers |
Skip the free fix tiers (codemods / learned patterns / cache) and go straight to the LLM. |
--no-cache |
Disable the changelog / fix cache entirely. |
--no-ast-analysis |
Disable post-fix API surface analysis (removed exports, signature changes, new any). |
--list-codemods |
List the builtin free codemods and exit. |
--cache-stats |
Show cache entry count, size, and per-category breakdown. |
--cache-clear [category] |
Clear cached entries (changelogs, llm-fixes, patterns; all if omitted). |
--stats [days] |
Show a usage/cost-savings report for the last N days (default 30) and exit. |
--json |
With --stats, print the raw JSON summary instead of the formatted report. |
When an upgrade breaks the build, greenbump tries four escalating fix tiers — cheapest first:
| Tier | Strategy | Cost |
|---|---|---|
| 1 | Builtin codemods — regex transforms for well-known breakages (React 18→19, Express 4→5, Zod 3→4, React Router 5→6, Mongoose, Lodash, Node util.*, …) | 0 tokens |
| 2 | Learned patterns — extension point for hand-seeded fix rules (not auto-populated yet; see note below) | 0 tokens |
| 3 | Cached LLM fixes — replays a previous fix only when the failure context AND the candidate files' contents both match | 0 tokens |
| 4 | LLM fix loop — the full agent, only when tiers 1–3 miss | paid |
24 builtin codemods ship out of the box (greenbump --list-codemods for the full list) —
most rewrite code directly; a few match a known-risky breakage (ESLint 9 flat config,
Axios 1.x, Webpack 5 polyfills, …) and print a migration note instead of guessing at an
edit, so tier 1 never silently misapplies a risky change.
Verified end-to-end: Express 4→5 (app.del→app.delete) and Zod 3→4 (error.errors→
error.issues) are both fixed by tier 1 with 0 input / 0 output tokens. Successful
LLM fixes are stored in the tier-3 cache, so a repeat of the same failure on the same
code is free too. (Tier 2 exists as an extension point for hand-seeded patterns — the
auto-distillation of LLM fixes into generic rules is not implemented yet, and the tier
table above says so.)
npx greenbump --stats # last 30 days
npx greenbump --stats 7 # last 7 days
npx greenbump --stats --json # machine-readable, for your own dashboardsEvery run appends a line to a local, append-only log (~/.greenbump/runs.jsonl,
override with GREENBUMP_STATS_DIR) — no network calls, nothing leaves your machine.
--stats aggregates it into fix-tier breakdown, LLM calls avoided, tokens/cost actually
spent, and an estimated dollar figure saved by the free tiers (clearly labeled as an
estimate, not a bill).
Every individual LLM call is also recorded to ~/.greenbump/llm-calls.jsonl with its
feature (fix-loop / changelog-digest), model, input/output tokens, latency, retry
count, and success/failure — so cost is attributable per task, not just per run.
Not every task needs the strong model. The changelog digest is a simple extraction
task: route it to a cheaper model with --digest-model (e.g.
greenbump react --digest-model gpt-4o-mini) while the fix agent keeps --model.
Each call has a bounded output cap (8000 tokens for the fix agent, 2000 for the
digest), and the digest result is cached per upgrade path so it's paid at most once.
| Flag | Description |
|---|---|
--worktree |
Run the upgrade in an isolated temporary git worktree to keep the primary directory clean. |
--no-git |
Operate in place instead of on a new branch. |
--pr-body |
Print a ready-to-paste PR body. |
--report-file <path> |
Write a JSON report of the run(s) to this path. |
greenbump auto-detects the ecosystem from your project's lockfile/manifest. Run greenbump --list-ecosystems for the full list.
✅ Verified Ecosystems (20+)
JavaScript/TypeScript:
- npm, Yarn, pnpm
Python:
- pip, Poetry, uv, Pipenv
Rust:
- Cargo
Go:
- Go modules
Ruby:
- Bundler
PHP:
- Composer
Java/Kotlin:
- Gradle, Maven
.NET:
- NuGet
Elixir:
- Mix (Hex)
Dart/Flutter:
- Pub
Swift:
- Swift Package Manager
Objective-C:
- CocoaPods
C/C++:
- Conan
Elm:
- Elm packages
Note: "Verified" means the maintainer manually tested each ecosystem at least once. Parser logic is unit-tested, but CLI tools aren't exercised in CI. Please report issues if something doesn't work as expected!
graph TB
subgraph "User Input"
CLI[CLI Command<br/>npx greenbump react]
end
subgraph "Detection Layer"
DETECT[Ecosystem Detector<br/>Auto-detect: npm, pip, cargo, etc.]
OUTDATED[Dependency Scanner<br/>Find outdated packages]
end
subgraph "Isolation Layer"
GIT[Git Branch Manager<br/>greenbump/dep-version]
BASELINE[Baseline Runner<br/>Ensure tests pass before upgrade]
end
subgraph "Upgrade Layer"
INSTALL[Package Manager<br/>Install new version]
CHECK[Verification Runner<br/>Run build + tests]
end
subgraph "AI Fix Layer"
AGENT[LLM Agent<br/>Claude/OpenAI/DeepSeek]
TOOLS[Agent Tools<br/>read_file, write_file, run_check]
CHANGELOG[Changelog Fetcher<br/>npm/PyPI/crates.io]
end
subgraph "Verification Layer"
STATIC[Static Analysis<br/>TypeScript + ESLint]
CHANGE[Change Detection<br/>Test mods, large deletions]
end
subgraph "Sandbox Layer (Optional)"
DOCKER[Docker Builder<br/>Generate Dockerfile]
SERVICES[Service Manager<br/>postgres, redis, mongodb]
CONTAINER[Container Runner<br/>Isolated test execution]
end
subgraph "Performance Layer (Optional)"
PERF[Performance Tracker<br/>Build time, bundle size]
COMPARE[Regression Detector<br/>Compare baseline vs current]
end
subgraph "Output"
COMMIT[Git Commit<br/>Staged changes]
PR[PR Body Generator<br/>Summary + token usage]
end
CLI --> DETECT
DETECT --> OUTDATED
OUTDATED --> GIT
GIT --> BASELINE
BASELINE --> INSTALL
INSTALL --> CHECK
CHECK -->|Fails| AGENT
CHECK -->|Passes| STATIC
AGENT --> TOOLS
AGENT --> CHANGELOG
TOOLS --> CHECK
STATIC --> CHANGE
CHANGE --> DOCKER
DOCKER --> SERVICES
SERVICES --> CONTAINER
CONTAINER --> PERF
PERF --> COMPARE
COMPARE --> COMMIT
COMMIT --> PR
style CLI fill:#a8e6cf
style AGENT fill:#ffd3b6
style DOCKER fill:#aad3ea
style PR fill:#ffaaa5
| Layer | Components | Purpose |
|---|---|---|
| Detection | Ecosystem Detector, Dependency Scanner | Auto-detect package manager and find outdated deps |
| Isolation | Git Branch Manager, Baseline Runner | Isolate work on feature branch, verify starting state |
| Upgrade | Package Manager, Verification Runner | Install new version and run checks |
| AI Fix | LLM Agent, Tools, Changelog Fetcher | Automatically fix breaking changes with AI |
| Verification | Static Analysis, Change Detection | Multi-layer validation (types, lints, suspicious changes) |
| Sandbox | Docker Builder, Service Manager, Container Runner | Optional isolated testing with database services |
| Performance | Performance Tracker, Regression Detector | Optional performance monitoring and regression alerts |
| Output | Git Commit, PR Body Generator | Commit changes and generate PR description |
sequenceDiagram
participant User
participant CLI
participant Detector
participant Git
participant PackageMgr as Package Manager
participant Agent as AI Agent
participant Verifier
participant Docker
participant Output
User->>CLI: npx greenbump react
CLI->>Detector: Detect ecosystem
Detector-->>CLI: npm detected
CLI->>Detector: Find outdated packages
Detector-->>CLI: react 18.3.1 → 19.2.0
CLI->>Git: Create branch
Git-->>CLI: greenbump/react-19.2.0
CLI->>PackageMgr: Run baseline tests
PackageMgr-->>CLI: ✓ Baseline passed
CLI->>PackageMgr: Install react@19.2.0
PackageMgr-->>CLI: ✓ Installed
CLI->>PackageMgr: Run tests
PackageMgr-->>CLI: ✗ Tests failed
CLI->>Agent: Fix breaking changes
loop Fix Loop
Agent->>Agent: Read error output
Agent->>Agent: Fetch changelog
Agent->>Agent: Edit source files
Agent->>PackageMgr: Re-run tests
PackageMgr-->>Agent: Test result
end
Agent-->>CLI: ✓ Fixed
CLI->>Verifier: Run verification
Verifier->>Verifier: TypeScript check
Verifier->>Verifier: ESLint
Verifier->>Verifier: Change detection
Verifier-->>CLI: ✓ Verified
alt Sandbox Mode
CLI->>Docker: Build container
Docker->>Docker: Start services (postgres)
Docker->>Docker: Run tests in container
Docker-->>CLI: ✓ Container tests passed
end
CLI->>Output: Commit changes
Output->>Output: Generate PR body
Output-->>User: ✓ Done: branch ready for PR
graph TD
A[Detect outdated deps] --> B[Create git branch]
B --> C[Baseline: Run build + tests]
C --> D{Already broken?}
D -->|Yes| E[Stop - Fix manually first]
D -->|No| F[Upgrade dependency]
F --> G{Build/tests pass?}
G -->|Yes| H[Clean upgrade ✅]
G -->|No| I[AI Fix Loop]
I --> J[Read error output]
J --> K[Edit source code]
K --> L[Re-run checks]
L --> M{Fixed?}
M -->|No| N{Max rounds?}
N -->|No| I
N -->|Yes| O[Flag for review ⚠️]
M -->|Yes| P[Verification Pipeline]
P --> Q[TypeScript type check]
Q --> R[ESLint]
R --> S[Change detection]
S --> T{Sandbox enabled?}
T -->|Yes| U[Docker container tests]
T -->|No| V{Detect regressions?}
U --> V
V -->|Yes| W[Performance comparison]
V -->|No| X[Commit & create PR]
W --> X
- 🔍 Detect the ecosystem and outdated dependency (e.g.
npm outdated,poetry show -o,cargo outdated) - 🌿 Isolate on a fresh
greenbump/<dep>-<version>branch - 📊 Baseline — Run your build + tests. If already red, stop (never chase pre-existing failures)
- ⬆️ Upgrade the dependency
- 🤖 Fix Loop (if broken):
- AI agent reads failure output
- Edits source code to fix breaking changes
- Re-runs checks
- Repeats until green or max rounds hit
- ✅ Verification Pipeline (v0.3.0+):
- Run TypeScript type check (
tsc --noEmit) - Run ESLint
- Detect suspicious changes (test modifications, large deletions)
- Run TypeScript type check (
- 🐳 Sandbox Verification (v0.5.0+, optional):
- Build Docker image with clean environment
- Start database services (if needed)
- Run tests in isolated container
- 📊 Performance Check (v0.5.0+, optional):
- Compare build time, test time, bundle size
- Flag regressions (>20% slower build, >15% larger bundle)
- 💾 Commit the changes and output PR body
flowchart LR
subgraph CLI["🌱 greenbump CLI"]
A1[Ecosystem Adapters]
A2[Fix-Loop Engine]
A3[Verification Pipeline]
A4[Git / PR Layer]
end
subgraph Adapters["🌍 20+ Ecosystems"]
E1[npm / yarn / pnpm]
E2[pip / poetry / uv]
E3[cargo]
E4[maven / gradle]
E5[...more]
end
subgraph Agent["🤖 AI Provider"]
M1[Anthropic]
M2[OpenAI]
M3[DeepSeek / Groq / custom]
end
subgraph Sandbox["🐳 Optional Sandbox"]
S1[Docker Container]
S2[Postgres / MySQL / Redis / Mongo]
end
A1 --- Adapters
A2 -- "tool calls" --> Agent
A3 -- "isolated run" --> Sandbox
A4 --> GH[GitHub / GitLab PR]
CLI --> Adapters
CLI --> Agent
CLI --> Sandbox
Each layer is independently swappable: pick any ecosystem adapter, any model provider, and opt into the sandbox when you want the checks rerun in a clean container.
Automate dependency upgrades on a schedule and let greenbump open PRs for you.
Add .github/workflows/greenbump.yml:
name: greenbump
on:
schedule:
- cron: "0 6 * * 1" # Mondays at 6am
workflow_dispatch: # Manual trigger
permissions:
contents: write
pull-requests: write
jobs:
bump:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with: { node-version: 20 }
- run: npm ci
- uses: shidesheng0218/greenbump@v0
with:
anthropic-api-key: ${{ secrets.ANTHROPIC_API_KEY }}name: greenbump-full-verification
on:
schedule:
- cron: "0 6 * * 1"
workflow_dispatch:
permissions:
contents: write
pull-requests: write
jobs:
bump:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with: { node-version: 20 }
- run: npm ci
- uses: shidesheng0218/greenbump@v0
with:
anthropic-api-key: ${{ secrets.ANTHROPIC_API_KEY }}
sandbox: true
services: postgres,redis
detect-regressions: trueAdd your API key as the ANTHROPIC_API_KEY repository secret:
- Go to Settings → Secrets and variables → Actions
- Click New repository secret
- Name:
ANTHROPIC_API_KEY, Value: your key
💡 Tip: greenbump opens a draft PR (flagged for review) when it couldn't fully fix the upgrade or when verification warnings are detected.
⚠️ CI Triggers: PRs opened withGITHUB_TOKENdon't trigger other workflows (GitHub safeguard). Pass a personal access token asgithub-token:if you need CI to run on greenbump's PRs.
Full example with all inputs: examples/greenbump.yml
- Minor/patch upgrades with small breaking changes (renamed exports, updated signatures)
- Dependency chains where upgrade path is documented in changelogs
- Projects with fast, reliable test suites that catch regressions
- TypeScript projects where type errors surface most breakage
- Well-tested codebases where "tests pass" means "it works"
- Major version jumps with architectural changes (e.g., React 15 → 16, Angular 2 → 3)
- Coordinated multi-dep upgrades (e.g., all Babel plugins at once)
- Security patches where you need to audit the fix, not just pass tests
- Projects without tests — greenbump can only verify what your suite checks
- Framework migrations that break core assumptions (async/await refactors, build system changes)
- Runtime-only failures your tests don't cover
- Flaky test suites where "tests pass" is unreliable
💡 Best Practice: Use greenbump as a first pass on straightforward upgrades. Always review the PR diff before merging, especially for deps touching security, data handling, or critical paths. Use
--max-roundsto cap token spend on hard upgrades, and--scanto preview what's outdated before committing.
- Bring your own key: You control costs, nothing phones home
- No data collection: greenbump runs entirely locally or in your CI
- Code stays private: Only sent to your chosen AI provider (Anthropic, OpenAI, etc.)
- Safe git workflow: Works on branches, never auto-merges, never edits your lockfile
- Bounded execution:
--max-roundsand--max-tokensprevent runaway costs
- v0.1.0: Core fix loop + multi-ecosystem support
- v0.2.0: Batch upgrades (
--all), changelog integration - v0.3.0: Static analysis (TypeScript + ESLint) + change detection
- v0.4.0: AST verification + changelog digest
- v0.5.0: Docker sandbox + database testing + performance regression detection
- v0.6.0: Web UI for monitoring upgrades
- v0.7.0: Upgrade impact prediction (before running)
- v0.8.0: Custom verification scripts
- v0.9.0: Multi-repository orchestration
- v1.0.0: Production-ready release
Contributions welcome! Please see CONTRIBUTING.md for guidelines.
Areas we'd love help with:
- 🌍 More ecosystem adapters (esp. less common package managers)
- 🧪 Integration tests for real-world upgrade scenarios
- 📚 Documentation improvements
- 🐛 Bug reports with reproducible examples
MIT © shidesheng0218
- 🐛 Bug reports: GitHub Issues
- 💡 Feature requests: GitHub Discussions
- 📖 Documentation: docs/
- 🌟 Star us: If greenbump helps you, give us a ⭐ on GitHub!
Made with ❤️ by developers, for developers

