Communitygithub.com

cli-anything-renderdoc

RenderDoc GPU 幀擷取檔案(.rdc)的 CLI 工具,提供無頭模式下的分析功能。

cli-anything-renderdoc 是什麼?

這是一個專為 RenderDoc GPU 幀擷取分析設計的 CLI 工具,可對 `.rdc` 檔案進行完全無頭模式的分析。支援擷取後設資料、動作樹搜尋與篩選、紋理匯出(PNG/JPG/DDS/HDR/EXR)、像素選取、管線狀態提取、著色器反組譯與原始碼匯出、資源緩衝區讀取、頂點著色器輸入/輸出解碼,以及 GPU 硬體計數器查詢。所有指令皆支援 `--json` 輸出以便程式化取用。使用 `pipeline diff` 可比較同一或不同擷取檔案中的兩個事件,而 `preview capture` 與 `preview diff` 可產生便攜的檢視套件,內含縮圖、輸出目標影像、管線狀態 JSON 與動作摘要。這項技能特別適合 CI/CD 流程、自動化測試,以及需要與大型程式碼庫整合的開發管線。

相容平台~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)進行無頭式命令列分析。

功能

  • 擷取檢查:後設資料、區段、縮圖、格式轉換
  • 動作樹:列出/搜尋/篩選繪圖呼叫、清除、分派、標記
  • 紋理操作:列出、檢查、匯出(PNG/JPG/DDS/HDR/EXR)、像素選取
  • 管線狀態:在任何事件處取得完整的著色器/渲染目標/視埠狀態
  • 著色器分析:匯出人類可讀形式的著色器(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  # 僅繪圖呼叫
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

預覽套件

RenderDoc 預覽支援是為了忠實的擷取檢查,而非即時的創意預覽。

# 列出預覽配方
cli-anything-renderdoc -c frame.rdc --json preview recipes

# 為目前擷取或特定事件擷取預覽套件
cli-anything-renderdoc -c frame.rdc --json preview capture --recipe quick --event-id 42

# 為兩個事件或擷取擷取差異預覽套件
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

# 回傳該擷取的最新現有套件
cli-anything-renderdoc -c frame.rdc --json preview latest --recipe quick

典型的預覽套件內容:

  • 擷取縮圖
  • 輸出目標影像
  • pipeline_state.json
  • action_summary.json

差異套件額外包含:

  • A/B 縮圖
  • A/B 輸出目標影像
  • pipeline_diff.json

RenderDoc 目前並未公開即時預覽工作階段。取而代之的是,每個擷取/差異套件會附加到一個穩定的配方層級 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 路徑

代理程式使用注意事項

  • 使用 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 來專注於實際的渲染
  • 當代理程式需要一個可攜帶、忠實的檢查套件而非單純的原始重播呼叫時,請使用 preview capture 或 preview diff
  • 若需要持久的擷取/差異歷史記錄,請從預覽 JSON 中讀取 _trajectory_path
  • 僅在檢查/開啟已產生的套件時使用 cli-hub previews ...
  • 管線狀態需要來自動作清單的事件 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

>-

相關技能