-
Notifications
You must be signed in to change notification settings - Fork 1
Integrations
This page is for people who want to build other tools around XeCLI or reuse its command and file formats.
There are three useful ways to integrate with XeCLI:
- Call the CLI directly.
- Parse its JSON output.
- Read operator-configured metadata files directly.
Use the smallest integration surface that solves the problem.
XeCLI is designed to work as a process-oriented automation layer. An external tool can invoke rgh, inspect the exit code, consume structured output, and retain redacted reports or transcripts without embedding XBDM, JRPC2, FTP, FATX, XEX, or package-handling code.
There is no separate automation service to configure. The command line is the integration boundary, and the caller receives only the access already available to the local XeCLI process and its selected console target.
| Need | XeCLI surface | Automation contract |
|---|---|---|
| Run repeatable command files |
rgh script run, rgh script replay
|
Validate with --dry-run, explicitly allow live commands, and retain a redacted transcript |
| Select and validate targets |
rgh target-saved, rgh health, rgh network
|
Use a named target instead of discovery and check local state before contacting a console |
| Create structured snapshots |
rgh report, rgh report-profile
|
Emit Markdown, HTML, CSV, or JSON; compare saved reports offline |
| Read live state |
status, profiles, title, signin, modules, mem, content, and other commands with --json
|
Parse JSON and use the process exit code instead of scraping terminal tables |
| Transfer and compare files |
rgh ftp, rgh fs, rgh save, rgh content
|
Preview supported writes with --dry-run; use hashes, diffs, resume, and transfer summaries where available |
| Capture and compare memory state |
rgh mem map, mem compare, mem dump-compare, mem-bookmarks
|
Save machine-readable snapshots and perform comparisons or bookmark work offline |
| Automate reverse engineering |
rgh xex, rgh ghidra, rgh ida
|
Build analysis bundles, run headless tools, verify output, and exchange symbol sidecars |
| Plan storage changes |
rgh xtaf patch plan, rgh xtaf patch apply
|
Generate a patch manifest, preview it, and apply only when the baseline still matches |
| Preserve an audit trail |
rgh log, rgh diagnostics, rgh support
|
Export local history or create redacted diagnostic artifacts |
| Configure shells | rgh completion |
Emit completion scripts for PowerShell, Bash, or Zsh to standard output |
| Check release packages | rgh release check |
Maintainer-only validation of a publish directory, archive, and checksum metadata |
For reliable automation:
- Select an explicit saved target instead of relying on discovery.
- Run
rgh health --jsonandrgh target-saved validate --jsonbefore a live workflow. - Prefer
--json, CSV, or a documented output file over terminal-table parsing. - Preview supported write operations with
--dry-run. - Require an explicit operator decision before allowing live, destructive, reboot, or confirmation-gated commands.
- Use completion options such as
--waitwhen the workflow must confirm an observed state change instead of only receiving a request acknowledgement. - Retain redacted transcripts, reports, or exported logs when the workflow needs an audit trail.
Do not place keyvaults, credentials, CPU keys, unredacted reports, or other private console data in shared command files or logs. Keep those files local and pass private values only where the selected workflow explicitly requires them.
rgh script run reads one XeCLI command per line. A dry run validates and classifies the file without executing its child commands. Live or destructive entries remain blocked unless the caller deliberately adds --allow-live.
rgh script run .\workflow.txt --dry-run
rgh script run .\workflow.txt --allow-live --transcript-out .\workflow-transcript.json
rgh script replay .\workflow-transcript.json --dry-runThe transcript is structured and redacted. Replay is offline and never reruns the saved child commands. The compatibility alias rgh batch reaches the same command tree, but new integrations should use rgh script.
Named targets and report profiles make repeated jobs deterministic:
rgh target-saved validate --json
rgh target-saved use home --json
rgh health --json
rgh status --json
rgh report-profile add operator-review --format json --include-modules --include-threads
rgh report --report-profile operator-review --out .\console-report.json
rgh report --left .\report-before.json --right .\report-after.json --format jsonReports redact console and network identifiers by default. Add --include-private only for output that remains under the operator's control.
Several write-capable command families expose planning or dry-run modes suitable for a review gate:
rgh ftp put --path /Hdd1/Plugins --in .\Plugins --recursive --dry-run --json
rgh ftp sync --direction upload --path /Hdd1/Plugins --in .\Plugins --recursive --dry-run --json
rgh trainer apply --file .\trainer.json --dry-run
rgh avatar install --contentid <CONTENT-ID> --current-user --dry-run
rgh xtaf patch apply --patch .\xtaf-patch.json --image .\hdd.img --dry-run --jsonA successful preview is not permission to perform the write. The caller should present the plan and require an explicit decision before removing --dry-run or adding an automatic-confirmation option.
Some live commands distinguish an accepted request from an observed completion. Use the completion form when later steps depend on the result:
rgh launch --xex Hdd1:\Aurora\Aurora.xex --wait
rgh reboot --waitAvoid interactive flows such as rgh start, rgh avatar choose, or confirmation-gated destructive commands in unattended jobs. Prefer explicit targets and arguments, and stop the workflow on any non-zero exit code.
XeCLI is useful as an orchestration layer when your tool needs live console interaction but you do not want to duplicate transport code.
Good examples:
- launchers that need title and module metadata
- dashboards that need status snapshots
- overlays that need sign-in/session state
- operator panels that need LED or notification actions
- save tools that need extraction and injection
- reverse-engineering helpers that need XEX pulls or Ghidra/IDA automation
- storage tools that want SaveEditors Xtaf-CLI as an optional external mount or recovery surface
Typical calls:
rgh status --json
rgh title --json
rgh signin state --json
rgh modules list --json
rgh content list --jsonFor external Xtaf-CLI workflows, use the wrapper commands instead of duplicating FATX logic:
rgh xtaf-cli status
rgh xtaf-cli status --require-mount
rgh xtaf-cli install
rgh xtaf-cli run --arg=--helpPrefer --json when you need stable machine-readable output instead of screen scraping terminal tables.
Common commands with useful JSON output:
statusprofilestitlescanmodules listmodules infomem regionsmem stringscontent listsignin stateghidra verifyida checkida verify
Example:
rgh status --json > status.json
rgh title --json > title.json
rgh signin state --json > signin.json
rgh modules list --json > modules.jsonXeCLI does not ship a title database. External tools can consume the same operator-supplied CSV/TXT file selected in XeTerminal Settings, named by XECLI_TITLE_DATABASE, or stored as titleids.csv in the active XeCLI configuration directory. That directory is %APPDATA%\XeCLI when installed, package-local UserData in portable mode, or the directory selected by XECLI_HOME.
That file can be reused to:
- resolve Title IDs
- annotate content inventory
- label saves and dumps
- enrich UI views with media and region data
There is no runtime fetch. rgh title --json also exposes Database.SourceKind, SourcePath, entry counts, and line-specific warnings.
XeCLI also expects an avatar corpus named Avatar-Item-Collection.
That corpus is intended to be reused by external tools that need:
- offline avatar item browsing
- title-aware filtering
- item metadata indexing
- pack-level download or cache orchestration
- avatar install workflows without depending on an online marketplace
The hosted collection lives at:
Remote consumers should treat the manifest/title-map pair as the primary entry point:
avatar-manifest.jsonavatar-title-map.json
The current XeCLI remote defaults resolve to the same hosted repo and keep a local download cache so repeated installs do not re-fetch the same pack.
The recommended external-tool pattern is:
- index the local collection once
- expose title-based and text-based filters in your own UI
- download or cache only the packs your workflow needs
- hand install or patch data to XeCLI or a companion installer layer
Use Avatar-Item-Collection as the public-facing corpus name in your own tooling and integrations.
Typical CLI entry points:
rgh avatar library show --json
rgh avatar games --json
rgh avatar items --titleid 415608C3 --json
rgh avatar install --contentid 000000080DF3B242CAE65A52415608C3 --current-userWhen the target console's FTP service is not running, rgh avatar install can fall back to XBDM upload and XBDM-side verification.
Example pattern:
rgh xex dump --out .\title.xex
rgh screenshot --out .\screen.bmp
rgh save extract --titleid 415608C3 --out .\savesThis works well when your application wants the files that XeCLI can pull rather than embedding transport logic itself.
This is also a good fit when you want XeCLI’s live progress handling and clear error messages without rewriting FTP/XBDM transport code yourself.
If your tool needs decompile output but you do not want to own the reverse-engineering automation layer yourself, XeCLI can drive either supported path.
If you want XeCLI to handle Ghidra import, decompile, and verification:
rgh ghidra decompile --in .\title.xex --out .\decomp
rgh ghidra verify --dir .\decomp --jsonThis keeps import, decompile, and verification logic in one place.
If you want XeCLI to handle the IDA import/decompile path instead:
rgh ida analyze --in .\title.xex --out-db .\title.i64 --overwrite
rgh ida decompile --in .\title.i64 --out .\ida-decomp --backend idalib --max 50
rgh ida verify --dir .\ida-decomp --jsonFor a one-shot XEX-driven IDA path, use:
rgh xex ida-decompile --in .\title.xex --out .\ida-decomp --out-db .\title.i64 --keep-dbUse the Ghidra path when you want the (Free) external tool or a looser environment requirement. Use the IDA path when you want the documented IDA Pro 9.3 plus SaveEditors idaxex 9.3 workflow, with legacy IDA Pro 9.1.250226 archive compatibility still available.
If you only need to move function names out of IDA or Ghidra and into offline bookmarks, use the sidecar path:
rgh ida export-symbols --in .\title.i64 --out .\symbols.json
rgh ghidra export-symbols --in .\title.xex --out .\symbols.json
rgh mem-bookmarks import --file .\symbols.jsonThe exported JSON keeps the user-facing version, module, and symbols shape, with name, RVA, and type on each symbol entry. rgh mem-bookmarks import --file .\symbols.json accepts either IDA or Ghidra sidecars. This slice is function-name only and stays on the exact-address or module/RVA workflow; it does not include comments or PDB data.
If your app needs visible console-side feedback, use XeCLI as the notification layer rather than hardcoding icon IDs in multiple places.
Examples:
rgh notify "Build finished" 14
rgh notify "Patch applied" 16
rgh notify "Download complete" 55
rgh led set --preset quadrant1For custom frontends, a practical pattern is:
- keep your own message text in the host app
- call XeCLI with a known icon ID or preset
- show the same event in your host UI and on the console
Read XNotify.md for the icon reference and direct usage guidance.
The active XeCLI configuration directory is %APPDATA%\XeCLI when installed, package-local UserData in portable mode, or the directory selected by XECLI_HOME. It can contain:
config.json-
titleids.csv(optional user metadata) -
titleids.discovered.csv(XeCLI-generated live-name cache) -
titleids.local.csv(legacy compatibility)
If you build another tool around XeCLI, do not hardcode machine-specific paths. Resolve config and asset paths relative to the XeCLI executable or the active configuration directory.
If you ship XeCLI beside another tool, prefer resolving:
- executable folder for optional
ConsoleDependencies/and shippedAssets/,ghidra_scripts/, andida_scripts/ - the active configuration directory for runtime overrides
- the configured
titleids.csv/TXT path for user-specific metadata
Use XeCLI directly when:
- you want stable command names
- you need live XBDM/JRPC2/FTP coordination
- you want consistent metadata parsing and Ghidra/IDA flows
- you need a tool that can still be used manually in terminal
Reimplement only if:
- you need a library API instead of a process boundary
- you need your own transport and retry behavior
- your application cannot tolerate CLI process orchestration
| Need | Recommended XeCLI entry point |
|---|---|
| Live status card | rgh status --json |
| Active title badge | rgh title --json |
| Signed-in user badge | rgh signin state --json |
| Notification banner on console | rgh notify |
| Session/hardware indicator | rgh led set |
| File pull/push |
rgh ftp ... or rgh fs ...
|
| Command-file workflow |
rgh script run <FILE> --dry-run, followed by an explicitly approved --allow-live run |
| Offline transcript review | rgh script replay <TRANSCRIPT> --dry-run |
| Saved target preflight |
rgh target-saved validate --json, rgh target-saved use <NAME> --json, rgh health --json
|
| Structured console report |
rgh report --format json, optionally with rgh report-profile
|
| Offline report comparison | rgh report --left <FILE> --right <FILE> --format json |
| Transfer preview |
rgh ftp put ... --dry-run --json or rgh ftp sync ... --dry-run --json
|
| Memory snapshot comparison |
rgh mem map --json, rgh mem compare, or rgh mem dump-compare --json
|
| Symbol/bookmark exchange |
rgh ida export-symbols or rgh ghidra export-symbols, then rgh mem-bookmarks import
|
| Storage patch review |
rgh xtaf patch plan, then rgh xtaf patch apply ... --dry-run --json
|
| Audit and support artifacts |
rgh log export, rgh diagnostics bundle, or rgh support bundle
|
| Shell completion |
rgh completion powershell, rgh completion bash, or rgh completion zsh
|
| Running-XEX acquisition | rgh xex dump |
| Decompile pipeline |
rgh ghidra decompile + rgh ghidra verify --json or rgh ida decompile + rgh ida verify --json
|
| Save backup/import |
rgh save extract / rgh save inject
|
XeCLI documentation for the rgh command. For release downloads, use the latest release.