Communitygithub.com

cli-anything-renderdoc

用于 RenderDoc 图形调试器捕获分析的命令行工具集

cli-anything-renderdoc 是什么?

cli-anything-renderdoc 是一个为 RenderDoc 设计的命令行工具集,专门用于对 GPU 帧捕获文件(.rdc)进行无头(headless)分析。它支持多种操作,包括捕获元数据检查、动作树(draw call/clear/dispatch/marker)搜索过滤、纹理导出(PNG/JPG/DDS/HDR/EXR)和像素拾取、管线状态(着色器/渲染目标/视口)查看与比较、着色器源码(HLSL/GLSL/反汇编)提取、常量缓冲区回读、缓冲区/纹理枚举、网格(vertex shader input/output)解码以及 GPU 性能计数器获取。所有命令支持 `--json` 输出,便于程序化消费。该工具在 agent 场景下非常有用,尤其是需要自动化分析 GPU 帧、比对管线状态或提取着色器代码时。它支持多种命令组(capture/actions/textures/pipeline/resources/mesh/counters)并提供预览 bundle 机制,生成可移植的检查包。工作方式为:指定 `.rdc` 文件路径,通过子命令和参数执行具体操作,最终输出文本、JSON 或文件。

兼容平台~Claude Code~Codex CLI~Cursor
npx skills add https://github.com/HKUDS/CLI-Anything/tree/main/skills/cli-anything-renderdoc

在你喜欢的 AI 中提问

打开一个已预加载此 Agent Skill 的新对话。

文档

RenderDoc CLI 技能

对 RenderDoc GPU 帧捕获文件(.rdc)进行无头命令行分析。

功能

  • 捕获检查:元数据、段、缩略图、格式转换
  • 动作树:列出/搜索/过滤 draw call、清除操作、调度、标记
  • 纹理操作:列出、检查、导出(PNG/JPG/DDS/HDR/EXR)、像素拾取
  • 管线状态:任意事件处的完整着色器/RT/视口状态
  • 着色器分析:以人类可读形式(HLSL/GLSL/反汇编)导出着色器,常量缓冲区回读
  • 资源检查:缓冲区/纹理枚举、原始数据读取
  • 网格数据:顶点着色器输入/输出解码
  • GPU 计数器:枚举并获取硬件性能计数器

命令组

capture

cli-anything-renderdoc -c frame.rdc capture info          # 元数据 + 段
cli-anything-renderdoc -c frame.rdc capture thumb -o t.png # 提取缩略图
cli-anything-renderdoc -c frame.rdc capture convert -o out.rdc --format rdc

actions

cli-anything-renderdoc -c frame.rdc actions list           # 所有动作
cli-anything-renderdoc -c frame.rdc actions list --draws-only  # 仅 draw call
cli-anything-renderdoc -c frame.rdc actions summary        # 按类型统计
cli-anything-renderdoc -c frame.rdc actions find "Shadow"  # 按名称搜索
cli-anything-renderdoc -c frame.rdc actions get 42         # 单个动作

textures

cli-anything-renderdoc -c frame.rdc textures list
cli-anything-renderdoc -c frame.rdc textures get <id>
cli-anything-renderdoc -c frame.rdc textures save <id> -o out.png --format png
cli-anything-renderdoc -c frame.rdc textures save-outputs 42 -o ./renders/
cli-anything-renderdoc -c frame.rdc textures pick <id> 100 200

pipeline

cli-anything-renderdoc -c frame.rdc pipeline state 42

# 以人类可读形式导出着色器
# 文本着色器(GLSL/HLSL)→ 直接保存
# 二进制着色器(DXBC/SPIR-V)→ 嵌入源码(HLSL/GLSL)或反汇编
cli-anything-renderdoc -c frame.rdc pipeline shader-export 42 --stage Fragment
cli-anything-renderdoc -c frame.rdc pipeline shader-export 42 --stage Vertex -o ./shaders/

cli-anything-renderdoc -c frame.rdc pipeline cbuffer 42 --stage Vertex --index 0

# 比较两个事件之间的管线状态
# 默认输出:捕获文件所在目录;使用 -o 覆盖
cli-anything-renderdoc -c a.rdc pipeline diff 100 200 -b b.rdc
cli-anything-renderdoc -c frame.rdc pipeline diff 100 200              # 同一捕获
cli-anything-renderdoc -c a.rdc pipeline diff 100 200 -b b.rdc -o result.json
cli-anything-renderdoc -c a.rdc pipeline diff 100 200 -b b.rdc --no-compact

resources

cli-anything-renderdoc -c frame.rdc resources list
cli-anything-renderdoc -c frame.rdc resources buffers
cli-anything-renderdoc -c frame.rdc resources read-buffer <id> --format float32

mesh

cli-anything-renderdoc -c frame.rdc mesh inputs 42 --max-vertices 10
cli-anything-renderdoc -c frame.rdc mesh outputs 42

counters

cli-anything-renderdoc -c frame.rdc counters list
cli-anything-renderdoc -c frame.rdc counters fetch --ids 1,2,3

预览 Bundle

RenderDoc 预览支持用于真实捕获检查,而非实时创意预览。

# 列出预览方案
cli-anything-renderdoc -c frame.rdc --json preview recipes

# 为当前捕获或特定事件捕获预览 bundle
cli-anything-renderdoc -c frame.rdc --json preview capture --recipe quick --event-id 42

# 为两个事件或捕获捕获差异预览 bundle
cli-anything-renderdoc -c frame.rdc --json preview diff 100 200
cli-anything-renderdoc -c a.rdc --json preview diff 100 200 --capture-b b.rdc

# 返回捕获的最新现有 bundle
cli-anything-renderdoc -c frame.rdc --json preview latest --recipe quick

典型预览 bundle 内容:

  • 捕获缩略图
  • 输出目标图像
  • pipeline_state.json
  • action_summary.json

差异 bundle 额外包含:

  • A/B 缩略图
  • A/B 输出目标图像
  • pipeline_diff.json

RenderDoc 目前不提供实时预览会话。相反,每个捕获/差异 bundle 都会追加到稳定的方案级 trajectory.json 中。

查看器命令:

cli-hub previews inspect /path/to/bundle
cli-hub previews html /path/to/bundle -o page.html
cli-hub previews open /path/to/bundle

JSON 模式

所有命令均支持 --json 以输出机器可读格式:

cli-anything-renderdoc -c frame.rdc --json actions summary

环境变量

变量描述
RENDERDOC_CAPTURE默认捕获文件路径
PYTHONPATH必须包含 RenderDoc 路径

Agent 使用注意事项

  • 使用 pipeline shader-export 提取着色器 — 对于二进制着色器(DXBC/SPIR-V),它会自动导出嵌入的 HLSL/GLSL 源码或回退到反汇编;对于文本着色器(GLSL/HLSL),它直接保存原始源代码
  • 不同捕获 API 的着色器格式:
    • D3D11 → DXBC 二进制,导出为嵌入的 HLSL 源码(.hlsl)或字节码汇编(.dxbc.asm)
    • OpenGL/GLES → GLSL 源码文本(.glsl),人类可读
    • Vulkan → SPIR-V 二进制,导出为嵌入的 GLSL 源码(.glsl)或 SPIR-V 汇编(.spv.asm)
  • 使用 pipeline diff 比较两个事件 — 它写入一个 JSON 文件并只打印路径;使用 -b 指定第二个捕获文件
  • 始终指定 --json 以便程序化消费
  • 首先使用 actions summary 了解捕获的复杂度
  • 使用 actions list --draws-only 聚焦实际渲染
  • 当 agent 需要可移植、可靠的检查 bundle 而不是仅依靠原始回放调用时,使用 preview capture 或 preview diff
  • 如需持久的捕获/差异历史,请从预览 JSON 中读取 _trajectory_path
  • cli-hub previews ... 仅用于检查/打开已生成的 bundle
  • 管线状态需要动作列表中的事件 ID
  • 纹理保存支持格式:png, jpg, bmp, tga, hdr, exr, dds
  • 缓冲区数据可以解码为 hex, float32, uint32 或原始字节

Individual skills in this repo

This repo contains 20 individual skills — each has its own dedicated page.

cli-anything-adguardhome

>-

cli-anything-anygen

>-

cli-anything-audacity

>-

cli-anything-blender

>-

cli-anything-browser

Browser automation CLI using DOMShell MCP server. Maps Chrome

cli-anything-calibre

>-

cli-anything-ccswitch

CLI interface for CC Switch — manage AI coding tool configurations from the terminal

cli-anything-chromadb

>-

cli-anything-cloudanalyzer

Command-line interface for CloudAnalyzer — Agent-friendly harness for CloudAnalyzer, a QA platform for mapping, localization, and perception outputs. Supports 27 commands across 8 groups: point cloud evaluation, trajectory evaluation, ground segmentation QA, config-driven quality gates, baseline evolution, processing, visualization, and interactive REPL.

cli-anything-cloudcompare

Command-line interface for CloudCompare — Agent-friendly harness for CloudCompare, the open-source 3D point cloud and mesh processing software. Supports 41 commands across 9 groups: project management, session control, point cloud operations (subsample, filter, segment, analyze), mesh operations, distance computation (C2C, C2M), transformations (ICP, matrix), export (LAS/LAZ/PLY/PCD/OBJ/STL/E57), and interactive REPL.

cli-anything-comfyui

>-

cli-anything-dify-workflow

Wrapper for the Dify workflow DSL CLI. Create, inspect, validate, edit, and export Dify workflow files through a CLI-Anything harness.

cli-anything-drawio

>-

cli-anything-eez-studio

Use EEZ Studio from the command line: inspect and modify native .eez-project files, edit LVGL screens/widgets, manage SCPI commands, and invoke the real EEZ Studio backend for LVGL builds.

cli-anything-eth2-quickstart

>-

cli-anything-exa

>-

cli-anything-firefly-iii

Firefly III CLI - Personal finance management via CLI-Anything

cli-anything-freecad

Complete CLI harness for FreeCAD parametric 3D CAD modeler (258 commands). Covers ALL workbenches: Part (29 primitives + boolean + mirror + loft + sweep), Sketcher (26 cmds: geometry + constraints + editing), PartDesign (38 cmds: pad/pocket/groove/fillet/chamfer/patterns/hole/datum), Assembly (11 cmds), Mesh (16 cmds), TechDraw (15 cmds: views + dimensions + PDF/SVG), Draft (33 cmds: 2D shapes + arrays + transforms), FEM (12 cmds), CAM/CNC (10 cmds), Surface (6 cmds), Spreadsheet (7 cmds), Import (13 formats), Export (17 formats), Measure (12 cmds), Materials (21 presets). Headless FreeCAD export to STEP/IGES/STL/OBJ/DXF/PDF/glTF/3MF.

cli-anything-gimp

>-

cli-anything-godot

>-

相关技能