cli-anything-slay-the-spire-ii
A stateful command-line interface for controlling the real Slay the Spire 2
game through the local STS2_Bridge mod. The CLI reads normalized game state
and sends action commands via a local HTTP API at localhost:15526.
Installation
This CLI requires a bridge mod that runs inside the game process. Both the CLI and the bridge are distributed from the same repository:
1. Install the CLI
2. Build and install the bridge mod
The bridge mod is a .NET 9 plugin that must be compiled and installed into
the game directory. Full instructions are in the repository README, but the
short version is:
If the build script cannot auto-detect the game data directory, set
STS2_GAME_DATA_DIR explicitly:
3. Enable the mod and verify
Launch Slay the Spire 2 via Steam, enable the STS2_Bridge mod in the mod
manager, then verify the connection:
If this returns JSON, the CLI and bridge are connected.
Prerequisites:
- Python 3.10+
- Slay the Spire 2 (Steam) with
STS2_Bridgemod enabled .NET 9 SDK(only needed to build the bridge mod)
Usage
Basic Commands
Command Groups
State Inspection
Main Menu
Characters: IRONCLAD, SILENT, DEFECT, NECROBINDER, REGENT
Combat
Map & Room Flow
Rewards
Events & Rest Sites
Shop
Card/Relic Selection Overlays
Raw Action
Decision States
The state command returns JSON with a decision field indicating the current
game screen. Route your next command based on this value:
Configuration
For AI Agents
- Always read
statefirst to get thedecisionfield - Re-read state after each action - indices and energy change during combat
- Check return codes - 0 for success, non-zero for errors
- Parse stdout for JSON output




