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

zapdev

v0.11.0

Published

Fast, performant and lightweight git chores and dev tools using your terminal and your own local LLM.

Readme

zapdev

Project Introduction

zapdev is a lightweight TypeScript CLI that makes small, repetitive Git chores fast and precise.

It stages changes, scans them for secrets, generates Conventional Commit messages with Ollama, and streamlines repository cleanup.

Project Architecture

flowchart LR
  Entry["src/index.ts"] --> CLI["src/cli.ts"]
  CLI --> Commands["src/commands"]
  Commands --> Lib["src/lib"]
  Commands --> Types["src/types"]
  Lib --> Prompts["src/prompts"]
  Lib --> Types
  Lib --> Tools["Git, Gitleaks, Ollama"]
  • src/index.ts: bin launcher; enables the V8 compile cache, then loads cli.js.
  • src/cli.ts: CLI entry; registers subcommands and opens the interactive menu.
  • src/commands/: command UI and orchestration.
  • src/lib/: pure logic and isolated Git, Gitleaks, and Ollama side effects.
  • src/prompts/: LLM prompts inlined into the bundle at build time.
  • src/types/: shared type declarations.

Environment Variables

| Variable | Default | Required | Description | | --- | --- | --- | --- | | OLLAMA_URL | http://localhost:11434 | No | Ollama base URL | | OLLAMA_MODEL | deepseek-v4-flash:cloud | No | Model used to generate commit messages | | OLLAMA_BACKUP_MODEL | - | No | Model used when generation with the primary model fails | | OLLAMA_EFFORT | low | No | Ollama thinking effort (low, medium, high, or max) |

Setup

Requirements

  • Node.js >= 20 (required): runs the CLI.
  • Git (required): provides the repository operations.
  • Ollama (required for commit): generates Conventional Commit messages.
  • Gitleaks (recommended): scans staged changes before message generation when available on PATH.

Install

Install zapdev globally for daily use:

npm install -g zapdev

Or run it once without installing:

npx zapdev commit

Development Setup

From a clone:

npm install
npm run zapdev      # build then run the CLI in dev
npm run typecheck   # tsc --noEmit
npm run lint        # eslint
npm run test        # vitest
npm run build       # bundle to dist/ with esbuild

npm link exposes the local zapdev binary after npm run build.

Usage

Run zapdev with no command to pick one from an interactive menu. Without a TTY, zapdev displays its usage instead.

zapdev commit

Stages all changes, scans them with Gitleaks when installed, generates a Conventional Commit message, and optionally pushes the commit.

zapdev commit

| Flag | Description | | --- | --- | | --model <model> | Override the Ollama model | | -t, --type <type> | Force the Conventional Commit type (feat, fix, chore, etc.) | | -p, --push | Push after committing without asking | | -s, --staged | Commit only changes that are already staged | | -r, --rebase | Rebase on upstream if the push is rejected | | -m, --merge | Merge upstream if the push is rejected | | -y, --yes | Skip prompts and commit directly |

zapdev commit -t feat      # force the type
zapdev commit --staged     # leave unstaged changes untouched

Before contacting Ollama, zapdev runs gitleaks git --staged when Gitleaks is installed. A failed scan stops the commit; when Gitleaks is absent, the scan is skipped.

Pushing is optimistic, with no preliminary fetch. If the branch is behind upstream, --rebase runs git pull --rebase, while --merge runs git pull --no-rebase --no-edit; zapdev then retries once. Without either flag, interactive runs ask whether to rebase, merge, or quit. Runs using --yes or without a TTY must provide one of the flags.

Without a TTY, zapdev commits automatically and only pushes when --push is set.

zapdev reset

Operates on a Git repository or the direct child repositories of a directory. It fetches and prunes, switches branch, then permanently removes other local branches and linked worktrees.

zapdev reset                 # reset the current repo or direct child repos
zapdev reset ~/dev           # reset repos under a directory
zapdev reset -p              # switch to the principal branch without prompting
zapdev reset -t dev          # switch to dev or fall back to the principal branch

| Flag | Description | | --- | --- | | -p, --principal | Switch every repo to its resolved principal branch (origin/HEAD) | | -t, --target <branch> | Switch to a target branch, falling back to the principal branch | | --pull | Pull the checked-out branch after reset without asking | | -y, --yes | Switch and delete without confirmation |

Deletion is permanent. Branches are removed with git branch -D; worktrees are removed with git worktree remove --force. Without a TTY, pass --yes or the destructive step is refused. node_modules is never scanned.

Shell Aliases

alias commit="zapdev commit --yes"
alias git-reset="zapdev reset --yes --principal --pull"

Other

zapdev is available under the MIT license.