校样
- 作者仓库星标 820
- 许可证 MIT
- 作者仓库 proofshot
- 领域
- 通用
- 作者声明的智能体
- 未找到明确声明;不据此推断已兼容或已测试
- 静态检查
- 94 / 100 · 启发式扫描,不代表运行安全
- 运行环境证据
- 未执行;当前没有隔离运行测试证据
- 作者 / 版本 / 许可证
- @AmElmo · MIT
- 上下文用量评级
- 低消耗
- 接入复杂程度
- 需简单配置
- 是否需要外部接口密钥
- 不需要
- 兼容的系统
- 未声明(默认跨平台)
- 运行环境要求
- 未检出明确要求
- 检测到的文件与系统行为
-
- 只读
- 允许写入 / 修改
- 命令执行
- 网络行为
- 仅限本地
- 安装命令数
- 无(仅作为资料)
需要注意: 未声明工具权限范围;实际权限由运行环境决定。
第 1 步:开始会话
这将打开浏览器并开始录制。如果端口已在使用,proofshot 将自动终止现有进程。始终使用`--run`让校样启动并捕获您的开发服务器输出(服务器日志出现在校样报告中)。仅当服务器是由用户或其他进程显式启动时才忽略 `--run` — 如果没有它,则不会捕获服务器日志。如果之前的会话没有完全停止,请添加 `--force` 来覆盖它。
第2步:驱动浏览器并测试
使用proofshot exec 进行导航、交互和验证:在重要时刻截取屏幕截图 - 这些将成为视觉证据。通过读取快照输出来验证您期望看到的内容。
第三步:停止并捆绑证据
这会停止录制,收集控制台+服务器错误,并生成包含视频、屏幕截图和错误报告的SUMMARY.md。
第 4 步(可选):将证明发布给 PR
这会将屏幕截图和视频上传到 GitHub,并在 PR 上发布格式化的评论。默认情况下,它使用`proofshot-artifacts`分支上的官方 GitHub 内容 API。如果您特别想要 GitHub 附件 URL,请使用 `--upload-provider github-web-attachments`。
# ProofShot — Visual Verification Workflow
ProofShot is an open-source, agent-agnostic CLI that lets you verify your own work in a real browser — video proof, screenshots, and error reports, no vendor lock-in.
## When to use
Use ProofShot after:
- Building a new UI feature or page
- Modifying existing UI components
- Fixing a visual bug
- Any change that affects what the user sees
## The workflow (always follow these 3 steps)
### Step 1: Start the session
```bash
proofshot start --run "your-dev-command" --port PORT --description "what you are about to verify"
```
This opens a browser and begins recording. If the port is already in use, proofshot will kill the existing process automatically.
**Always use `--run`** to let proofshot start and capture your dev server output (server logs appear in the proof report).
Only omit `--run` if the server was explicitly started by the user or another process — without it, no server logs are captured.
If a previous session was not stopped cleanly, add `--force` to override it.
### Step 2: Drive the browser and test
Use proofshot exec to navigate, interact, and verify:
```bash
proofshot exec snapshot -i # See interactive elements
proofshot exec open http://localhost:PORT/page # Navigate to a page
proofshot exec click @e3 # Click a button
proofshot exec fill @e2 "test@example.com" # Fill a form field
proofshot exec screenshot step-NAME.png # Capture key moments
```
Take screenshots at important moments — these become the visual proof.
Verify what you expect to see by reading the snapshot output.
### Step 3: Stop and bundle the proof
```bash
proofshot stop
```
This stops recording, collects console + server errors, and generates
a SUMMARY.md with video, screenshots, and error report.
### Step 4 (optional): Post proof to the PR
```bash
proofshot pr # Auto-detect PR from current branch
proofshot pr 42 # Target a specific PR number
```
This uploads screenshots and video to GitHub and posts a formatted comment on the PR. By default it uses the official GitHub contents API on a `proofshot-artifacts` branch. Use `--upload-provider github-web-attachments` if you specifically want GitHub attachment URLs.
## Tips
- Always include a meaningful --description so the human knows what was tested
- Take screenshots before AND after key actions (e.g., before form submit, after redirect)
- If you find errors during verification, fix them and re-run the workflow
- Use `proofshot pr` after stopping to attach proof directly to the pull request
章节与文件索引
按说明文件中的顺序排列。
何时使用
第 1 步:开始会话
第2步:驱动浏览器并测试
第三步:停止并捆绑证据
第 4 步(可选):将证明发布给 PR
文件/命令 -> --run · --force · proofshot-artifacts · --upload-provider github-web-attachments · proofshot pr
内容校验值 -> cce034d21656
当前原文的自动摘译,尚未人工审校。
何时使用
在以下情况后使用 ProofShot: 构建新的 UI 功能或页面 修改现有 UI 组件 修复视觉错误 影响用户所见内容的任何更改
第 1 步:开始会话
这将打开浏览器并开始录制。如果端口已在使用,proofshot 将自动终止现有进程。始终使用
--run让校样启动并捕获您的开发服务器输出(服务器日志出现在校样报告中)。仅当服务器由用户或其他进程显式启动时才忽略--run— 没有它,就不会捕获服务器日志。如果之前的会话没有完全停止,请添加--force来覆盖它。第 4 步(可选):将证明发布给 PR
这会将屏幕截图和视频上传到 GitHub,并在 PR 上发布格式化的评论。默认情况下,它使用
proofshot-artifacts分支上的官方 GitHub 内容 API。如果您特别想要 GitHub 附件 URL,请使用--upload-provider github-web-attachments。