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

local-ai-code-reviewer

v0.1.1

Published

Context-aware AI-powered code review tool

Downloads

193

Readme

Code Reviewer

Context-aware AI-powered code review for TypeScript/Node.js. Uses static analysis, codebase indexing, and AI (Ollama, Claude, Gemini) to produce actionable review reports.

Requirements

  • Node.js 20+
  • Ollama (optional) for free local analysis
  • API keys for Claude or Gemini if using cloud providers

Installing Ollama

Ollama runs large language models locally. Install it before using code-reviewer setup:

  • macOS — Homebrew: brew install ollama (or GUI: brew install --cask ollama-app) — or install script: curl -fsSL https://ollama.com/install.sh | sh
  • Linux — Snap: sudo snap install ollama — or install script: curl -fsSL https://ollama.com/install.sh | sh
  • Windows — winget: winget install Ollama.Ollama — or download OllamaSetup.exe

After installation, start the server (it may auto-start on some systems):

ollama serve

Then run code-reviewer setup to pull a recommended model and generate your config.

Quick Start

# Install globally
npm install -g code-reviewer

# Setup Ollama (one-time)
code-reviewer setup

# Index your codebase
code-reviewer index

# Run your first review
code-reviewer analyze src/

Commands

| Command | Description | |---------|-------------| | analyze <paths...> | Analyze files or directories. Output formats: text (default), json, markdown. | | index | Index codebase for similar-pattern lookup. Use --force to rebuild, --incremental to update changed files only. Use -v, --verbose for detailed logs. | | setup | Interactive setup for Ollama: check install, pull a model, write config. | | models | List installed Ollama models. | | cache | Manage analysis cache. Use --stats or --clear. |

Analyze options

  • -f, --format <type> — Output format: text, json, markdown
  • --provider <provider> — AI provider: ollama, claude, gemini
  • --model <model> — Override model (e.g. codellama:13b, gemini-2.0-flash)
  • -v, --verbose — Show detailed progress (config, file resolution, parsing, cache hits, AI calls)

Configuration

Create .codereviewerrc.json in your project root:

{
  "ai": {
    "provider": "ollama",
    "ollama": { "host": "http://localhost:11434", "model": "codellama:13b" }
  },
  "rules": {
    "performance": true,
    "readability": true,
    "maintainability": true
  },
  "ignore": ["node_modules", "dist", "coverage"]
}

Environment variables

  • AI_PROVIDER — Override provider (ollama, claude, gemini)
  • OLLAMA_HOST — Ollama server URL
  • GEMINI_API_KEY — For Gemini provider
  • ANTHROPIC_API_KEY — For Claude provider

Providers

| Provider | Cost | Notes | |----------|------|-------| | Ollama | Free | Local models. Run ollama serve and pull a model. | | Gemini | Free tier | Set GEMINI_API_KEY. | | Claude | Paid | Set ANTHROPIC_API_KEY. |

CI/CD

Example GitHub Actions workflows are in .github/workflows/examples/:

  • code-review-ollama.yml — Self-hosted runner with Ollama
  • code-review-gemini.yml — Cloud runner, uses GEMINI_API_KEY secret
  • code-review-claude.yml — Cloud runner, uses ANTHROPIC_API_KEY secret

Copy one into .github/workflows/ and configure secrets as needed.

Demo

Try the demo scenarios with intentional issues. See demo/README.md for the full list.

code-reviewer analyze demo/order-service.ts      # sequential awaits, retry logic
code-reviewer analyze demo/api-sequential-fetches.ts  # parallelizable API calls
code-reviewer analyze demo/  # all scenarios

License

MIT