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

agg-changes

v1.0.0

Published

Utility to aggregate versioned CHANGES-*.md files.

Readme

Aggregate Changes Tool | agg-chages

Description

A utility script for aggregating individual CHANGES-<ver>.md files into a single, chronologically sorted ALL_CHANGES--<startVer>-to--<endVer>.md file. It supports merging updates into existing aggregate files or building fresh from source files.

Use Case: Maintaining Context for AI Assistants

If you're using an AI assistant (LLM) for development, you know they can lose track of project history between sessions. A helpful pattern is to have the AI log its changes to individual files like CHANGES-1.5.90.md.

agg-changes makes this workflow viable by combining all those small files into one big ALL_CHANGES--*.md file. You can then easily feed this complete history back to the AI at the start of a new session, giving it the context it needs to understand the project's evolution and continue effectively.

Installation

This utility is part of the mcp-terminal-server project. After cloning the main project repository and running npm install, the agg-changes command should be available in your environment (you might need to use npx agg-changes or ensure node_modules/.bin is in your PATH).

Alternatively, you can run it directly using node ./path/to/agg-changes.js [options].

Usage

agg-changes [options]
# or
npx agg-changes [options]
# or
node ./agg-changes.js [options]

Modes of Operation

  1. Merge/Update Mode (Default):

    • Finds the latest existing ALL_CHANGES--*.md file in the target directory (-d).
    • Parses its content.
    • Scans the target directory for individual CHANGES-*.md files.
    • Adds new versions from individual files and updates existing versions found in the base file.
    • Crucially, entries from the base aggregate file for which no corresponding individual CHANGES-*.md file is found are preserved.
    • Filters the result based on --sv / --ev if provided.
    • Writes the final sorted content to a new ALL_CHANGES--<min>-to--<max>.md file, named according to the actual minimum and maximum versions included in the output. This overwrites any existing file with the exact same output filename.
  2. Build-from-Files Mode (-b / --build-from-files):

    • Ignores all existing ALL_CHANGES--*.md files.
    • Builds the content only from the individual CHANGES-*.md files found in the target directory.
    • Filters the result based on --sv / --ev if provided.
    • Writes the final sorted content to ALL_CHANGES--<min>-to--<max>.md.
    • If a file with the exact target name already exists, it appends -copy-# (e.g., ALL_CHANGES--1.0.0-to--1.5.0-copy-1.md) to avoid overwriting.

Options

  • -h, --help: Show the help message.
  • --version: Show the version number of the parent package (mcp-terminal-server), not the version range of the aggregated files.
  • -d <path>, --directory <path>: Specify the directory where individual CHANGES-*.md files are located AND where the output ALL_CHANGES--*.md file will be written. (Default: ./CHANGES)
  • --sv <version>, --start-version <version>: Filter the output to include only versions greater than or equal to <version>.
  • --ev <version>, --end-version <version>: Filter the output to include only versions less than or equal to <version>.
  • -b, --build-from-files: Activate "Build-from-Files" mode (see above).
  • --dr, --dry-run: Perform all steps except writing the output file. Shows a summary of what would be done.

File Naming Conventions

  • Input (Individual): Files must be named CHANGES-<ver>.md (e.g., CHANGES-1.5.90.md, CHANGES-2.0.0-beta.1.md) and placed in the directory specified by -d. The <ver> part should be compatible with standard semantic versioning for correct sorting.
  • Output (Aggregated): The script generates filenames like ALL_CHANGES--<startVer>-to--<endVer>.md, where <startVer> and <endVer> are the actual lowest and highest version numbers included in that specific output file after any filtering. This file is written to the directory specified by -d.

Examples

# Update latest aggregate in ./CHANGES/ with any new individual files
agg-changes

# Update latest aggregate in a specific directory
agg-changes -d /path/to/my/changes

# Build a new aggregate from scratch using only files in ./CHANGES/
agg-changes -b

# Build a new aggregate for a specific version range (e.g., v1.x)
agg-changes -b --sv 1.0.0 --ev 1.999.999

# Update the latest aggregate, but only include v2.0.0 onwards
agg-changes --sv 2.0.0

# See what would happen without writing the file
agg-changes --dr

Testing

A test suite is available. Run it from the project root directory:

node test-agg-changes.js

License

Refer to the main LICENSE.md file for the project.