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

codereview-ai

v0.1.0

Published

Pre-commit/pre-push git hooks that review your code diffs using locally installed Claude Code CLI or OpenAI Codex CLI — zero API keys required.

Readme

codereview-ai

npm version CI License: MIT Node.js >= 18

Zero-config AI code review for every commit — using the CLI tools you already have.

codereview-ai adds a git pre-commit (or pre-push) hook that reviews your staged diff with Claude Code or OpenAI Codex CLI. No API keys. No cloud accounts. No configuration required.


Quick Start

# 1. Install the hook in your project
npx codereview-ai init

# 2. Stage your changes as usual
git add .

# 3. Commit — the review runs automatically
git commit -m "feat: add new feature"

That's it. Your next commit will be reviewed by your local AI CLI before it lands.


Features

  • Zero API keys — uses your locally installed claude or codex binary
  • Zero config — works out of the box with sensible defaults
  • Dual CLI support — auto-detects Claude Code CLI and OpenAI Codex CLI; prefers Claude when both are installed
  • Structured review output — colored terminal output with severity levels (error / warning / info)
  • Configurable exit codes — block commits on issues or run in advisory mode
  • Ignore paths — skip node_modules/, dist/, and any other paths you configure
  • Custom prompts — append project-specific conventions to the base review prompt
  • CI-friendly — no color output when stdout is not a TTY

Prerequisites

At least one of:

Node.js >= 18 is required.


How It Works

git commit
     │
     ▼
pre-commit hook
     │
     ▼
codereview-ai review
     │
     ├─ git diff --cached        (extract staged changes)
     ├─ filter ignorePaths        (remove noise)
     ├─ detect claude / codex     (find available CLI)
     └─ pipe diff to CLI ─────► AI review
                                   │
                          structured JSON response
                                   │
                     ┌─────────────┴──────────────┐
                     │                            │
                  PASS (exit 0)             FAIL (exit 1)
               commit proceeds            commit blocked

The diff is piped to your local AI CLI with a structured prompt that asks for:

  • Bug detection
  • Security vulnerabilities
  • Performance issues
  • Code smells
  • Error handling gaps

The AI responds with a JSON list of issues. codereview-ai renders them in your terminal, then exits 0 (pass) or 1 (fail) based on your configuration.


Configuration

Create an optional .ai-reviewerrc.json in your project root to override defaults:

{
  "preferredCLI": "claude",
  "timeout": 90,
  "failOnIssues": true,
  "severityThreshold": "warning",
  "ignorePaths": ["node_modules", "dist", ".git", "coverage"],
  "customPrompt": "Follow our team's TypeScript style guide at docs/style.md"
}

Config Reference

| Field | Type | Default | Description | |---|---|---|---| | hook | "pre-commit" | "pre-push" | "pre-commit" | Git hook that triggers the review | | preferredCLI | "claude" | "codex" | "auto" | "auto" | Which AI CLI to prefer | | timeout | number | 60 | Seconds to wait for the CLI before aborting | | failOnIssues | boolean | true | Exit 1 (block commit) when issues are found | | severityThreshold | "error" | "warning" | "info" | "warning" | Minimum severity that counts as a failure | | ignorePaths | string[] | ["node_modules","dist",".git"] | Path prefixes/substrings to exclude from the diff | | customPrompt | string | — | Extra instructions appended to the base review prompt |


CLI Usage

codereview-ai [command] [options]

Commands:
  review   Run AI code review on staged changes
  init     Set up husky git hooks in the current project

Options:
  --version, -v   Print version
  --help, -h      Show help

Review options:
  --hook <type>   Override hook type for this run (pre-commit | pre-push)

Init options:
  --hook <type>   Which git hook to install (default: pre-commit)
  --rc            Create a sample .ai-reviewerrc.json

vs Manual Review

| | codereview-ai | Manual PR review | |---|---|---| | When | Every commit, locally | After push, on GitHub | | Latency | Seconds | Hours to days | | API keys | None required | None (uses local CLI) | | Blocks bad commits | Yes (exit 1) | No | | Works offline | Yes (if CLI works offline) | No | | Customizable | Yes, via .ai-reviewerrc.json | Via review guidelines | | CI integration | Optional (run in CI too) | Standard |


Development

See CONTRIBUTING.md for setup instructions, testing, and the PR process.


License

MIT — Copyright (c) 2026 Hassaan Saleem