Metadata-Version: 2.4
Name: ai-pr-review
Version: 0.1.0
Summary: AI PR Review — 自动代码审查机器人，从 Claude Code 权限链逆向的安全审查引擎
License: MIT
Requires-Python: >=3.10
Description-Content-Type: text/markdown
Requires-Dist: httpx>=0.25
Requires-Dist: rich>=13
Requires-Dist: pydantic>=2
Requires-Dist: typer>=0.9

# AI PR Review

> 自动代码审查机器人 — 从 Claude Code 权限链逆向的安全/质量审查引擎

## 安装

```bash
pip install ai-pr-review
```

## 使用

```bash
# 快速审查一个 PR
pr-review https://github.com/owner/repo/pull/123

# 审查并发表评论到 PR
export GITHUB_TOKEN='ghp_xxxx'
pr-review https://github.com/owner/repo/pull/123 --post

# 保存审查报告
pr-review https://github.com/owner/repo/pull/123 --output report.md

# 深度审查（调用 LLM）
pr-review https://github.com/owner/repo/pull/123 --deep

# JSON 输出
pr-review https://github.com/owner/repo/pull/123 --json
```

## 审查规则

| 级别 | 说明 | 来源 |
|------|------|------|
| 🔴 严重 | SQL注入、命令注入、硬编码密钥 | Claude Code bashSecurity.ts |
| 🟠 高 | XSS、路径遍历、不安全的反序列化 | Claude Code permission system |
| 🟡 中 | N+1查询、CSRF、调试信息泄露 | Claude Code 审计经验 |
| 🔵 低 | TODO遗留、魔数、过长函数 | PEP8 规范 |

## 定价

| 功能 | 免费 | Pro ($10/月) |
|------|------|--------------|
| 基础审查 (规则引擎) | ✅ 每天5次 | ✅ 无限 |
| 深度审查 (LLM) | ❌ | ✅ |
| PR 自动评论 | ❌ | ✅ |
| CI/CD 集成 | ❌ | ✅ |
