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

commit-discipline-mcp

v0.1.0

Published

Plan and enforce small, test-gated Git commits through MCP or a CLI.

Readme

commit-discipline-mcp

commit-discipline-mcp helps coding agents and developers turn a task into 2-4 ordered, test-gated Git commits. It exposes the same workflow as an MCP stdio server and as a command-line tool on Windows, macOS, and Linux.

Requirements

  • Node.js 18 or newer
  • Git available on PATH
  • A Git repository with a clean worktree when a plan is created

The package makes no runtime network calls, does not include telemetry, and never runs git push or history-rewriting commands.

Install and initialize

Run directly with npm:

npx -y commit-discipline-mcp init --client all --yes

init creates project-scoped MCP configuration and a commit-discipline skill for Codex, Claude Code, and Cursor. Use --dry-run to preview, repeat --client to select clients, and use --force only to replace an existing conflicting entry. Existing configuration files are merged and backed up before updates.

Generated project paths are:

  • Codex: .codex/config.toml and .codex/skills/commit-discipline/SKILL.md
  • Claude Code: .mcp.json and .claude/skills/commit-discipline/SKILL.md
  • Cursor: .cursor/mcp.json and .cursor/skills/commit-discipline/SKILL.md

Automatic client detection uses Node's OS-native home-directory resolution and project-local indicators. Passing --client explicitly is deterministic and recommended for scripted setup.

On Windows, generated stdio entries use cmd.exe to launch the npm shim. On macOS and Linux they invoke npx directly.

Workflow

Create a JSON file containing 2-4 ordered stages:

[
  {
    "id": "core",
    "title": "Build the core",
    "description": "Implement the service layer",
    "files": ["src/core.ts"]
  },
  {
    "id": "tests",
    "title": "Add coverage",
    "description": "Cover the service behavior",
    "files": ["tests/core.test.ts"]
  }
]

Then use the CLI:

commit-discipline plan-task --description "Build the feature" --stages-file stages.json
commit-discipline task-status
commit-discipline commit-stage core --message "feat: add core service"
commit-discipline commit-stage tests --message "test: cover core service"
commit-discipline finish-task

Use --file to commit a subset of the active stage's declared files, --max-files or --max-lines for one-off limits, --json for machine-readable output, and --dry-run to inspect a stage without running tests or changing Git/state.

When launched with no arguments, the binary starts the MCP stdio server and exposes:

  • plan_task
  • commit_stage
  • task_status
  • finish_task

Configuration

Optional commit-discipline.config.json:

{
  "schemaVersion": 1,
  "enforcement": "warn",
  "maxFiles": 15,
  "maxLines": 400,
  "testTimeoutMs": 900000,
  "planVisibility": "local",
  "testCommand": {
    "command": "npm",
    "args": ["test"]
  }
}

Defaults warn when a stage exceeds 15 files or 400 added/deleted lines. Set enforcement to strict to block instead. Failed tests always block.

Without explicit testCommand, the tool detects one JavaScript, Python, Go, Rust, or Make test ecosystem. If multiple ecosystems are present, configure the intended command explicitly. Missing make is treated as unavailable rather than as an error.

On Windows, make test detection requires make on PATH. Install it with choco install make, use another Windows package manager, or run the repository through WSL. Native npm, pnpm, Yarn, Python, Go, and Cargo commands do not require Make.

Safety model

  • Plans can only start from a clean worktree.
  • Stage files are exact repo-relative paths; absolute paths and traversal are rejected.
  • Only the next pending stage can be committed.
  • Changes or staged files outside the active stage block the operation.
  • Tests run before staging; scope and limits are checked again afterward.
  • Manual commits that move HEAD outside the plan are detected.
  • Local plan state is stored in .commit-discipline/plan.json and ignored by default.
  • Dry runs do not execute tests, stage files, create commits, or update plan state.

Development

npm ci
npm run verify
npm run smoke:package
npm run benchmark:git

The release gate runs type checking, 46+ unit/integration tests, a complete packed-package CLI/MCP lifecycle, native-shell npx checks, and Node 18/20/22 jobs on windows-latest, ubuntu-latest, and macos-latest.

benchmark:git measures commit_stage overhead after subtracting the test command's own runtime, discards one warm-up sample, and reports the median of five repositories against the PRD's 300ms target. The report is intentionally visible rather than hidden behind a platform-dependent assertion: Git process startup varies substantially by OS, antivirus, filesystem, and CI host.

After an npm release, the manually dispatched Registry smoke workflow verifies the exact registry command npx -y commit-discipline-mcp@<version> --help through PowerShell, cmd.exe, Bash, and Zsh.

License

MIT