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

revcd

v1.0.12

Published

Review Code utility

Readme

REVCD (Review Code)

A command-line utility to list and review git commit changes, built with Node.js and TypeScript. This tool uses Ollama's AI models to provide instant feedback on your code changes, thus helping you improve your code quality. The generated feedback is displayed in the terminal and saved to a file named REVIEW.md.

Choose your preferred coding model from Ollama to use with REVCD. In our testing, we've used both codellama:7b and qwen2.5-coder:3b, but you can select any model you prefer. The qwen2.5-coder:3b model performs faster and requires less memory than codellama:7b as it belongs to a newer generation of models.

Features

  • Commit Message Generation: Automatically suggests descriptive commit messages based on your code changes
  • AI-Powered Code Reviews: Get instant feedback on your code changes using Ollama's AI models. Reviews include:
    • Mermaid sequence diagram if the code is deemed complex enough
    • Code quality assessment
    • Performance optimization suggestions
    • Security vulnerability detection
    • Best practices recommendations
    • Lists code smells
    • Improved code alternatives
  • Selective Review: Choose to review specific files, line ranges, or only changed parts (hunks)
  • Staged & Unstaged Changes: Review both staged and unstaged changes in your git repository
  • Language Support: Built-in support for TypeScript, JavaScript, Python, Go, and configurable for other languages
  • Simple CLI Interface: Easy-to-use command-line interface with intuitive options
  • Local AI Processing: Uses Ollama for local AI processing, keeping your code private and secure
  • Customizable: Configure AI parameters and code review settings through environment variables

Prerequisites

  • Node.js (v16 or higher)
  • Ollama

Ollama installation

Using Docker:

docker run -d -v ollama:/root/.ollama -p 11434:11434 --name ollama ollama/ollama
docker exec -it ollama ollama run codellama:7b

Using Homebrew:

brew install ollama
brew services start ollama
ollama run codellama:7b

Installation

From npm (recommended)

You can install the package directly from npm:

# Install globally
npm install -g revcd

# Or with yarn
yarn global add revcd

From Source

After cloning the repository, you can install the CLI globally on your system:

# Install dependencies
yarn install

# Build the project
yarn build

# Link the package globally
yarn link

Usage

Once installed, you can use the revcd command from anywhere in your terminal.

Available Commands

  • Help: Display available commands

    revcd --help
  • Review: Review code files and changes

    revcd review [options]

    Options:

    • -f, --file <file>: Review only a specific file
    • -l, --lines <range>: Review only a specific line range in format L:n-m (e.g., L:10-20) (must be used with --file)
    • -h, --hunks-only: Review only the added hunks/lines instead of entire files
    • -s, --staged: Review staged changes instead of unstaged changes (works with --hunks-only)
    • -a, --all: Review all files, not just code files
    • -m, --model <model>: Specify the Ollama model to use for review
  • Hunks: Show only the changed parts (hunks) of unstaged/uncommitted files

    revcd hunks [options]

    Options:

    • -f, --file <file>: Show hunks for a specific file only
    • -s, --staged: Show hunks for staged changes instead of unstaged
  • Generate Env: Copy the example environment file to your current directory

    revcd genv [options]

    Options:

    • -f, --force: Overwrite existing .env file if it exists

Environment Variables

The application uses environment variables for configuration. You can set these in a .env file in the root directory or as system environment variables.

Ollama Configuration

# API base URL
OLLAMA_API_BASE_URL=http://localhost:11434

# Model configurations
OLLAMA_DEFAULT_MODEL=codellama:7b

# Generation parameters
OLLAMA_DEFAULT_TEMPERATURE=0.7
OLLAMA_DEFAULT_TOP_P=0.9
OLLAMA_DEFAULT_MAX_TOKENS=2048

# Rate limiting (milliseconds between requests)
OLLAMA_MIN_REQUEST_INTERVAL=500

# Code review parameters
CODE_FILE_EXTENSIONS=ts,js,py,go

A .env.example file is provided as a template.

Development

Prerequisites

  • Node.js (v16 or higher)
  • Ollama
  • Yarn

Setup

# Install dependencies
yarn install

# Build the project
yarn build

# Run in development mode
yarn dev

Project Structure

  • src/index.ts: Main entry point for the CLI
  • src/services/: Service modules
    • fileService.ts: File operations
    • gitService.ts: Git operations for retrieving commit changes
    • ollamaService.ts: Ollama AI operations for code review
    • index.ts: Service exports
  • src/config/: Configuration modules
    • codeReview.config.ts: Code review settings
    • ollama.config.ts: Ollama API configuration
    • index.ts: Configuration exports
  • src/utils/: Utility modules
    • languageMap.ts: Programming language detection and mapping
    • index.ts: Utility exports
  • src/tests/: Test modules
    • languageMap.test.ts: Tests for language mapping functionality

License

ISC

Author

Akeel Nazir