@hotrepl/cli
v3.0.0
Published
HotRepl v2 command-line client — inspect and automate a running Unity game's REPL from your shell.
Maintainers
Readme
@hotrepl/cli
Command-line interface for HotRepl. Talk to a running Unity game from your shell — eval C#, invoke typed commands, inspect the journal, stream watch frames, read artifacts.
Requirements
- A Unity game running the HotRepl plugin (BepInEx/Mono) or mod (MelonLoader/IL2CPP). The plugin
opens
ws://127.0.0.1:18590by default. - Node (the published binary uses
#!/usr/bin/env node).
Run it without installing
bunx @hotrepl/cli info # or: npx -y @hotrepl/cli info
bunx @hotrepl/cli eval 'UnityEngine.Application.productName'Install globally
bun add -g @hotrepl/cli # or: npm install -g @hotrepl/cli
hotrepl infoCommands
hotrepl info # handshake summary
hotrepl wait # block until backend is reachable
hotrepl doctor # quick self-check
hotrepl eval '<C# expr>' # evaluate C# on the game's main thread
hotrepl reset # reset evaluator state
hotrepl complete '<prefix>' [N] # completions for partial C#
hotrepl run <name> '<json args>' # invoke a typed command
hotrepl describe <name> # show a command's schema
hotrepl artifacts read <ref> # read and verify an artifact
hotrepl journal [--limit N] # recent eval/command history
hotrepl watch '<C# expr>' # stream frame-by-frame valuesGlobal flags: --format text|json|jsonl, --json (alias), --jsonl (alias),
--url ws://host:port, --limit N.
Environment
| Variable | Effect |
| ------------- | --------------------------------------------- |
| HOTREPL_URL | Backend URL (default ws://127.0.0.1:18590). |
Exit codes
The CLI follows sysexits.h: 0
success, 2 validation/invalid request, 69 backend unreachable, 70 internal failure, 75
session evicted, 76 artifact corrupted. Full mapping in
packages/cli/src/exit-codes.ts.
Reference
- Repository: github.com/glockyco/HotRepl
- Protocol reference:
docs/control-plane-protocol.md - Sibling packages:
@hotrepl/sdkfor programmatic use,@hotrepl/mcpfor agent tooling. - Issues: github.com/glockyco/HotRepl/issues
License
MIT
