Interactive prompt that executes cheat commands. Lives in src/modules/cli/cliInterface.js and runs alongside the web server.
- The injector evaluates
getAutoCompleteSuggestions.call(context)in the game context. - Suggestions map to Enquirer autocomplete choices, with
messageincluding the description. - The prompt loops until exit; selecting a command runs
cheat.call(context, '<action>'). - The CLI starts after first successful injection and shares the CDP Runtime client with the UI.
Any cheat registered in src/cheats/ appears in both CLI and UI.
- Filtering checks both command value and description.
- Case-insensitive with multi-word matching (space-separated tokens must all match).
- Parameterized commands show a
[+param]hint (e.g.,buy [+param] (Purchase items)). - First match selected by default when input is empty.
- Custom commands not in the list are appended and executed as-is.
History of executed commands during the session:
- Ctrl+Up: Navigate backwards through previous commands.
- Ctrl+Down: Navigate forwards (clears input at end).
- Consecutive duplicates not stored.
- Autocomplete updates as you scroll through history.
Commands with parameters set needsParam in registration. The CLI asks for a second Enter to confirm.
Example flow (command with a parameter):
Action: buy
<press Enter> -> the prompt locks to "buy" so you can append parameters
Action: buy bun_c
<press Enter> -> command executes
The final string passes as a single action; enter multi-word parameters exactly as needed.
chromedebug is a CLI-only command that opens DevTools for the current CDP target:
- Uses the same CDP port as the injector (default
32123). - Windows uses
start, macOS usesopen, Linux usesxdg-open. - Builds the DevTools URL from
Target.getTargetInfo()and includesexperiment=true.
- Successful commands log the result string from the cheat.
- Errors print with context so the prompt continues.
- Auto-recovers from prompt errors by retrying after a short delay.
- If autocomplete fails to load, the CLI stops (usually injection issues).
- Use keywords from command name or description for faster filtering.
- Add frequent cheats to
startupCheatsinconfig.custom.jsfor auto-execution. - Use
chromedebugto inspect the live game context when debugging. - If autocomplete fails, verify injection succeeded and the UI is reachable.