cli-anything-slay-the-spire-ii
Original:🇺🇸 English
Translated
Command-line interface for Slay the Spire 2 - Control the real game through a local bridge mod HTTP API. Reads normalized game state and sends action commands for combat, navigation, rewards, and menu management.
4installs
Sourcehkuds/cli-anything
Added on
NPX Install
npx skill4agent add hkuds/cli-anything cli-anything-slay-the-spire-iiTags
Translated version includes tags in frontmatterSKILL.md Content
View Translation Comparison →cli-anything-slay-the-spire-ii
A stateful command-line interface for controlling the real Slay the Spire 2
game through the local mod. The CLI reads normalized game state
and sends action commands via a local HTTP API at .
STS2_Bridgelocalhost:15526Installation
This CLI requires a bridge mod that runs inside the game process. Both the CLI
and the bridge are distributed from the same repository:
https://github.com/HKUDS/CLI-Anything1. Install the CLI
bash
git clone https://github.com/HKUDS/CLI-Anything.git
cd CLI-Anything/slay_the_spire_ii/agent-harness
pip install -e .2. Build and install the bridge mod
The bridge mod is a plugin that must be compiled and installed into
the game directory. Full instructions are in the repository README, but the
short version is:
.NET 9bash
cd CLI-Anything/slay_the_spire_ii/agent-harness/bridge/plugin
./build.sh
cd ../install
./install_bridge.shIf the build script cannot auto-detect the game data directory, set
explicitly:
STS2_GAME_DATA_DIRbash
STS2_GAME_DATA_DIR="/path/to/data_sts2" ./build.sh3. Enable the mod and verify
Launch Slay the Spire 2 via Steam, enable the mod in the mod
manager, then verify the connection:
STS2_Bridgebash
cli-anything-sts2 stateIf this returns JSON, the CLI and bridge are connected.
Prerequisites:
- Python 3.10+
- Slay the Spire 2 (Steam) with mod enabled
STS2_Bridge - (only needed to build the bridge mod)
.NET 9 SDK
Usage
Basic Commands
bash
# Read normalized game state (always start here)
cli-anything-sts2 state
# Start interactive REPL mode (default)
cli-anything-sts2
# Show all available commands
cli-anything-sts2 --helpCommand Groups
State Inspection
| Command | Description |
|---|---|
| Normalized state with |
| Raw bridge JSON |
Main Menu
| Command | Description |
|---|---|
| Continue a saved run |
| Start a new run |
| Abandon the current save |
| Return to menu from any screen |
Characters: , , , ,
IRONCLADSILENTDEFECTNECROBINDERREGENTCombat
| Command | Description |
|---|---|
| Play a card from hand |
| Use a potion |
| End the current turn |
Map & Room Flow
| Command | Description |
|---|---|
| Select a map node |
| Leave the current room |
Rewards
| Command | Description |
|---|---|
| Claim a combat reward |
| Pick a card reward |
| Skip the card reward |
| Claim a treasure relic |
| Select a relic |
| Skip relic selection |
Events & Rest Sites
| Command | Description |
|---|---|
| Choose an event option |
| Advance dialogue-only events |
| Choose a campfire action |
Shop
| Command | Description |
|---|---|
| Buy from the shop |
Card/Relic Selection Overlays
| Command | Description |
|---|---|
| Select a card in overlay |
| Confirm the current selection |
| Cancel the current selection |
| Select a card during combat overlay |
| Confirm combat card selection |
Raw Action
| Command | Description |
|---|---|
| Send a raw bridge action |
Decision States
The command returns JSON with a field indicating the current
game screen. Route your next command based on this value:
statedecision| Decision | Meaning | Typical Next Commands |
|---|---|---|
| Main menu | |
| In combat, your turn | |
| Card selection overlay | |
| Map node selection | |
| Run ended | |
| Post-combat rewards | |
| Card reward pick | |
| Event screen | |
| Campfire | |
| Shop screen | |
| Card selection screen | |
| Relic selection | |
| Treasure room | |
Configuration
| Option | Default | Description |
|---|---|---|
| | Bridge API URL |
| | HTTP timeout in seconds |
For AI Agents
- Always read first to get the
statefielddecision - 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