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

pi-open-code-review

v0.1.5

Published

BTKS Pi package for running Alibaba Open Code Review with a skill and slash command.

Readme

BTKS Pi Open Code Review

BTKS Pi package for running Alibaba Open Code Review from Pi with the same operating model as the Claude Code and Codex integrations.

OCR remains the review engine. Pi provides:

  • an open-code-review skill for natural language review requests,
  • one slash command, /ocr, for explicit review, fix, and scan workflows.

Prerequisites

The /ocr command checks for the official OCR CLI before each run. If ocr is missing, it attempts to install it with:

npm install -g @alibaba-group/open-code-review

OCR still needs its own LLM configuration before review can run:

ocr llm test

OCR uses its own LLM configuration. Installing this Pi package does not configure API keys and does not change Pi's model provider.

Install

From npm:

pi install npm:pi-open-code-review

For local development from this checkout:

pi install D:\workspace\pi\pi-open-code-review

For a single trial run without adding it to settings:

pi -e D:\workspace\pi\pi-open-code-review

Usage

Slash command:

/ocr 帮我review一下还没提交的这些代码
/ocr 帮我review src/auth 代码,重点看安全问题
/ocr review
/ocr review --from main --to feature-branch
/ocr review --commit abc123
/ocr fix --from main --to feature-branch
/ocr scan --path src

/ocr is the only package-provided slash command. It supports both natural-language requests and precise OCR subcommands. review, fix, and scan are subcommands that map to OCR workflows rather than separate Pi commands.

Natural-language /ocr input is routed back to the Pi agent with the open-code-review skill, so the model can decide whether to run a workspace review, full-file scan, commit review, branch comparison, or fix workflow:

/ocr 帮我review一下还没提交的这些代码
/ocr 看一下 src/auth 这块代码有没有安全问题
/ocr review一下这个分支和main相比的改动

Precise mode is still available when the text starts with review, fix, scan, or a flag such as --commit.

Natural language requests that mirror the Codex plugin:

Use Open Code Review to review my current changes.
Use Open Code Review to review this branch against main.
Use Open Code Review to review and fix high-confidence issues.

The extension executes OCR with machine-readable output:

ocr review --format json --audience agent

For scan mode:

ocr scan --format json --audience agent

Behavior

  • Default review checks staged, unstaged, and untracked workspace changes, matching OCR CLI behavior.
  • If ocr is missing, /ocr attempts to install the official @alibaba-group/open-code-review CLI, matching the Codex plugin flow.
  • Before review, /ocr runs ocr llm test and stops with setup guidance if OCR's model provider is not configured.
  • /ocr fix means review first, then ask Pi to fix precise High and Medium findings.
  • /ocr review --preview and /ocr scan --preview display OCR's text preview output instead of requiring JSON.
  • /ocr review never edits files unless the user explicitly asks for fixing.
  • /ocr <natural language request> asks the Pi agent to interpret the request with the open-code-review skill instead of parsing it as OCR flags.
  • Low-confidence findings are filtered out by the skill rules unless the user asks for all comments.
  • The package forwards a conservative allowlist of OCR flags to avoid accidental shell behavior.

Pi Package Gallery

Pi's package gallery at https://pi.dev/packages lists public npm packages tagged with the pi-package keyword. This package includes that keyword and this Pi manifest:

"pi": {
  "extensions": ["./extensions/open-code-review.js"],
  "skills": ["./skills"],
  "image": "https://raw.githubusercontent.com/alibaba/open-code-review/main/imgs/highlights-en.png"
}

The gallery may lag behind npm's download API. If npm shows downloads but Pi shows 0 or not available, treat npm as the source of truth and wait for Pi indexing or report the package from the Pi package page.

Development

npm test
npm run test:pi
npm run pack:check

The core command-building logic is in extensions/open-code-review-core.mjs. The Pi command entrypoint is extensions/open-code-review.js.