Communitygithub.com

Slay the Spire 2 CLI Anything

ステートフルなコマンドラインインターフェースで、『Slay the Spire 2』の実際のゲームをローカルのSTS2_Bridge Mod経由で制御します。

Slay the Spire 2 CLI Anything とは?

このスキルは、『Slay the Spire 2』のゲームプレイをAIエージェントが直接操作できるようにするステートフルCLIツールです。`STS2_Bridge` Modがゲーム内で動作し、`localhost:15526`のHTTP APIを通じて、正規化されたゲーム状態の読み取りとアクションコマンドの送信を行います。エージェントはまず`state`コマンドで現在のゲーム画面(例えば戦闘中、報酬選択、イベントなど)を把握し、その状態に応じた適切なコマンドを実行できます。これにより、戦闘でのカードプレイやポーション使用、マップ選択、ショップでの購入といった一連の操作を自動化できます。Claude Code、Cursor、Codexなど、CLI経由でスクリプトを実行できるあらゆるAIエージェントプラットフォームで利用可能で、`decision`フィールドに基づいて状態遷移を管理することで、人間の介入なしにゲームをエンドツーエンドで攻略できます。

対応~Claude Code~Codex CLI~Cursor
npx skills add https://github.com/HKUDS/CLI-Anything/tree/main/skills/cli-anything-slay-the-spire-ii

お気に入りのAIに質問する

このエージェントスキルを事前に読み込んだ状態で新しいチャットを開きます。

ドキュメント

Slay the Spire 2 CLI Anything は何をしますか?

Steam版『Slay the Spire 2』をローカルのSTS2_Bridge Modを通じて制御するためのステートフルなコマンドラインインターフェースです。このCLIは、正規化されたゲーム状態を読み取り、localhost:15526のローカルHTTP APIを介してアクションコマンドを送信します。

インストール

このCLIを使用するには、ゲームプロセス内で動作するブリッジModが必要です。CLIとブリッジはどちらも同じリポジトリから配布されています。

https://github.com/HKUDS/CLI-Anything

1. CLIのインストール

git clone https://github.com/HKUDS/CLI-Anything.git
cd CLI-Anything/slay_the_spire_ii/agent-harness
pip install -e .

2. ブリッジModのビルドとインストール

ブリッジModは.NET 9プラグインであり、コンパイルしてゲームディレクトリにインストールする必要があります。完全な手順はリポジトリのREADMEにありますが、簡易版は以下の通りです。

cd CLI-Anything/slay_the_spire_ii/agent-harness/bridge/plugin
./build.sh
cd ../install
./install_bridge.sh

ビルドスクリプトがゲームデータディレクトリを自動検出できない場合は、STS2_GAME_DATA_DIRを明示的に設定してください。

STS2_GAME_DATA_DIR="/path/to/data_sts2" ./build.sh

3. Modを有効にして確認

SteamでSlay the Spire 2を起動し、ModマネージャーでSTS2_Bridge Modを有効にした後、接続を確認します。

cli-anything-sts2 state

JSONが返ってくれば、CLIとブリッジは接続されています。

前提条件:

  • Python 3.10+
  • Slay the Spire 2 (Steam) でSTS2_Bridge Modが有効になっていること
  • .NET 9 SDK(ブリッジModのビルドにのみ必要)

使用方法

基本コマンド

# 正規化されたゲーム状態を読み取る(常にここから開始)
cli-anything-sts2 state

# 対話型REPLモードで起動(デフォルト)
cli-anything-sts2

# 使用可能な全コマンドを表示
cli-anything-sts2 --help

コマンドグループ

状態確認

コマンド説明
statedecisionフィールドを含む正規化された状態
raw-stateブリッジの生のJSON

メインメニュー

コマンド説明
continue-game保存されたランを続行
start-game --character IRONCLAD --ascension 0新しいランを開始
abandon-game現在のセーブを破棄
return-to-main-menu任意の画面からメニューに戻る

キャラクター: IRONCLAD, SILENT, DEFECT, NECROBINDER, REGENT

戦闘

コマンド説明
play-card <index> [--target <enemy_id>]手札からカードをプレイ
use-potion <slot> [--target <enemy_id>]ポーションを使用
end-turn現在のターンを終了

マップと部屋の移動

コマンド説明
choose-map <index>マップノードを選択
proceed現在の部屋を離れる

報酬

コマンド説明
claim-reward <index>戦闘報酬を受け取る
pick-card-reward <index>カード報酬を選択
skip-card-rewardカード報酬をスキップ
claim-treasure-relic <index>宝箱のレリックを受け取る
select-relic <index>レリックを選択
skip-relic-selectionレリック選択をスキップ

イベントと休憩場所

コマンド説明
event <index>イベントの選択肢を選ぶ
advance-dialogueダイアログのみのイベントを進める
rest <index>キャンプファイヤーのアクションを選ぶ

ショップ

コマンド説明
shop-buy <index>ショップで購入

カード/レリック選択オーバーレイ

コマンド説明
select-card <index>オーバーレイでカードを選択
confirm-selection現在の選択を確定
cancel-selection現在の選択をキャンセル
combat-select-card <index>戦闘オーバーレイ中にカードを選択
combat-confirm-selection戦闘カードの選択を確定

生のアクション

コマンド説明
action <name> --kv key=value生のブリッジアクションを送信

決定状態

stateコマンドは、現在のゲーム画面を示すdecisionフィールドを含むJSONを返します。この値に基づいて次のコマンドを決定してください。

決定意味次に使用する典型的なコマンド
menuメインメニューcontinue-game, start-game
combat_play戦闘中、自分のターンplay-card, use-potion, end-turn
hand_selectカード選択オーバーレイcombat-select-card, combat-confirm-selection
map_selectマップノード選択choose-map
game_overラン終了return-to-main-menu
combat_rewards戦闘後報酬claim-reward, proceed
card_rewardカード報酬選択pick-card-reward, skip-card-reward
event_choiceイベント画面event, advance-dialogue
rest_siteキャンプファイヤーrest
shopショップ画面shop-buy, proceed
card_selectカード選択画面select-card, confirm-selection
relic_selectレリック選択select-relic, skip-relic-selection
treasure宝の部屋claim-treasure-relic, proceed

設定

オプションデフォルト値説明
--base-urlhttp://localhost:15526ブリッジAPIのURL
--timeout10.0HTTPタイムアウト(秒)

AIエージェント向け

  1. 常に最初にstateを読み取り、decisionフィールドを取得してください。
  2. 各アクションの後にstateを再読み取りしてください。戦闘中はインデックスやエネルギーが変化します。
  3. リターンコードを確認してください。0は成功、非ゼロはエラーです。
  4. stdoutをパースしてJSON出力を取得してください。

Individual skills in this repo

This repo contains 20 individual skills — each has its own dedicated page.

cli-anything-adguardhome

>-

cli-anything-anygen

>-

cli-anything-audacity

>-

cli-anything-blender

>-

cli-anything-browser

Browser automation CLI using DOMShell MCP server. Maps Chrome

cli-anything-calibre

>-

cli-anything-ccswitch

CLI interface for CC Switch — manage AI coding tool configurations from the terminal

cli-anything-chromadb

>-

cli-anything-cloudanalyzer

Command-line interface for CloudAnalyzer — Agent-friendly harness for CloudAnalyzer, a QA platform for mapping, localization, and perception outputs. Supports 27 commands across 8 groups: point cloud evaluation, trajectory evaluation, ground segmentation QA, config-driven quality gates, baseline evolution, processing, visualization, and interactive REPL.

cli-anything-cloudcompare

Command-line interface for CloudCompare — Agent-friendly harness for CloudCompare, the open-source 3D point cloud and mesh processing software. Supports 41 commands across 9 groups: project management, session control, point cloud operations (subsample, filter, segment, analyze), mesh operations, distance computation (C2C, C2M), transformations (ICP, matrix), export (LAS/LAZ/PLY/PCD/OBJ/STL/E57), and interactive REPL.

cli-anything-comfyui

>-

cli-anything-dify-workflow

Wrapper for the Dify workflow DSL CLI. Create, inspect, validate, edit, and export Dify workflow files through a CLI-Anything harness.

cli-anything-drawio

>-

cli-anything-eez-studio

Use EEZ Studio from the command line: inspect and modify native .eez-project files, edit LVGL screens/widgets, manage SCPI commands, and invoke the real EEZ Studio backend for LVGL builds.

cli-anything-eth2-quickstart

>-

cli-anything-exa

>-

cli-anything-firefly-iii

Firefly III CLI - Personal finance management via CLI-Anything

cli-anything-freecad

Complete CLI harness for FreeCAD parametric 3D CAD modeler (258 commands). Covers ALL workbenches: Part (29 primitives + boolean + mirror + loft + sweep), Sketcher (26 cmds: geometry + constraints + editing), PartDesign (38 cmds: pad/pocket/groove/fillet/chamfer/patterns/hole/datum), Assembly (11 cmds), Mesh (16 cmds), TechDraw (15 cmds: views + dimensions + PDF/SVG), Draft (33 cmds: 2D shapes + arrays + transforms), FEM (12 cmds), CAM/CNC (10 cmds), Surface (6 cmds), Spreadsheet (7 cmds), Import (13 formats), Export (17 formats), Measure (12 cmds), Materials (21 presets). Headless FreeCAD export to STEP/IGES/STL/OBJ/DXF/PDF/glTF/3MF.

cli-anything-gimp

>-

cli-anything-godot

>-

関連スキル