Upload your Slay the Spire 2 runs to mbgg analytics server
Project description
mbgg-sts2-uploader
Simple command-line tool to upload your Slay the Spire 2 run history to the mbgg analytics server.
Features
✅ Automatic discovery - Finds your run files automatically ✅ Smart duplicate detection - Only uploads runs that aren't already on the server ✅ Steam ID detection - Automatically extracts your Steam ID from the file path ✅ Cross-platform - Works on macOS and Windows ✅ Secure - Uses access code authentication ✅ Fast - Checks hashes before uploading to save bandwidth
Installation
pip install mbgg-sts2-uploader
That's it! No other dependencies needed.
Usage
Basic Upload (prompts for access code)
mbgg-sts2-upload --server https://mbgg-api.up.railway.app
Upload with access code
mbgg-sts2-upload --server https://mbgg-api.up.railway.app --access-code YOUR_SECRET_CODE
Dry run (see what would be uploaded)
mbgg-sts2-upload --dry-run
All options
mbgg-sts2-upload --help
How It Works
- Finds run files - Searches your STS2 save directory for
.runfiles - Extracts Steam ID - Gets your Steam ID from the directory structure
- Computes hashes - Calculates SHA256 hash of each run file
- Checks server - Asks server which runs it already has
- Uploads missing runs - Only uploads runs that aren't already on the server
File Locations
macOS
~/Library/Application Support/SlayTheSpire2/steam/{STEAM_ID}/profile*/saves/history/*.run
Windows
%APPDATA%/SlayTheSpire2/steam/{STEAM_ID}/profile*/saves/history/*.run
Example Output
======================================================================
STS2 RUN UPLOADER
======================================================================
Platform: darwin
Game directory: /Users/you/Library/Application Support/SlayTheSpire2
Server: http://localhost:8001
----------------------------------------------------------------------
[1/5] Detecting Steam ID...
✓ Steam ID: 76561198032986989
[2/5] Finding run files...
✓ Found 97 run files
[3/5] Computing file hashes...
✓ Computed 97 hashes
[4/5] Checking server for existing runs...
✓ 10 already uploaded
✓ 87 need to be uploaded
[5/5] Uploading 87 runs...
[1/87] ✓ NECROBINDER A10
[2/87] ✓ NECROBINDER A10
...
======================================================================
UPLOAD COMPLETE
======================================================================
Total runs found: 97
Already on server: 10
Newly uploaded: 87
Errors: 0
======================================================================
✓ Upload successful!
View stats at: http://localhost:8000
Troubleshooting
"Could not find Steam ID"
Make sure you've played at least one game of Slay the Spire 2.
"No run files found"
Check that the game is installed and you have save files.
"Access denied: Invalid access code"
Your access code is incorrect. Get the correct code from the server admin.
"Connection refused"
Make sure the server is running and accessible.
For Server Admins
Setting the Access Code
The access code is configured in the backend .env file:
UPLOAD_ACCESS_CODE=your_secret_code_here
Important: Keep this code private! Share it only with users you want to allow uploads.
Distributing the Uploader
You can share sts2_uploader.py with your friends. They just need:
- Python 3.7+
requestslibrary (pip install requests)- The access code (share privately)
Security Notes
- The access code is sent in the
X-Access-Codeheader - Run data is transmitted as JSON (not binary)
- Duplicate detection prevents re-uploading the same run
- Each run is associated with the uploader's Steam ID
Privacy
- The uploader sends your Steam ID (extracted from file path)
- Run history data (deck, relics, choices, outcomes)
- No other personal information is collected
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file mbgg_sts2_uploader-0.1.0.tar.gz.
File metadata
- Download URL: mbgg_sts2_uploader-0.1.0.tar.gz
- Upload date:
- Size: 6.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
195448e499152993e9fc4850290a90e98e5a06593da0f9e7df0caf54f0dc0300
|
|
| MD5 |
3cd69cb27e01f01d007722ab44fc122c
|
|
| BLAKE2b-256 |
bc0d8b0ad55f976b863c7e81e5fd7bf93523cc0fa52eb9fcaf65324fbcc8825d
|
File details
Details for the file mbgg_sts2_uploader-0.1.0-py3-none-any.whl.
File metadata
- Download URL: mbgg_sts2_uploader-0.1.0-py3-none-any.whl
- Upload date:
- Size: 6.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
852780a06f60adf4acfea9f71d3a1b01f1d885beaaa13b6944ff269e57b04724
|
|
| MD5 |
b6f7c73af03f868ac6f521481d6b82db
|
|
| BLAKE2b-256 |
9c1c8fa6dd96e2dcbf1a6b1aefd6e233dc458e3d5836be974488dcd008e68a24
|