Skip to main content

Unix-friendly CLI for RenderDoc .rdc captures

Project description

 _____  _____   _____
|  __ \|  __ \ / ____|
| |__) | |  | | |
|  _  /| |  | | |
| | \ \| |__| | |____
|_|  \_\_____/ \_____|  cli

PyPI Python License Commands Tests Coverage

Turn RenderDoc captures into Unix text streams. rdc-cli does not replace RenderDoc — it makes .rdc file contents accessible to grep, awk, sort, diff, jq, and AI agents.

Full documentation →

rdc open scene.rdc
rdc draws | grep Shadow | sort -t$'\t' -k3 -rn | head -5   # top 5 shadow draws by tri count
rdc shader 142 ps | grep shadowMap                           # find shadow sampling in PS
rdc cat /draws/142/shader/ps/constants                       # inspect bound constants
rdc diff before.rdc after.rdc --draws | grep '~'             # what changed between two frames?
rdc close

Install

PyPI (recommended — any Linux distro)

pipx install rdc-cli                  # install the CLI
# Build the renderdoc Python module (one-time, ~3 min, needs cmake + ninja)
curl -fsSL https://raw.githubusercontent.com/BANANASJIM/rdc-cli/master/scripts/build-renderdoc.sh | bash
rdc doctor                            # verify everything works

AUR (Arch Linux — builds renderdoc automatically, no extra setup)

yay -S rdc-cli        # stable: tracks tagged releases
yay -S rdc-cli-git    # git: tracks latest master

From source

git clone https://github.com/BANANASJIM/rdc-cli.git
cd rdc-cli
pixi install && pixi run sync

Quickstart

Explore a capture like a filesystem:

rdc ls /                              # top-level: draws, passes, resources, shaders, ...
rdc ls /draws/142                     # what's inside this draw call?
rdc cat /draws/142/pipeline/om        # output merger state
rdc tree /passes --depth 2            # pass structure at a glance

Shader debugging — no GUI needed:

rdc shader 142 ps                     # pixel shader disassembly
rdc shader 142 ps --constants         # current constant buffer values
rdc debug pixel 142 400 300 --trace   # step-by-step PS execution trace
rdc search "shadowMap"                # grep across all shaders in the frame

Export and scripting:

rdc texture 5 -o albedo.png           # export a texture
rdc rt 142 -o render.png              # export render target
rdc buffer 88 -o verts.bin            # export raw buffer
rdc snapshot 142 -o ./snap/           # pipeline + shaders + render targets
rdc draws --json | jq '.[] | select(.tri_count > 10000)'  # filter with jq

CI assertions:

rdc open frame.rdc
rdc assert-pixel 142 400 300 --expect "0.5 0.0 0.0 1.0" --tolerance 0.01
rdc assert-state 142 topology --expect TriangleList
rdc assert-image golden.png actual.png --threshold 0.001
rdc assert-clean --min-severity HIGH
rdc close

Two-frame diff:

rdc diff before.rdc after.rdc --shortstat        # summary: draws ±N, resources ±N
rdc diff before.rdc after.rdc --draws             # per-draw changes
rdc diff before.rdc after.rdc --framebuffer       # pixel-level image diff

Why rdc-cli?

RenderDoc is excellent at capturing GPU frames and replaying them interactively. But its GUI doesn't compose — you can't pipe a draw call list into sort, diff two captures in CI, or let an AI agent inspect shader state.

rdc-cli bridges that gap:

  • TSV by default — every command outputs tab-separated text that pipes directly into Unix tools. Raw numbers, not human-friendly formatting (use --table for that).
  • VFS path namespace — GPU state is navigable like a filesystem: /draws/142/shader/ps, /passes/GBuffer/draws, /resources/88. Explore with ls, read with cat.
  • Daemon architecture — load the capture once, then query as many times as you want. No per-command startup cost.
  • Built for CIassert-pixel, assert-state, assert-image, assert-count, assert-clean with diff(1)-compatible exit codes (0=pass, 1=fail, 2=error).
  • AI-agent friendly — structured output (--json, --jsonl), deterministic VFS paths, and a Claude Code skill for automated GPU frame analysis.
  • Escape hatchrdc script runs arbitrary Python inside the daemon with full access to the renderdoc module, for anything the CLI doesn't cover yet.

Commands

Run rdc --help for the full list, or rdc <command> --help for details. See the full command reference for every option.

Category Commands
Session open, close, status, goto
Inspection info, stats, events, draws, event, draw, log
GPU state pipeline, bindings, shader, shaders, shader-map
Debug debug pixel, debug vertex, debug thread, pixel, pick-pixel, tex-stats
Shader edit shader-build, shader-replace, shader-restore, shader-restore-all, shader-encodings
Resources resources, resource, passes, pass, usage
Export texture, rt, buffer, mesh, snapshot
Search search, counters
Assertions assert-pixel, assert-state, assert-image, assert-count, assert-clean
Diff diff (with --draws, --stats, --framebuffer, --pipeline, etc.)
VFS ls, cat, tree
Utility doctor, completion, capture, count, script, install-skill

All list commands output TSV. All commands support --json. Footer/summary goes to stderr — stdout is always clean data.

Common options

Options available on most list/query commands (not every command supports all):

--json           JSON output (all commands)
--jsonl          streaming JSON, one object per line (list commands)
--no-header      drop TSV header for awk/cut (list commands)
-q / --quiet     IDs only for xargs (list commands)
--sort <field>   sort by field (events, resources, shaders)
--limit <N>      truncate rows (events, search)
--filter <pat>   name glob filter (events)
-o <path>        output to file (export commands)

Shell completions

rdc completion bash > ~/.local/share/bash-completion/completions/rdc
rdc completion zsh  > ~/.zfunc/_rdc
rdc completion fish > ~/.config/fish/completions/rdc.fish

Development

pixi run sync                 # install deps + git hooks + renderdoc symlink
pixi run check                # lint + typecheck + test
pixi run verify               # full packaging verification

GPU integration tests require a real renderdoc module:

export RENDERDOC_PYTHON_PATH=/path/to/renderdoc/build/lib
pixi run test-gpu

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

rdc_cli-0.3.3.tar.gz (845.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

rdc_cli-0.3.3-py3-none-any.whl (135.2 kB view details)

Uploaded Python 3

File details

Details for the file rdc_cli-0.3.3.tar.gz.

File metadata

  • Download URL: rdc_cli-0.3.3.tar.gz
  • Upload date:
  • Size: 845.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for rdc_cli-0.3.3.tar.gz
Algorithm Hash digest
SHA256 f439b0521d35b810d6adfee76e8f4a6978745b0a5efec5e19f27b18e91515931
MD5 c92116e4c8f04066ecafe99812b90dda
BLAKE2b-256 ebb313054944b325e62ddf9242e06f553e01150e717a1cc9652dd38c63a97040

See more details on using hashes here.

Provenance

The following attestation bundles were made for rdc_cli-0.3.3.tar.gz:

Publisher: ci.yml on BANANASJIM/rdc-cli

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file rdc_cli-0.3.3-py3-none-any.whl.

File metadata

  • Download URL: rdc_cli-0.3.3-py3-none-any.whl
  • Upload date:
  • Size: 135.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for rdc_cli-0.3.3-py3-none-any.whl
Algorithm Hash digest
SHA256 4b2b8f4416680f50ca7ab2c3231996af5c02dc7e241d2c2c17906b24fb60c7e7
MD5 d2a6009d81cd297e1efaf4af580e9c12
BLAKE2b-256 942c436caefdefade8048fb8d52c56760aac390733c07c79f27ce3040ad11659

See more details on using hashes here.

Provenance

The following attestation bundles were made for rdc_cli-0.3.3-py3-none-any.whl:

Publisher: ci.yml on BANANASJIM/rdc-cli

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page