npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2025 – Pkg Stats / Ryan Hefner

aibump

v3.8.0

Published

AI-powered CLI tool that analyzes git changes and automatically bumps npm and Helm versions

Readme

aibump

An AI-powered command line tool that analyzes your git unstaged changes and automatically determines whether to bump the npm version as major, minor, or patch using OpenAI's API. It intelligently handles both Node.js applications and Helm charts:

  • Helm-only changes: Bumps the version in helm/Chart.yaml without touching package.json
  • Helm script changes: Only bumps Helm chart version when only scripts (.sh, .py, .js, etc.) in helm/scripts/ or helm/hooks/ change
  • App changes: Bumps package.json version and syncs appVersion in helm/Chart.yaml to match
  • Mixed changes: Bumps both versions appropriately

Installation

npm install aibump -g

Usage

Navigate to any npm project with git and run:

aibump

Examples

# Use AI to determine version bump
aibump

# Override to force a major version bump
aibump --override major

# Override to force a minor version bump
aibump --override minor

# Override to force a patch version bump
aibump --override patch

# Combine with other options
aibump --override minor --dry-run

Options

  • -k, --api-key <key>: OpenAI API key (can also be set via OPENAI_API_KEY environment variable)
  • -m, --model <model>: OpenAI model to use (default: gpt-4)
  • --dry-run: Show what would be done without making changes
  • --no-commit: Skip generating commit message and committing changes (commit is enabled by default)
  • --staged: Analyze only staged changes
  • --unstaged: Analyze only unstaged changes
  • --both: Analyze both staged and unstaged changes (default behavior)
  • --last-commits <number>: Analyze the last N commits instead of working directory changes
  • --override <type>: Override version bump type (major|minor|patch) instead of using AI analysis

Prerequisites

  • Must be run in a git repository
  • Must have a package.json file in the current directory
  • OpenAI API key must be provided

How it works

  1. Validates that you're in a git repository with a package.json
  2. Gets the unstaged changes using git diff
  3. Analyzes changes to determine if they're in the helm/ directory, Node.js app, or both
  4. Sends the changes to OpenAI with a prompt asking for semantic version bump type
  5. Based on the change type and response:
    • Helm-only changes: Bumps version in helm/Chart.yaml
    • Helm script changes: Only bumps Helm chart version (no package.json bump)
    • App changes: Bumps package.json version and syncs appVersion in helm/Chart.yaml
    • Mixed changes: Bumps both versions appropriately
  6. Generates a structured commit message using OpenAI and commits all changes (unless --no-commit is used)

Commit Message Format

The tool generates structured commit messages with:

  • A conventional commit header: type(scope): brief summary
  • A bullet list highlighting the most important changes
  • Focus on what changed and its impact

Example

cd my-npm-project
# Make some changes...
aibump

Output:

Found unstaged changes:
diff --git a/src/index.js b/src/index.js
+ console.log('New feature added');

Change type detected: app-only
Recommended version bump: minor
Running: npm version minor
Updated Helm chart appVersion to 1.1.0
Version bump completed successfully.
Committed changes with message: feat: add new feature logging

- Add console logging for new feature
- Update version to 1.1.0
- Sync Helm chart appVersion

Analyzing Historical Commits

You can analyze the last N commits instead of working directory changes using the --last-commits option:

aibump --last-commits 5

This is useful for:

  • Retrospective versioning: Bump version based on already-committed work
  • Release preparation: Analyze what changed since last release
  • CI/CD pipelines: Automatically determine version bump based on merged commits

When using --last-commits:

  • The tool analyzes changes introduced by the last N commits (using git diff HEAD~N HEAD)
  • It determines the appropriate version bump based on those changes
  • It commits the version bump with a message like: chore: bump version to minor based on last 5 commit(s)
  • You cannot combine it with --staged, --unstaged, or --both options

Example

# Analyze last 3 commits and bump version
aibump --last-commits 3

# Dry run to see what would happen
aibump --last-commits 10 --dry-run

Output:

Analyzing changes from the last 3 commit(s)...
Found relevant changes in the last 3 commit(s) (large files excluded)
Change type detected: app-only
Recommended version bump: minor
Bumping npm version from 1.0.0 to 1.1.0
Updated package.json version to 1.1.0
Updated package-lock.json version to 1.1.0
Updated Helm chart appVersion to 1.1.0
Version bump completed successfully.

Committing version bump changes...
Successfully committed version bump with message:
"chore: bump version to minor based on last 3 commit(s)"

Helm Chart Support

The tool automatically detects changes in your helm/ directory and handles versioning appropriately:

  • Helm-only changes: Only bumps the version field in helm/Chart.yaml
  • Helm script changes: Only bumps Helm chart version when only scripts (.sh, .py, .js, .ts, .rb, .pl, .ps1, .bat, .cmd) in helm/scripts/ or helm/hooks/ directories change
  • App changes: Bumps package.json and sets appVersion in helm/Chart.yaml to match
  • Mixed changes: Bumps both versions

Make sure your helm/Chart.yaml exists and has a version field for Helm versioning to work.

License

MIT