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

publishit-cli

v1.0.0

Published

A CLI tool to automate versioning, changelog, GitHub release, and npm publish workflows.

Readme

publishit

A CLI tool to automate GitHub releases, npm publishing workflows, changelog generation, and versioning — all from a single command.


Table of Contents


Installation

Global (recommended)

npm i -g publishit-cli

Local

npm i publishit-cli

Then use it via:

npx publishit <command>

Quick Start

# 1. Generate GitHub release workflow
publishit generate github

# 2. Generate npm publish workflow
publishit generate npm

# 3. Preview what will happen before pushing
publishit push --preview

# 4. Stage, commit, tag, generate changelog, and push
publishit push

Commands

publishit push

The main command. It does the following in order:

  1. Checks .git — verifies you are inside a Git repository.
  2. Checks package.json — verifies the file exists and has name and version fields.
  3. Checks staging area — shows staged and unstaged files.
    • If there are unstaged files, you will be prompted to select which ones to add to staging.
  4. Commit message — opens your system editor to write a commit message (supports multiline).
  5. Checks tags — detects the latest tag and calculates the next version based on your commit messages.
    • If no tags exist, it will suggest creating the first tag from package.json version.
  6. Generates CHANGELOG — writes or updates CHANGELOG.md from commit history.
  7. Updates versions — bumps version in package.json and package-lock.json.
  8. Creates release commit — commits CHANGELOG.md, package.json, and package-lock.json with message chore: release vX.X.X.
  9. Creates tag — tags the release commit (so CHANGELOG is included in the tag).
  10. Pushes — pushes the current branch and all tags to origin.
publishit push

publishit push --preview

Runs a dry-run of publishit push. Nothing is committed, tagged, or pushed. It shows:

  • Staged and unstaged files
  • The next tag and version bump type (MAJOR / MINOR / PATCH)
  • The new version number
  • A preview of the CHANGELOG entry
  • The branch and remote that will be pushed to
publishit push --preview

publishit generate github

Generates .github/workflows/release.yaml in the current directory.

This workflow:

  • Triggers on git push with a tag matching v*
  • Extracts the changelog entry for the tag version from CHANGELOG.md
  • Checks if a release for the tag already exists (skips if it does)
  • Creates a GitHub Release with the changelog as the release description

If the file already exists, you will be prompted to:

  • Overwrite — replace the existing file
  • Rename — create a new file with a custom name
  • Skip — do nothing
publishit generate github

Prerequisite: Go to your repository Settings > Actions > General > Workflow permissions and set it to Read and write permissions.


publishit generate npm

Generates .github/workflows/publish.yaml in the current directory.

This workflow:

  • Triggers on git push with a tag matching v*
  • Checks if NPM_TOKEN secret is set (skips with instructions if not)
  • Checks if the version is already published on npm (skips if it is)
  • Publishes the package to npm with --access public

If the file already exists, you will be prompted to overwrite, rename, or skip.

publishit generate npm

Prerequisite: Add your npm Access Token as a repository secret named NPM_TOKEN.

  1. Go to your repository Settings
  2. Under Security and quality, select Secrets and variables > Actions
  3. Select the Secrets tab
  4. Under Repository secrets, click New repository secret
  5. Set Name to NPM_TOKEN
  6. Set Secret to your npm Access Token (type: Automation)

Commit Message Rules

publishit follows the Conventional Commits specification to automatically determine the next version bump.

Format

<type>[optional scope][optional !]: <description>

[optional body]

[optional footer(s)]

Version Bump Rules

| Bump | Trigger | | --------- | ------------------------------------------------------------------------------------------------------ | | MAJOR | Any commit with ! after the type/scope: feat!:, fix(auth)!: | | MAJOR | Any commit with BREAKING CHANGE: in the footer | | MINOR | Commits with type feat | | PATCH | Everything else (fix, chore, docs, refactor, perf, test, style, build, ci, revert) |

Examples

PATCH bump — any type that is not feat and has no breaking change:

fix(auth): resolve token expiry issue

Updated the token refresh logic to handle edge cases.
docs: update installation steps
refactor(parser): simplify commit log parsing

MINOR bump — type must be feat:

feat(cli): add --preview flag to push command
feat: support pnpm lockfile version update

MAJOR bump — using ! after type or scope:

feat(api)!: redesign authentication workflow
fix!: remove support for Node.js 14

MAJOR bump — using BREAKING CHANGE: in footer:

feat(auth): migrate to OAuth2

Replaced the legacy session-based auth system with OAuth2.

BREAKING CHANGE: existing session tokens are no longer valid.
All clients must re-authenticate using the new OAuth2 endpoints.

Multiline body with footer:

docs: rewrite contributing guide

- add commit message format section
- add branching strategy

REVIEWED BY: team-lead

Note: The chore: release vX.X.X commit created automatically by publishit is excluded from CHANGELOG generation and version bump detection.


Changelog Format

publishit generates and maintains a CHANGELOG.md file in your project root following the Keep a Changelog format.

Each version entry groups commits by their type and separates them with ---:

## [1.2.0] - 2026-05-07

add new login flow ([abc1234](https://github.com/owner/repo/commit/abc1234...))

### Added

- implement email/password login
- add token refresh on expiry

REVIEWED BY: team

---

fix null pointer on logout ([def5678](https://github.com/owner/repo/commit/def5678...))

### Fixed

HOTFIX: critical null reference in session cleanup

---

CHANGELOG sections

| Commit type | Section | | ---------------------- | ---------------- | | feat | Added | | fix | Fixed | | refactor | Changed | | revert | Reverted | | perf | Performance | | docs | Documentation | | style | Styling | | test | Testing | | chore, build, ci | Maintenance | | Breaking changes | Breaking Changes |


GitHub Workflows

release.yaml

Triggered on push of any tag matching v*. Creates a GitHub Release using the CHANGELOG entry for that version as the release description.

.github/workflows/release.yaml

Generated by: publishit generate github

publish.yaml

Triggered on push of any tag matching v*. Publishes the package to the npm registry if NPM_TOKEN is set and the version has not been published before.

.github/workflows/publish.yaml

Generated by: publishit generate npm


Dependencies

| Package | Version | Purpose | | --------------------------------------------------------------- | ------- | -------------------------------------------------------------------------------------------------------------------------------- | | @inquirer/prompts | 8.4.2 | Interactive CLI prompts — checkbox for file selection, confirm dialogs, select menus, text input, and editor for commit messages | | ora | 9.4.0 | Terminal spinner / loading indicators shown during git operations, changelog generation, and push |


Project Requirements

  • Node.js >= 18
  • Git installed and configured
  • A Git repository with a remote named origin
  • A package.json with name and version fields

Uninstall / Removing

Uninstall

npm rm -g publishit-cli

Clear npm cache (optional)

npm cache clean --force