This package provides typed NodeJS bindings to the Steamworks SDK.
Documentation
import { SteamClient } from 'steamworks-ts';
const steam = new SteamClient();
const { steamId, accountId, name, loggedOn } = steam.getCurrentUser();
You must have a Rust Toolchain and NodeJS:
$ npm i
$ npm run dev
This should produce steamworks-ts.<platform>-<arch>.node
.
steam_appid.txt
FileSteamworks requires a file named steam_appid.txt
containing the AppID of the Steam app Steamworks is meant to interact with. If this file doesn't exist, you'll get a warning and one will be created automatically:
$ npx tsx examples/user_info.ts
Warning, creating default steam_appid.txt with 480 (Spacewar)
...
Spacewar is an example application used to help developers understand the usage of the Steamworks API.
After building locally, you can run examples with tsx
:
bash
$ npx tsx examples/user_info.ts
This package is licensed under MIT.
If you are seeing errors like STATUS_DLL_NOT_FOUND
, Image not found
etc. your platform is not likely supported by steamworks-ts or you forgot to build.
Built ontop of steamworks-rs | |
Built with the awesome napi-rs project. | ![]() |