CLI-Anything >-
install
source · Clone the upstream repo
git clone https://github.com/HKUDS/CLI-Anything
Claude Code · Install into ~/.claude/skills/
T=$(mktemp -d) && git clone --depth=1 https://github.com/HKUDS/CLI-Anything "$T" && mkdir -p ~/.claude/skills && cp -r "$T/slay_the_spire_ii/agent-harness/cli_anything/slay_the_spire_ii/skills" ~/.claude/skills/hkuds-cli-anything-d134a4 && rm -rf "$T"
manifest:
slay_the_spire_ii/agent-harness/cli_anything/slay_the_spire_ii/skills/SKILL.mdsource content
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:
https://github.com/HKUDS/CLI-Anything
1. Install the CLI
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
.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:
cd CLI-Anything/slay_the_spire_ii/agent-harness/bridge/plugin ./build.sh cd ../install ./install_bridge.sh
If the build script cannot auto-detect the game data directory, set
STS2_GAME_DATA_DIR explicitly:
STS2_GAME_DATA_DIR="/path/to/data_sts2" ./build.sh
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:
cli-anything-sts2 state
If this returns JSON, the CLI and bridge are connected.
Prerequisites:
- Python 3.10+
- Slay the Spire 2 (Steam) with
mod enabledSTS2_Bridge
(only needed to build the bridge mod).NET 9 SDK
Usage
Basic Commands
# 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 --help
Command Groups
State Inspection
| Command | Description |
|---|---|
| Normalized state with field |
| 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:
IRONCLAD, SILENT, DEFECT, NECROBINDER, REGENT
Combat
| 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
state command returns JSON with a decision field indicating the current
game screen. Route your next command based on this value:
| 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 thestate
fielddecision - 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