Docs logo

Docs

Free

Automate package version upgrades with AST-powered intelligence

FreeFree tier
Inputs: codeOutputs: code
Type
Open Source

About Docs

Bumpgen is an open-source CLI tool that automates upgrading package versions in codebases. It leverages ts-morph to parse code into an AST (Abstract Syntax Tree) for understanding code relationships and type definitions, then creates a directed acyclic graph (DAG) plan to execute changes in the correct order. Currently requires an OpenAI API key with gpt-4-turbo-preview for transformation logic.

Key Features

Uses ts-morph to convert codebase into an AST for code relationship analysis
Retrieves external type definitions to understand API changes in new package versions
Creates a plan graph (DAG) to execute upgrades in the correct order based on dependencies
Supports upgrading any npm package to a specified version
Requires only an OpenAI API key (gpt-4-turbo-preview) – no other dependencies

Pros & Cons

Pros
  • Saves significant time by automating tedious version upgrade tasks
  • Handles complex dependency graphs and execution ordering automatically
  • Open-source and free to use with your own OpenAI API key
  • Uses formal program analysis (AST) for reliable code transformations
Cons
  • Currently only supports gpt-4-turbo-preview from OpenAI as the LLM backend
  • Requires an OpenAI API key and internet connection, incurring usage costs
  • Limited to JavaScript/TypeScript packages via ts-morph; no other languages yet
  • May produce errors or incomplete upgrades on highly complex codebases
  • Actively developed – documentation and error handling are still maturing

Best For

Upgrading JavaScript/TypeScript dependencies to newer versions across large codebasesAutomating dependency version bumps in CI/CD pipelinesReducing manual effort and risk when updating breaking changes in package APIsEnsuring correct upgrade order for interdependent packages

FAQ

What is bumpgen?
Bumpgen is an open-source CLI tool that automates the process of upgrading package versions in a codebase. It uses AST analysis (via ts-morph) and an LLM (gpt-4-turbo-preview) to understand code relationships and execute changes in the correct order.
How does bumpgen work?
Bumpgen first converts your codebase into an AST to map code relationships. It then retrieves type definitions for external methods to understand how to use the new package version. Finally, it creates a plan graph (DAG) to execute upgrades in the correct dependency order.
What do I need to use bumpgen?
An OpenAI API key with access to gpt-4-turbo-preview, and a JavaScript/TypeScript repository. The tool is installed via npm globally and run from the command line.
Is bumpgen free?
Yes, bumpgen is open-source and free to use. However, you need to provide your own OpenAI API key, which may incur costs based on usage.
Which package manager does bumpgen support?
Bumpgen works with npm packages. It is designed to bump any npm package to a specified version, as demonstrated with @tanstack/react-query.