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

@levelxup/ai-git-review

v1.0.0

Published

AI Git Code Reviewer for Laravel + Vue projects

Readme

AI Git Code Reviewer

A global AI code review tool for Laravel + Vue projects. Automatically reviews staged code before commits and blocks commits if critical issues are found (e.g., dd(), dump(), console.log(), security or performance issues).

This tool uses OpenRouter or compatible OpenAI endpoints.


Installation

  1. Install the package globally via NPM:
npm install -g ai-git-review

Make sure you have Node.js >= 18 installed.


Configuration

Copy the .env-example to .env inside the package folder:

cd $(npm root -g)/ai-git-review
cp .env-example .env

Edit the .env file and add your API key and configuration:

OPENROUTER_API_KEY=your_openrouter_api_key_here
OPENROUTER_MODEL=deepseek/deepseek-coder
OPENROUTER_API_ENDPOINT=https://openrouter.ai/api/v1
OPENROUTER_MAX_TOKENS=400

⚠️ The script will always use the .env file located next to index.js, not your project's .env.


Setup Git Pre-commit Hook (Optional)

To automatically run AI review on every commit:

1. Create a global Git hooks folder (if you don't have one yet):

mkdir -p ~/.git-hooks

2. Create a pre-commit file inside it:

nano ~/.git-hooks/pre-commit

3. Add the following content:

#!/bin/sh
# Run the global AI reviewer
AI_REVIEWER="$(npm root -g)/ai-git-review/index.js"

if [ ! -f "$AI_REVIEWER" ]; then
    echo "❌ AI reviewer script not found at $AI_REVIEWER"
    exit 0
fi

node "$AI_REVIEWER"
STATUS=$?

if [ $STATUS -eq 1 ]; then
    echo "❌ Commit blocked due to AI detected issues."
    exit 1
fi

echo "✅ Commit passed AI review."
exit 0

4. Make it executable:

chmod +x ~/.git-hooks/pre-commit

5. Tell Git to use this global hooks folder:

git config --global core.hooksPath ~/.git-hooks

Now all your repositories will automatically run AI code review on commit.


Usage

Run manually in any repo:

ai-git-review

Or automatically via the Git pre-commit hook (recommended).


Logging

All AI review results and errors are logged in your project at:

storage/logs/ai-review.log

The log includes timestamps and reasons for failed commits.


Notes

  • Only staged changes (git add) are reviewed.
  • Only .php, .js, and .vue files are checked.
  • Large diffs (>15,000 characters) are skipped automatically.
  • Commits are blocked only if AI detects critical issues.