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

@tayaee/sortini

v1.0.6

Published

A zero-dependency CLI utility to sort INI file sections and keys before diffing

Readme

@tayaee/sortini

@tayaee/sortini is a zero-dependency CLI utility that sorts INI file sections and keys to minimize diff noise. Built for maximum compatibility across Node.js versions (v12+).


Quickstart

Run directly via npx (defaults to in-place edit, no backup, and auto-encoding):

# In-place sort (latest version)
npx @tayaee/sortini config.ini

# Preview changes as unified diff without modifying files
npx @tayaee/sortini -d config.ini

# Sort in-place and create a backup (config-YYYYmmdd-HHMMSS.ini)
npx @tayaee/sortini -b config.ini

# Print sorted output to stdout without modifying files
npx @tayaee/sortini --no-in-place config.ini

Direct GitHub Execution & Specific Version Tags

# Latest main branch
npx github:tayaee/sortini config.ini

Sorting & Formatting Rules

  1. key=value Formatting: Strips spaces around = into a clean key=value format.
  2. Global Parameters: Key-value pairs before any [section] stay at the top, sorted alphabetically.
  3. Alphabetical Sorting: Section headers ([section]) and keys within each section are sorted alphabetically (A-Z).
  4. Inline Comment Column Alignment: Inline comments (; or #) are aligned to column stops 40 ➔ 60 ➔ 80 ➔ min 2 spaces (respects quotes).
  5. Standalone Comment Preservation: Comments attached above items/sections are preserved with internal blank lines stripped.
  6. Section Spacing: Exactly 1 blank line is placed between sections for clean readability.

CLI Options

| Option | Short | Description | | --- | --- | --- | | --in-place | -i | Sort input files in place (default) | | --no-in-place | - | Print sorted output to stdout without modifying files | | --diff | -d | Print unified diff without modifying files (exits 1 if diff exists, 0 if sorted) | | --backup | -b | Create a backup (file-YYYYmmdd-HHMMSS.ini) before editing in-place | | --no-backup | - | Do not create a backup file (default) | | --encoding <enc> | -e | File encoding: auto (default, preserves BOM), utf-8, latin1, utf16le | | --newline-format <fmt> | -n | Newline format: windows (default, CRLF \r\n), linux (LF \n), macos (CR \r) | | --help | -h | Display help message | | --version | -v | Display version number |


Exit Status

| Mode | Exit Code | Condition | | --- | --- | --- | | Normal Mode (--in-place, --no-in-place) | 0 | Success or file already sorted | | | 1 | File error, permission denied, invalid args, or internal failure | | Diff Mode (-d, --diff) | 0 | File is already sorted (no diff) | | | 1 | File needs sorting (diff printed) or error occurred |


License

MIT License