PxSteamDL
A fast, standalone C++20 library and CLI for downloading RimWorld Steam Workshop items anonymously—a lightweight replacement for:
steamcmd +login anonymous +workshop_download_item 294100 <id>
Built for PyXiion/PxModRim, with bindings for Python (sync + asyncio) and Node.js (with TypeScript types).
Disclaimer: PxSteamDL is not affiliated with or endorsed by Valve. It only downloads public Workshop content that Steam serves to anonymous accounts.
Features
- No
steamcmdor.NETruntime required — talks directly to Steam's CM WebSocket, public Web API, and SteamPipe CDN over HTTPS. - Parallel & incremental — downloads multiple items and chunks concurrently, skips files whose size and SHA-1 already match, and removes deleted files.
- Safe updates — stages each item in a temporary directory (reusing unchanged files via hard links where possible) and swaps it into place atomically, with cross-process file locking on the destination directory.
- Resilient — verifies chunk checksums and retries transient network/CDN errors automatically.
- Cross-platform — supports Linux (x86_64), macOS (arm64), and Windows (x64).
CLI
Prebuilt standalone binaries for Linux x86_64, macOS arm64, and Windows x64 are available on GitHub Releases.
pxsteamdl -o mods 2009463077 818773962
Each item is saved to DIR/<ITEM_ID>/, matching steamcmd's steamapps/workshop/content/294100/<ITEM_ID> layout.
Options
pxsteamdl [-o DIR] [-j PARALLEL_ITEMS] [-t THREADS_PER_ITEM] [--] ITEM_ID...
pxsteamdl --version | -h | --help
| Option | Description |
|---|---|
-o DIR |
Output directory (default: .) |
-j PARALLEL_ITEMS |
Number of items to download concurrently |
-t THREADS_PER_ITEM |
Download threads per item |
-- |
End of options |
-h, --help |
Print usage and exit |
--version |
Print version and exit |
- Ctrl-C stops the batch gracefully: in-flight requests finish, unfinished items are reported as
cancelled, and the process exits with130. Press Ctrl-C a second time to quit immediately. - Exit codes:
0on success,1if any item failed,2on invalid usage,130when interrupted.
Python
pip install pxsteamdl
Prebuilt wheels are published on PyPI (and GitHub Releases) for CPython 3.10–3.14 on Linux x86_64, macOS arm64, and Windows x64. On other platforms, pip builds from source (requires CMake ≥ 3.24 and a C++20 compiler).
Synchronous usage
import pxsteamdl
client = pxsteamdl.Client() # anonymous logon; raises pxsteamdl.Error on failure
def on_resolved(info: pxsteamdl.ItemInfo) -> None:
print(f"queued {info.item_id}: {info.title}" if info.ok else f"{info.item_id}: {info.error}")
def on_progress(p: pxsteamdl.Progress) -> None:
print(f"{p.item_id} {p.title}: {p.unpacked_bytes}/{p.unpacked_total}")
for r in client.download([2009463077, 818773962], "mods", on_resolved=on_resolved, on_progress=on_progress):
print(r.item_id, r.title, r.path if r.ok else f"{r.error_kind.name}: {r.error}")
- Thread-safe & GIL-free:
download()releases the GIL, and oneClientcan be shared across threads. - Cancellation: pass
cancel=pxsteamdl.CancelToken()and calltoken.cancel()from another thread. - Connection settings:
Client(proxy=None, connect_timeout=10, stall_timeout=30)(proxy=""disables any environment proxy).
asyncio usage
AsyncClient runs logon and downloads on worker threads so the event loop stays responsive. Cancelling the task (or hitting asyncio.wait_for) stops the download cleanly and cleans up temporary files before raising CancelledError.
import asyncio
import pxsteamdl
async def main() -> None:
client = await pxsteamdl.AsyncClient.create()
harmony, rest = await asyncio.gather(
client.download([2009463077], "mods"),
client.download([818773962], "mods", on_progress=lambda p: print(p.item_id, p.unpacked_bytes)),
)
try:
await asyncio.wait_for(client.download([2016436324], "mods"), timeout=60)
except asyncio.TimeoutError:
print("timed out; run again to resume")
asyncio.run(main())
Type stubs are included. Full examples are in examples/download.py and examples/download_async.py.
Node.js
npm install pxsteamdl
Prebuilt Node-API addons (Node.js 18+ on Linux x64, macOS arm64, and Windows x64) are bundled in the npm package. When installing from git or on another platform, npm compiles the addon from source (requires CMake, a C++20 compiler, and Node.js 20.17+ / 22.9+ for cmake-js; if npm blocks install scripts on a source build, approve the script or run npm run install inside node_modules/pxsteamdl).
const { Client } = require('pxsteamdl');
const client = await Client.create(); // anonymous logon; rejects with PxSteamDLError on failure
const results = await client.download([2009463077, 818773962], 'mods', {
onResolved: (info) => console.log(info.ok ? `queued ${info.itemId}: ${info.title}` : `${info.itemId}: ${info.error}`),
onProgress: (p) => console.log(`${p.itemId} ${p.title}: ${p.unpackedBytes}/${p.unpackedTotal}`),
});
for (const r of results) {
console.log(r.itemId, r.title, r.ok ? r.path : `${r.errorKind}: ${r.error}`);
}
- Everything is asynchronous and runs off the event loop; one
Clientcan handle concurrentdownload()calls. - Pass an
AbortSignalassignalto cancel a download cleanly. - Item IDs accept numbers,
bigints, or decimal strings. - TypeScript declarations are included in
node/index.d.ts. Seeexamples/download.jsfor a complete example.
C++ Library
Quick example
#include <pxsteamdl/pxsteamdl.hpp>
pxsteamdl::Client client; // anonymous logon; throws pxsteamdl::Error on failure
pxsteamdl::Options options;
options.on_resolved = [](const pxsteamdl::ItemInfo& i) { /* called on calling thread */ };
options.on_progress = [](const pxsteamdl::Progress& p) { /* called from worker threads */ };
for (const auto& r : client.download({2009463077, 818773962}, "mods", options)) {
if (!r.ok()) {
std::fprintf(stderr, "%llu: %s\n", static_cast<unsigned long long>(r.item_id), r.error.c_str());
}
}
download() returns one Result per input ID, in order (duplicate IDs are only downloaded once). See examples/download.cpp for a complete program.
Cancellation & connection options
- Cancellation: pass a
std::stop_tokeninoptions.stop. In-flight chunk requests finish, unfinished items reporterror_kind == ErrorKind::kCancelled(r.cancelled()), and temporary files are cleaned up without touching existing item directories. - Connection settings: pass
pxsteamdl::ClientOptions{ .proxy = ..., .connect_timeout = ..., .stall_timeout = ... }toClient. Leaveproxyunset to use libcurl's environment variables, or set it to""to disable proxying. - Progress bytes:
ProgressandResulttrack bothdownloaded_*(encrypted/compressed bytes over the wire, good for transfer speed) andunpacked_*(bytes written to disk, good for progress bars). Up-to-date items report0.
Error handling
Result::error is human-readable and its wording may change. Branch on Result::error_kind (also available on ItemInfo and Error::kind()):
C++ (ErrorKind) |
Python (ErrorKind) |
Node.js (errorKind) |
Meaning |
|---|---|---|---|
kNone |
NONE |
'none' |
Success |
kCancelled |
CANCELLED |
'cancelled' |
Cancelled via stop token / AbortSignal |
kNotFound |
NOT_FOUND |
'notFound' |
Steam does not have the item |
kRejected |
REJECTED |
'rejected' |
Refused by Steam or CDN (private item, access denied, HTTP 4xx) |
kNetwork |
NETWORK |
'network' |
Network or service failure after automatic retries |
kData |
DATA |
'data' |
Malformed data, checksum mismatch, or unsafe path in manifest |
kFilesystem |
FILESYSTEM |
'filesystem' |
Could not write local file or directory |
kOther |
OTHER |
'other' |
Anything else |
Building from Source
Requirements: CMake ≥ 3.24 and a C++20 compiler (GCC, Clang/Apple Clang, or MSVC).
All dependencies (curl, mbedTLS, zlib, zstd, liblzma, nlohmann_json) are fetched automatically via CPM and linked statically—no system libraries beyond the C/C++ runtime are needed. Set CPM_SOURCE_CACHE to reuse downloads across build directories.
cmake -S . -B build -G Ninja -DCMAKE_BUILD_TYPE=Release
cmake --build build
This builds the CLI at build/pxsteamdl. Add -DPXSTEAMDL_BUILD_EXAMPLES=ON to build examples/download.cpp, or -DPXSTEAMDL_BUILD_TESTS=ON to build the unit tests (ctest --test-dir build).
Using in a CMake project
Link against PxSteamDL::pxsteamdl via add_subdirectory, CPMAddPackage, or an installed prefix:
cmake --install build --prefix /some/prefix
find_package(PxSteamDL 1.0 CONFIG REQUIRED) # pass -DCMAKE_PREFIX_PATH=/some/prefix
target_link_libraries(app PRIVATE PxSteamDL::pxsteamdl)
For code style, architecture notes, and release/versioning rules, see CONTRIBUTING.md.
Why not an existing library?
| Project | Language | Why not |
|---|---|---|
| DepotDownloader / SteamKit2 | C# | Does this exact job (-pubfile), but requires the .NET runtime |
| ValvePython/steam, node-steam-user | Python / JS | Full clients, wrong runtime for a native library |
| steamdepot, steam-vent | Rust | Depot downloaders, not C++ |
| SteamPP | C++ | Unmaintained; chat/logon only with legacy TCP and no depot/CDN support |
License
PxSteamDL is licensed under the GNU Lesser General Public License v3.0 or later (LGPL-3.0-or-later).
See COPYING.LESSER and COPYING.
Metadata
Release files for pxsteamdl 0.5.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| pxsteamdl-0.5.1.tar.gz | 138.7 kB | With provenance | Details for pxsteamdl-0.5.1.tar.gz |
Built distributions (wheels)
Total release size: 10.6 MB
Release files / pxsteamdl-0.5.1.tar.gz
| Download URL | pxsteamdl-0.5.1.tar.gz |
|---|---|
| Size | 138.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
258973217510c53a34c6144d7ff27fae08fdfa23136b9496bf7614329657bc01
|
|
BLAKE2b-256 checksum How to use checksums |
078ff4099ec5d057a92299c0120565a38a8e75e9a80ee36c45bc28ee63dffd51
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 27, 2026.
Transparency logRelease files / pxsteamdl-0.5.1-cp312-abi3-win_amd64.whl
| Download URL | pxsteamdl-0.5.1-cp312-abi3-win_amd64.whl |
|---|---|
| Size | 1.2 MB |
| Tags | CPython 3.12 Windows x86-64 abi3 |
|
SHA-256 checksum How to use checksums |
0b3b173245650470f2fa7226eeba15727553b75d96c3c68f6dcdeaf89c31d29b
|
|
BLAKE2b-256 checksum How to use checksums |
9da87ecc6d471c53fc43939b1a543d663da60b08b7662cd72ffe0549b0a31a75
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 27, 2026.
Transparency logRelease files / pxsteamdl-0.5.1-cp312-abi3-manylinux_2_28_x86_64.whl
| Download URL | pxsteamdl-0.5.1-cp312-abi3-manylinux_2_28_x86_64.whl |
|---|---|
| Size | 1.3 MB |
| Tags | CPython 3.12 Linux glibc 2.28+ x86-64 abi3 |
|
SHA-256 checksum How to use checksums |
368c68720b1e6d6e0b9db9c9f3e07f1c8f5b3be45247b88e78de7d37827962a0
|
|
BLAKE2b-256 checksum How to use checksums |
2f0af3878b754bf855085ac1f21a0cbae8083a336a165d9ea018cc93beb3a1c4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 27, 2026.
Transparency logRelease files / pxsteamdl-0.5.1-cp312-abi3-macosx_11_0_arm64.whl
| Download URL | pxsteamdl-0.5.1-cp312-abi3-macosx_11_0_arm64.whl |
|---|---|
| Size | 984.2 kB |
| Tags | CPython 3.12 abi3 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
e79886de06b6eda326996a90d48ca674db8d78ca17e0e31c1eff967a6bea6918
|
|
BLAKE2b-256 checksum How to use checksums |
ced1a652a3deedf87e9f40e4f8e9829e6cf3ed3f6cb2c317265460dcf16dc1a1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 27, 2026.
Transparency logRelease files / pxsteamdl-0.5.1-cp311-cp311-win_amd64.whl
| Download URL | pxsteamdl-0.5.1-cp311-cp311-win_amd64.whl |
|---|---|
| Size | 1.2 MB |
| Tags | CPython 3.11 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
ea788082d6590427b4ec227c77fb633d5954c12db41c02a6dbbad8e3b87c1517
|
|
BLAKE2b-256 checksum How to use checksums |
d35dbea88e4e0dfabdeda825e1b0e4ad547e9f253fa38310fbdac1e8b67db2e9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 27, 2026.
Transparency logRelease files / pxsteamdl-0.5.1-cp311-cp311-manylinux_2_28_x86_64.whl
| Download URL | pxsteamdl-0.5.1-cp311-cp311-manylinux_2_28_x86_64.whl |
|---|---|
| Size | 1.3 MB |
| Tags | CPython 3.11 Linux glibc 2.28+ x86-64 |
|
SHA-256 checksum How to use checksums |
4fbc38ef6dd2efdd703d0d08c4dc829d4366efb4a862f0f43fbba334ef9ed913
|
|
BLAKE2b-256 checksum How to use checksums |
7a877e63ec8b45b7a7c6e6d3ffa208715481de2f4c4362821aee8238d6ea3c34
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 27, 2026.
Transparency logRelease files / pxsteamdl-0.5.1-cp311-cp311-macosx_11_0_arm64.whl
| Download URL | pxsteamdl-0.5.1-cp311-cp311-macosx_11_0_arm64.whl |
|---|---|
| Size | 985.5 kB |
| Tags | CPython 3.11 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
8fc3a67e9cd1deb57a0dea89e20b6a0b336f9062130e228daf98825959be35aa
|
|
BLAKE2b-256 checksum How to use checksums |
1ae54fef333fa0fa78e240764b9eabc4960b9543ae695b6130fd8b1819002d1b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 27, 2026.
Transparency logRelease files / pxsteamdl-0.5.1-cp310-cp310-win_amd64.whl
| Download URL | pxsteamdl-0.5.1-cp310-cp310-win_amd64.whl |
|---|---|
| Size | 1.2 MB |
| Tags | CPython 3.10 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
6932d7c603016fa2ef75e2b78c183258c81b411622aca8aa01c8f22f912f49da
|
|
BLAKE2b-256 checksum How to use checksums |
12c21f5282a3b278e8e2c0f19f419d2670df9447b1ff40823a968d160b21dd09
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 27, 2026.
Transparency logRelease files / pxsteamdl-0.5.1-cp310-cp310-manylinux_2_28_x86_64.whl
| Download URL | pxsteamdl-0.5.1-cp310-cp310-manylinux_2_28_x86_64.whl |
|---|---|
| Size | 1.3 MB |
| Tags | CPython 3.10 Linux glibc 2.28+ x86-64 |
|
SHA-256 checksum How to use checksums |
c0c3f1c9bab094a1a622a96430e84d272a3a4a33d0bfd922dc5365dc25fa82e7
|
|
BLAKE2b-256 checksum How to use checksums |
ba437c6e2030c9f49d04ad7bf0b7db2a3e5038ee91d54633d9f6c7bbf3ac0150
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 27, 2026.
Transparency logRelease files / pxsteamdl-0.5.1-cp310-cp310-macosx_11_0_arm64.whl
| Download URL | pxsteamdl-0.5.1-cp310-cp310-macosx_11_0_arm64.whl |
|---|---|
| Size | 985.5 kB |
| Tags | CPython 3.10 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
2c626a32b94327b3ace94857687d8bec49074a29a90863732e31d3151f24d207
|
|
BLAKE2b-256 checksum How to use checksums |
9050d67627c7910345460729887c82ea97774d6d913fdd9a16cad4be17f5f5ff
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 27, 2026.
Transparency logSecurity for pxsteamdl 0.5.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
All 10 files in this release have been uploaded with provenance metadata.
Attestation for pxsteamdl-0.5.1.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 27, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.