https://github.com/node-3d/steam-api
Steam API bindings for Node.js
https://github.com/node-3d/steam-api
Last synced: 10 days ago
JSON representation
Steam API bindings for Node.js
- Host: GitHub
- URL: https://github.com/node-3d/steam-api
- Owner: node-3d
- License: mit
- Created: 2026-07-11T18:06:13.000Z (29 days ago)
- Default Branch: master
- Last Pushed: 2026-07-15T19:21:36.000Z (25 days ago)
- Last Synced: 2026-07-15T21:19:22.591Z (25 days ago)
- Language: C++
- Size: 24.4 KB
- Stars: 1
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# @node-3d/steam-api
This is a part of [Node3D](https://github.com/node-3d) project.
[](https://badge.fury.io/js/@node-3d%2Fsteam-api)
[](https://github.com/node-3d/steam-api/actions/workflows/lint.yml)
[](https://github.com/node-3d/steam-api/actions/workflows/test.yml)
[WIP] Steamworks API bindings for Node.js.
## Install
```bash
npm install @node-3d/steam-api
```
Published packages include prebuilt native binaries.
A consumer install doesn't need a compiler or a local Steamworks SDK copy.
## Example
```ts
import { steam, update, user, utils } from '@node-3d/steam-api';
const result = steam.initEx();
if (!result.ok) {
throw new Error(`Steamworks init failed: ${result.errorMessage}`);
}
console.log('app', utils.getAppId());
console.log('user', user.getSteamId(), user.isLoggedOn() ? 'logged on' : 'offline');
for (const event of update()) {
console.log(event);
}
```
## API Surface
The initial binding covers lifecycle, callback pumping, basic app/user helpers,
auth tickets, DLC metadata, and user stats/achievements.
`steam`:
- `steam.restartAppIfNecessary(appId)`
- `steam.initEx()`
- `init()`
- `steam.shutdown()`
- `steam.isSteamRunning()`
- `steam.runCallbacks()`
- `update()`
- `steam.releaseCurrentThreadMemory()`
`callbacks`:
- `callbacks.pollCallbacks()`
`user`:
- `user.getSteamId()`
- `user.isLoggedOn()`
- `user.getAuthSessionTicket()`
- `user.cancelAuthTicket(handle)`
`utils`:
- `utils.getAppId()`
- `utils.getConnectedUniverse()`
- `utils.getIpCountry()`
- `utils.getServerRealTime()`
- `utils.getSteamUiLanguage()`
- `utils.isOverlayEnabled()`
`apps`:
- `apps.isSubscribed()`
- `apps.isDlcInstalled(appId)`
- `apps.getDlcDataByIndex(index)`
`userStats`:
- `userStats.getStatInt(name)`
- `userStats.getStatFloat(name)`
- `userStats.setStatInt(name, value)`
- `userStats.setStatFloat(name, value)`
- `userStats.getAchievement(name)`
- `userStats.setAchievement(name)`
- `userStats.clearAchievement(name)`
- `userStats.storeStats()`
- `userStats.resetAllStats(achievementsToo)`
- `userStats.getAchievementAndUnlockTime(name)`
`update()` runs Steam callbacks and returns queued typed callback payloads such
as `userStatsReceived`, `userStatsStored`, and `userAchievementStored`.
## Steamworks SDK Notice
Valve's Steamworks SDK files are not part of this repository.
This repository contains Node3D binding code only.
Maintainers must provide the SDK separately under Valve's Steamworks
terms when building native binaries.
See [BUILD.md](BUILD.md) for local and CI build setup.
## Binary Origin
Release archives are built by this repository's public GitHub Actions workflows.
Attestations: https://github.com/node-3d/steam-api/attestations
To verify a downloaded archive:
```bash
gh release download -R node-3d/steam-api -p .gz
gh attestation verify .gz -R node-3d/steam-api
```