Windows utility for CS2 server admins. Natural language → Claude (LLM) → SSH or Azure API. Produces a single self-contained .exe — the recipient installs nothing and configures nothing.
- Chat UI: admin types "switch to dust2", "enable practice mode", "turn off the server for today"
- Claude interprets intent and calls the appropriate tool
- CS2 commands sent via SSH using
screen -S cs2 -X stuff '<cmd>\n' - VM power via Azure Compute SDK (start / deallocate only)
- All credentials (SSH key, Azure SP, Anthropic key) baked into the exe at build time
config.json (all secrets) ──► build.bat ──► CS2AdminTool.exe (single file, no deps)
- SSH private key: stored as string content in config.json; Paramiko reads it via StringIO (no file on disk)
- Azure: uses
ClientSecretCredential(Service Principal) — noaz loginneeded on end-user's machine - Anthropic: API key in config.json
- PyInstaller
--add-data "config.json;."bundles it into the exe; at runtime it's extracted tosys._MEIPASS
The tool connects as a dedicated cs2bot Linux user (not as cs2admin).
cs2bot can ONLY:
- Run
screencommands ascs2admin— sends CS2 game console commands - Run
start_cs2.shascs2admin— starts/restarts the CS2 server
cs2bot CANNOT:
- Read any cs2admin files or secrets
- Run arbitrary commands as cs2admin
- Touch anything in the OS outside these two allowed commands
- Access Azure (that goes through the SP, not SSH)
The private key for cs2bot is a fresh key generated specifically for this tool.
The cs2admin RSA key (the original deploy key) never leaves the build machine.
- Python 3.11+ with pip
- Azure CLI installed and
az logindone (only needed during build setup, not by end users)
ssh -i ~/.ssh/cs2_azure_rsa cs2admin@20.217.204.123
bash <(cat scripts/setup_cs2bot.sh)Or copy the script to the server and run it. It:
- Creates the
cs2botLinux user - Generates a fresh RSA key pair for cs2bot
- Configures sudoers (screen + start_cs2.sh as cs2admin only)
- Prints the private key — save it to a file (e.g.
cs2bot_rsa.txt)
prepare_config.batThis script:
- Reads the cs2bot private key from the file you saved in Step 0
- Creates an Azure Service Principal with "Virtual Machine Contributor" role on
cs2-server-rg - Prompts for your Anthropic API key
- Writes
config.jsonwith everything filled in
build.batProduces dist\CS2AdminTool.exe — fully self-contained, distributable as-is.
Send CS2AdminTool.exe to the admin. They double-click it. Done.
pip install -r requirements.txt
cp config.example.json config.json
# Fill in config.json manually (SSH key content, SP creds, Anthropic key)
cd src && python main.pysrc/
main.py — Tkinter dark-themed chat UI
llm_brain.py — Claude API + tool-use loop, maintains conversation history
cs2_controller.py — Paramiko SSH (key from string, not file)
azure_controller.py — Azure ClientSecretCredential + start/deallocate only
config.py — Reads from sys._MEIPASS (exe) or project root (dev)
| Tool | What it does |
|---|---|
change_map |
changelevel <map> via screen — instant, no restart |
change_mode |
Restarts CS2 with start_cs2.sh <mode> <map> |
set_cvar |
Any server cvar via screen |
restart_round |
mp_restartgame 1 |
apply_practice_settings |
sv_cheats, inf ammo, inf money, grenade cam, no freeze time |
start_server |
bash ~/start_cs2.sh <mode> <map> |
stop_server |
screen -S cs2 -X quit |
restart_server |
stop + start |
power_on_vm |
Azure begin_start() |
power_off_vm |
Azure begin_deallocate() |
get_status |
VM power state + CS2 screen session check |
- IP:
20.217.204.123(update config.json if redeployed) - SSH user:
cs2bot(limited service account), RSA key generated bysetup_cs2bot.sh - Screen session:
cs2(owned by cs2admin; cs2bot accesses it viasudo -u cs2admin screen ...) - Start script:
~/start_cs2.sh <mode> <map>— handles LD_LIBRARY_PATH + steamclient.so - Azure: subscription
a34ed8a9-5b4b-4cb7-86b9-4df40f982fcf, RGcs2-server-rg, VMcs2-server-vm - GSLT:
F5C3D0A189D0DCC0DF6CC3E53FE495EC(regenerate at steamcommunity.com/dev/managegameservers if broken)
- Name:
cs2-admin-tool - Role:
Virtual Machine Contributorscoped to/subscriptions/.../resourceGroups/cs2-server-rg - Cannot read/write anything else in Azure
- Client secret expires — if VM power stops working, re-run
prepare_config.batand rebuild