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 🙏

© 2026 – Pkg Stats / Ryan Hefner

lazy-changelog

v1.1.0

Published

You write bad commits. We get it. lazy-changelog reads your code anyway and writes a proper changelog for you.

Readme

lazy-changelog

You write bad commits. We get it.

fix stuff
update things
wip
asdfasdf
. <-- My go-to short lazy commit message, sorry world.

Sound familiar? lazy-changelog reads your actual code changes and writes proper commit messages and changelogs anyway.

# Generate a commit message from staged changes
npx lazy-changelog commit

# Generate a changelog from recent commits
npx lazy-changelog generate --diffs

No judgment.


How it works

For commit messages (lazy-changelog commit):

  1. Reads your staged changes (git diff --cached)
  2. Sends them to AI
  3. Returns a proper conventional commit message

For changelogs (lazy-changelog generate):

  1. Finds your last git tag (like v1.0.0)
  2. Grabs all the commits since then
  3. Optionally reads the actual code diffs too
  4. Sends it to Claude/GPT/Gemini/Ollama
  5. Returns something your PM can actually read

Works as a standalone CLI, an Nx Release renderer, or a programmatic API.

Install

npm install lazy-changelog

You'll also need whichever AI SDK you want to use:

npm install @ai-sdk/anthropic   # Claude (recommended)
npm install @ai-sdk/openai      # GPT
npm install @ai-sdk/google      # Gemini
npm install ollama-ai-provider  # Local Ollama

Quick Start

Pick your setup:

Option 1: Standalone CLI

# Install
npm install lazy-changelog @ai-sdk/anthropic

# Set your API key
export ANTHROPIC_API_KEY=sk-ant-...

# Generate changelog
npx lazy-changelog generate --diffs --prepend CHANGELOG.md

Add to package.json for releases:

{
  "scripts": {
    "changelog": "lazy-changelog generate --diffs --prepend CHANGELOG.md",
    "release": "npm run changelog && npm version patch"
  }
}

Option 2: Nx Release

# Install
npm install lazy-changelog @ai-sdk/anthropic

Add to nx.json:

{
  "release": {
    "changelog": {
      "workspaceChangelog": {
        "renderer": "lazy-changelog",
        "renderOptions": {
          "aiProvider": "anthropic",
          "includeDiffs": true
        }
      }
    }
  }
}

Then just run:

nx release

Option 3: GitHub Actions

Create .github/workflows/changelog.yml:

name: Changelog
on:
  push:
    tags: ['v*']

jobs:
  changelog:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
        with:
          fetch-depth: 0
      - uses: actions/setup-node@v4
      - run: npm install -g lazy-changelog @ai-sdk/anthropic
      - run: lazy-changelog generate --diffs --tag "${GITHUB_REF#refs/tags/}" --prepend CHANGELOG.md
        env:
          ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }}
      - run: |
          git config user.name github-actions
          git config user.email [email protected]
          git add CHANGELOG.md
          git commit -m "docs: changelog" && git push || true

Option 4: Programmatic API

import { generateChangelog } from 'lazy-changelog';

const changelog = await generateChangelog({
  aiProvider: 'anthropic',
  includeDiffs: true,
});

console.log(changelog);

Token usage warning

Heads up: The --diffs flag sends your actual code changes to the AI, which can eat through tokens fast on big releases.

The defaults are pretty conservative (50k chars total, 5k per file), but if you're working on a large monorepo or had a lot of changes since the last release, you might want to dial it down:

# Smaller limits
lazy-changelog generate --diffs --max-diff-chars 20000 --max-file-chars 2000

Or in nx.json:

{
  "renderOptions": {
    "includeDiffs": {
      "enabled": true,
      "maxChars": 20000,
      "maxCharsPerFile": 2000
    }
  }
}

Use --diffs-auto if you only want diffs when your commit messages are particularly useless (it checks if they're sparse/uninformative).

For Ollama users: local models = no token costs, go wild.

What gets included

The tool figures out what to analyze based on your git tags:

  • Has a previous tag? Everything from that tag to HEAD
  • No tags yet? Last 50 commits (diffs limited to last 10 commits worth)
  • Specify --from? Uses that as the starting point

It automatically skips release commits, merge commits, lock files, images, and build output.

Environment variables

Set your API key:

export ANTHROPIC_API_KEY=sk-ant-...
export OPENAI_API_KEY=sk-...
export GOOGLE_API_KEY=...

Skip AI entirely (Nx only): NX_CHANGELOG_SKIP_AI=true

Example

Your commits:

fix stuff
update things
wip

Your changelog:

## 1.2.0 (2025-01-17)

### Features
- [code] Added user authentication with OAuth2 support
- [code] Implemented rate limiting for API endpoints

### Bug Fixes
- [code] Fixed memory leak in WebSocket connection handling

### Improvements
- [code] Optimized database queries for better performance

You're welcome.

Commit Messages

Generate AI-powered commit messages from your staged changes:

# Stage your changes
git add .

# Generate a commit message
lazy-changelog commit

# Generate and commit in one step
lazy-changelog commit -e

Example output:

feat(core): add AI-powered commit message generation

- Add AICommitMessageGenerator class with staged diff analysis
- Add COMMIT_MESSAGE_PROMPT for conventional commit formatting
- Add 'commit' CLI command with -e flag for direct execution

Commit command flags

| Flag | What it does | |------|-------------| | -p, --provider | AI provider (anthropic, openai, google, ollama) | | -m, --model | Override the default model | | -a, --all | Include unstaged changes too | | -e, --execute | Actually run git commit with the message | | --prefix | Prefix to prepend (e.g., ticket number) | | --base-url | Base URL for AI provider |

Adding ticket numbers

Use --prefix to add ticket numbers or other prefixes to your commit messages:

# Add a Jira ticket number
lazy-changelog commit --prefix "JIRA-123: " -e

# Output: JIRA-123: feat(auth): add login endpoint

Git alias (optional)

Add to your ~/.gitconfig:

[alias]
  lazy = !npx lazy-changelog commit -e

Then just run git lazy to stage + generate + commit.

All the options

Generate command flags

| Flag | What it does | |------|-------------| | -p, --provider | anthropic, openai, google, or ollama | | -m, --model | Override the default model | | -f, --from | Start ref (tag, commit, branch) | | -t, --to | End ref (default: HEAD) | | --tag | Version for the changelog header (e.g., v1.0.0) | | -d, --diffs | Include code diffs | | --diffs-auto | Only include diffs when commits look sparse | | --max-diff-chars | Total diff size limit (default: 50000) | | --max-file-chars | Per-file limit (default: 5000) | | -o, --output | Write to file | | --prepend | Prepend to existing changelog (creates if missing) | | --summary-only | Just the summary, no version header |

Nx renderOptions:

| Option | Default | Notes | |--------|---------|-------| | aiProvider | anthropic | | | aiModel | varies | Claude Sonnet, GPT-4o, Gemini Flash, or Llama 3.2 | | enableAISummary | true | Set false to use default Nx renderer | | includeDiffs | false | true, false, or an object with limits | | customPrompt | built-in | Your own prompt if you want | | aiBaseUrl | default | For proxies or custom endpoints |

Requirements

  • Node 18+
  • Nx 19+ (only if using the Nx renderer)

License

MIT