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

smart-git-push

v1.1.5

Published

Auto commit message + push for JS/TS projects (Express, NestJS, React, React Native)

Downloads

430

Readme

smart-git-push

Auto commit message + git push for JavaScript and TypeScript projects:

  • Express / Fastify APIs (.ts controllers & routes)
  • NestJS (.controller.ts, .service.ts, .module.ts, decorators)
  • React (Vite, Next — .tsx components & pages)
  • React Native / Expo
  • Plain Node / TypeScript scripts

Reads your diff, builds a useful commit subject + file list body, then pushes.

Install

In this monorepo (local)

{
  "devDependencies": {
    "smart-git-push": "file:./packages/smart-git-push"
  },
  "scripts": {
    "push": "smart-git-push"
  }
}
npm install
npm run push

Any other project (npm link / publish)

npm install smart-git-push --save-dev
# or from git:
npm install github:YOUR_USER/YOUR_REPO#path:packages/smart-git-push
{
  "scripts": {
    "push": "smart-git-push"
  }
}

Usage

npm run push
npm run push -- "fix login bug"
npx smart-git-push
npx smart-git-push --dry-run
npx smart-git-push --no-push
npx smart-git-push -m "release v2.1"

Alias: sgp

Config (optional)

.smart-git-push.json in project root:

{
  "branch": "main",
  "remote": "origin",
  "junkFiles": ["nul", "thumbs.db"],
  "areaRules": [
    { "match": "/module/v3/", "area": "v3 API" },
    { "match": "\\.controller\\.ts$", "area": "Nest controllers" }
  ]
}

Or in package.json:

{
  "smartGitPush": {
    "branch": "develop"
  }
}

TypeScript support

Works out of the box — no build step required. The CLI only reads git diff, not compiled output.

| Detects | Examples | |---------|----------| | Routes | router.get("/api"), app.post(), @Get(), @Post('users') | | Exports | export async function, export const, export class | | Types | export type, export interface, export enum | | Paths | *.controller.ts, *.routes.ts, *.service.ts, *.dto.ts, tsconfig.json | | Ignores | tsconfig.tsbuildinfo (junk file) |

TypeScript project setup

{
  "scripts": { "push": "smart-git-push" },
  "smartGitPush": {
    "branch": "main",
    "areaRules": [
      { "match": "module/v3/", "area": "v3 API" },
      { "match": "\\.controller\\.ts$", "area": "controllers" }
    ]
  }
}

Per stack

| Stack | What it detects | |-------|-----------------| | Express + TS | *.routes.ts, *.controllers.ts, Request, Response | | NestJS | @Get(), @Post(), new *.controller.ts files | | React + TS | components/, pages/, .tsx, vite.config.ts | | React Native | screens/, expo, .native.tsx | | TypeScript | tsconfig.json, types, interfaces, enums |

Programmatic API

const { smartGitPush, generateCommitMessage } = require("smart-git-push");

smartGitPush({ message: "optional manual subject" });

smartGitPush({ dryRun: true });

Publish to npm

From the smart-git-push repo root:

npm login
npm publish --access public

Then in any project:

npm i -D smart-git-push

Install from npm (after publish)

npm i -D smart-git-push
{
  "scripts": { "push": "smart-git-push" }
}