You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on May 11, 2026. It is now read-only.
> Point it at a game folder. It figures out the AppID, pulls DLC metadata, backs up the original `steam_api.dll` files, drops in Goldberg's replacements, and strips SteamStub DRM automatically.
26
+
27
+
## 📋 Table of Contents
28
+
-[🚀 What it does](#-what-it-does)
29
+
-[📦 Installation](#-installation)
30
+
-[🛠️ Usage](#️-usage)
31
+
-[⚙️ How it works](#️-how-it-works)
32
+
-[🔍 AppID detection](#-appid-detection)
33
+
-[📦 DLC metadata](#-dlc-metadata)
34
+
-[🛡️ SteamStub detection](#️-steamstub-detection)
35
+
-[🛠️ Patching](#️-patching)
36
+
-[🩹 Restore](#-restore)
37
+
-[📂 Storage & Caching](#-storage--caching)
38
+
-[🛠️ Troubleshooting](#️-troubleshooting)
39
+
-[💻 Development](#-development)
40
+
-[⚖️ Disclaimer](#️-disclaimer)
41
+
42
+
## 🚀 What it does
22
43
`steamlayer` automates the tedious manual work of setting up game environments. It handles AppID discovery, DLC metadata fetching, DLL swapping, and SteamStub stripping in a single pass—all while keeping your original files safe in a managed vault.
23
44
45
+
* 🔍 **Smart Discovery:** Automatically filters out release tags (FitGirl, RUNE, etc.) and version numbers to find the correct AppID.
46
+
* 📦 **DLC Support:** Automatically generates DLC lists for the emulator.
47
+
* 🛡️ **SteamStub Stripping:** Detects and unwraps DRM using Steamless.
48
+
* 🔒 **Safe-by-Design:** Atomic restores ensure your game files can always be returned to their original state.
49
+
24
50
> [!WARNING]
25
51
> steamlayer is under active development and not yet production-ready. Expect rough edges, and always keep `--restore` in mind.
26
52
27
53
28
-
## Installation
29
-
30
-
```bash
31
-
pip install steamlayer
32
-
```
33
-
34
-
Or with pipx if you want it isolated:
35
-
36
-
```bash
37
-
pipx install steamlayer
38
-
```
39
-
54
+
## 📦 Installation
40
55
**Requirements:**
41
56
* Python 3.13+
42
57
* Windows
43
58
* 7-Zip somewhere on your system for the very first run (after that steamlayer manages its own copy).
44
59
45
-
## Usage
46
-
47
60
```bash
48
-
steamlayer "C:\Games\Portal 2"
61
+
pip install steamlayer
49
62
```
50
63
51
-
That's the common case. It'll do everything automatically. If AppID detection gets it wrong, pass it explicitly:
64
+
## 🛠️ Usage
52
65
53
-
```bash
54
-
steamlayer "C:\Games\Portal 2" --appid 620
55
-
```
66
+
<details>
67
+
<summary><b>📋 View All CLI Options</b></summary>
56
68
57
-
Not sure what it's going to do? Run with `--dry-run` first:
69
+
| Flag | Description |
70
+
|---|---|
71
+
|`-a`, `--appid <id>`| Skip auto-detection and use this AppID |
72
+
|`-d`, `--dry-run`| Show what would happen, don't touch anything |
73
+
|`-n`, `--no-network`| Use cached data only, no requests |
74
+
|`-r`, `--restore`| Put the original DLLs back and clean up |
75
+
|`-u`, `--unpack`| Auto-strip SteamStub DRM via Steamless before patching |
> Swapping Steam DLLs looks suspicious enough that Defender will sometimes quarantine Goldberg's or Steamless's files mid-download. The exclusion keeps that from happening. It only covers this one folder, nothing else on your system.
85
108
109
+
## ⚙️ How it works
110
+
### 🔍 AppID detection
111
+
checks for `steam_appid.txt` or `.acf` manifest files in the game folder first. If nothing's there, it searches a locally-cached community index, then falls back to the Steam store API. If two results look equally likely, it asks you to pick. Pass `--yolo` to lower the confidence threshold (useful for sequels or non-standard folder names).
112
+
86
113
---
87
114
88
-
### All options
115
+
### 📦 DLC metadata
116
+
fetches the DLC list from the Steam API and resolves names using the same community index. Anything missing from the index gets looked up individually. Results are cached for a week so repeat runs are fast. ⚡
89
117
90
-
| Flag | Description |
91
-
|---|---|
92
-
| `-a`, `--appid <id>` | Skip auto-detection and use this AppID |
93
-
| `-d`, `--dry-run` | Show what would happen, don't touch anything |
94
-
| `-n`, `--no-network` | Use cached data only, no requests |
95
-
| `-r`, `--restore` | Put the original DLLs back and clean up |
96
-
| `-u`, `--unpack` | Auto-strip SteamStub DRM via Steamless before patching |
| `--no-defender-check` | Skip the Defender warning |
101
-
| `--version` | Print the version and exit |
118
+
---
119
+
120
+
### 🛡️ SteamStub detection
121
+
before patching, steamlayer scans every `.exe` in each DLL's directory for SteamStub DRM. It recognises v1.x (via `SteamDRMP.dll` import) and v3.x (via the `0xCAFEDEAD` header magic in the `.bind` section). If wrapped executables are found and `--unpack` wasn't passed, it warns you. With `--unpack`, Steamless strips the DRM automatically and the original executable is vaulted alongside the DLLs.
122
+
123
+
---
124
+
125
+
### 🛠️ Patching
126
+
finds every `steam_api.dll` and `steam_api64.dll` in the game tree, vaults the originals to `<game>/__original_files__/`, and copies in the right Goldberg DLL (x32 or x64). Config files go in a `steam_settings/` folder next to each DLL, plus a `steam_appid.txt` at the game root. 🏗️
102
127
103
128
---
104
129
105
-
## How it works
130
+
### 🩹 Restore
131
+
moves the vaulted DLLs (and any vaulted executables) back, deletes the `steam_settings/` directories, cleans up loose config files, and removes the vault once it's empty. Safe to re-run if it fails partway through. 🔄
106
132
107
-
**AppID detection** — checks for `steam_appid.txt` or `.acf` manifest files in the game folder first. If nothing's there, it searches a locally-cached community index, then falls back to the Steam store API. If two results look equally likely, it asks you to pick. Pass `--yolo` to lower the confidence threshold (useful for sequels or non-standard folder names).
133
+
---
108
134
109
-
**DLC metadata** — fetches the DLC list from the Steam API and resolves names using the same community index. Anything missing from the index gets looked up individually. Results are cached for a week so repeat runs are fast.
135
+
### 📂 Storage & Caching
136
+
Confines all downloaded tools and caches to `~/.steamlayer/`.
110
137
111
-
**SteamStub detection** — before patching, steamlayer scans every `.exe` in each DLL's directory for SteamStub DRM. It recognises v1.x (via `SteamDRMP.dll` import) and v3.x (via the `0xCAFEDEAD` header magic in the `.bind` section). If wrapped executables are found and `--unpack` wasn't passed, it warns you. With `--unpack`, Steamless strips the DRM automatically and the original executable is vaulted alongside the DLLs.
138
+
`vendors/`: Managed portable installations of 7-Zip, Goldberg, and Steamless. 📥
112
139
113
-
**Patching** — finds every `steam_api.dll` and `steam_api64.dll` in the game tree, vaults the originals to `<game>/__original_files__/`, and copies in the right Goldberg DLL (x32 or x64). Config files go in a `steam_settings/` folder next to each DLL, plus a `steam_appid.txt` at the game root.
**Restore** — moves the vaulted DLLs (and any vaulted executables) back, deletes the `steam_settings/` directories, cleans up loose config files, and removes the vault once it's empty. Safe to re-run if it fails partway through.
**7-Zip bootstrap fails** — steamlayer needs an existing `7z.exe` to pull in its own copy. Make sure it's in `PATH` or installed at the default location (`C:\Program Files\7-Zip\`).
156
+
# 🧹 Lint and format code
157
+
uv run ruff check .
158
+
uv run ruff format .
159
+
```
122
160
123
-
**Wrong game detected** — use `--appid`. You can find the right ID on [SteamDB](https://www.steamdb.info) or in the store URL.
161
+
## 🛠️ Troubleshooting
124
162
125
-
**Defender quarantined something mid-install** — add the exclusion above and re-run. steamlayer will re-download and retry cleanly.
163
+
📦 **7-Zip bootstrap fails** — steamlayer needs an existing `7z.exe` to pull in its own copy. Make sure it's in `PATH` or installed at the default location (`C:\Program Files\7-Zip\`).
126
164
127
-
**SteamStub warning at runtime** — the game executable is wrapped with SteamDRM. Re-run with `--unpack` to strip it automatically, or unpack manually with [Steamless](https://github.com/atom0s/Steamless) first.
165
+
🔍 **Wrong game detected** — use `--appid`. You can find the right ID on [SteamDB](https://www.steamdb.info) or in the store URL.
128
166
129
-
**Game broken after patching** — run `--restore`. If that also fails partway through, run it again — it picks up where it left off.
167
+
🛡️ **Defender quarantined something mid-install** — add the exclusion above and re-run. steamlayer will re-download and retry cleanly.
130
168
131
-
---
169
+
🔐 **SteamStub warning at runtime** — the game executable is wrapped with SteamDRM. Re-run with `--unpack` to strip it automatically, or unpack manually with [Steamless](https://github.com/atom0s/Steamless) first.
132
170
133
-
## Disclaimer
171
+
🩹 **Game broken after patching** — run `--restore`. If that also fails partway through, run it again — it picks up where it left off.
134
172
173
+
## ⚖️ Disclaimer
135
174
This tool is intended for use with software you legitimately own. Use responsibly.
0 commit comments