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

@spaceflow/review

v0.69.0

Published

Spaceflow 代码审查插件,使用 LLM 对 PR 代码进行自动审查

Readme

@spaceflow/review

npm version License: MIT

Spaceflow AI 代码审查扩展,使用 LLM 对 PR 代码进行自动审查。支持 OpenAI、Claude Code、Gemini 等多种 LLM 模式。

安装

pnpm spaceflow install @spaceflow/review

功能特性

  • 多 LLM 支持 — OpenAI、Claude Code、Gemini 可选
  • 行级评论 — 在 PR 中精确定位问题代码行
  • 增量审查 — 多次运行时自动去重,追踪问题修复状态
  • 删除代码分析 — 评估删除代码可能带来的风险
  • AI 生成 PR 描述 — 自动总结 PR 功能变更
  • 审查规范 — 支持自定义 Markdown 格式的审查规则
  • 远程规范引用 — 支持从远程仓库 URL 拉取审查规范

使用

# 审查 PR
spaceflow review -p 123 -l openai

# 审查两个分支之间的差异
spaceflow review -b main --head feature/xxx -l openai

# 仅审查指定文件
spaceflow review -f src/app.ts -l openai

# 详细输出(含提示词)
spaceflow review -p 123 -l openai -vv

# 仅分析删除代码
spaceflow review -p 123 --deletion-only -l openai

命令行参数

| 参数 | 简写 | 说明 | | --------------------------------- | ---- | ----------------------------------------------- | | --pr-number <number> | -p | PR 编号 | | --base <ref> | -b | 基准分支/tag | | --head <ref> | | 目标分支/tag | | --llm-mode <mode> | -l | LLM 模式(openai / claude-code / gemini) | | --files <files...> | -f | 仅审查指定文件 | | --commits <commits...> | | 仅审查指定 commits | | --includes <patterns...> | -i | 文件 glob 过滤模式 | | --verbose [level] | -v | 详细输出(1: 过程日志,2: 含提示词) | | --dry-run | -d | 仅打印将要执行的操作 | | --ci | -c | 在 CI 环境中运行 | | --verify-fixes | | 验证历史问题是否已修复 | | --no-verify-fixes | | 禁用历史问题验证 | | --analyze-deletions | | 分析删除代码影响 | | --deletion-only | | 仅执行删除代码分析 | | --deletion-analysis-mode <mode> | | 删除分析模式(openai / claude-code) | | --generate-description | | 使用 AI 生成 PR 功能描述 | | --output-format <format> | -o | 输出格式(markdown / terminal / json) |

配置

spaceflow.json 中配置 review 字段:

{
  "review": {
    "includes": ["*/**/*.ts", "!*/**/*.spec.*", "!*/**/*.config.*"],
    "references": ["./references"],
    "generateDescription": true,
    "lineComments": true,
    "verifyFixes": true,
    "analyzeDeletions": false,
    "concurrency": 5,
    "retries": 3,
    "retryDelay": 1000
  }
}

PR 标题参数

支持在 PR 标题末尾添加参数覆盖默认配置:

feat: 添加新功能 [/ai-review -l openai -v 2]

CI 工作流示例

name: AI Review
on:
  pull_request:
    types: [opened, synchronize]

jobs:
  review:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - run: pnpm spaceflow review --ci -l openai
        env:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
          OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}

环境变量

| 变量 | 说明 | | ------------------- | ----------------------------- | | GITHUB_TOKEN | GitHub API Token | | GITHUB_REPOSITORY | 仓库名称(owner/repo 格式) | | OPENAI_BASE_URL | OpenAI API 地址 | | OPENAI_API_KEY | OpenAI API Key | | OPENAI_MODEL | OpenAI 模型名称 |

许可证

MIT