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

culls

v0.1.2

Published

Optimize package.json for NPM

Downloads

1,430

Readme

culls

CLI to optimize package.json for NPM

culls is a minimal CLI that removes unnecessary fields from package.json intended to be run before publishing to NPM. The changes to package.json should not be checked into source control. The goal of culls is to create the absolute smallest possible package.json file for publishing to NPM.

For example, culls will remove devDependencies from package.json, which, while automatically excluded during package installation, still adds unnecessary bulk to your published package. Other development-specific fields that can be removed include linting or testing configs, like for Prettier, Jest, or ESLint.

Usage

The CLI must be run with a valid package.json file in the current working directory.

# NPM
npx culls

# Bun
bunx culls

Preserved fields

By default, culls preserves fields that are typically required for publishing NPM packages.

  • author
  • bin
  • browser
  • bugs
  • contributors
  • dependencies
  • description
  • engines
  • exports
  • files
  • funding
  • homepage
  • keywords
  • license
  • main
  • maintainers
  • module
  • name
  • optionalDependencies
  • peerDependencies
  • private
  • publishConfig
  • repository
  • scripts
  • sideEffects
  • type
  • types
  • typesVersions
  • version
  • workspaces

To specify fields to preserve, use the --preserve flag.

# NPM
npx culls --preserve=svelte

# Bun
bunx culls --preserve=svelte

Multiple fields should be comma-separated.

# NPM
npx culls --preserve=svelte,prettier

# Bun
bunx culls --preserve=svelte,prettier

Sample GitHub Actions workflow

This sample workflow demonstrates using culls when automating package publishing.

# .github/workflows/publish.yml
on:
  push:
    # Trigger on tag push.
    # E.g., `git tag v1.0.0; git push origin v1.0.0`
    tags:
      - "v*"

jobs:
  build:
    runs-on: ubuntu-latest
    permissions:
      contents: read
      id-token: write
    steps:
      - uses: actions/checkout@v4
      - uses: actions/setup-node@v4
        with:
          node-version: "20.x"
          registry-url: "https://registry.npmjs.org"

      - name: Install dependencies
        run: npm install

      # Run any necessary build steps.
      # In this case, `scripts` are still needed.
      - name: Build package
        run: npm run build

      # Run `culls` to remove unnecessary fields.
      - name: Prune package.json
        run: npx culls

      - name: Publish package
        env:
          NODE_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }}
        run: npm publish --provenance --access public

Changelog

CHANGELOG.md

License

MIT