A web API made for retrieving info from SteamCMD cli utility. Built with node.
Some information is only available through SteamCMD but is very useful for checking for updates for dedicated game servers. Other information like launch options and icon locations are also only available through SteamCMD.
There's a couple of gotchas when you want to interact programatically with SteamCMD. It has some strange behaivour when EOL is sent from its output so you must poll the STDIN with data till you can see the output. Often the first time you query SteamCMD it will return no dataso we retry untill the data has the right shape.
It only logs into steam anonymously so some info may not be shown. So far only tested on windows. This is a first pass WIP. Open to criticism, suggestions, requests, PRs, lessons.
You can access my instance of the API at https://steamcmd.buddy.nz/ . I wont guarantee it will be available.
Example:
SteamCMD command:
app_info_print
SteamCMD> app_info_print <appid>
Available at:
/api/v1/appinfoprint/<appid>
Example:
http://localhost:3000/api/v1/appinfoprint/740
Returns:
{
"740": {
"common": {
"name": "Counter-Strike Global Offensive - Dedicated Server",
"type": "Tool",
"oslist": "windows,linux",
"gameid": 740
},
...
You will need nodejs installed.
Clone repo:
git clone https://github.com/1337cookie/steamcmd-api-node.git
Change directory:
cd steam-api-node
Install dependencies.
npm i
If you have errors during npm i you may need build tools which can be installed during the node installer or using npm install --global windows-build-tools
. Using the option during the node installer is likely more reliable.
npm run start
or
node index.js
If SteamCMD isn't installed it will install it for you from Valve's server.
Add variables in .env file if you want to change the defaults. On windows steamCMDPath defaults to C:\steamcmd\ On linux and macosx steamCMDPath defaults to /steamcmd/
port=3000
steamCMDPath="C:\\steamcmd\\"
downloadSteamCMD=true
(Not set in stone)
- Clear cache every time by deleting files that steamcmd makes.
- Manage failures by restarting (3rd party tool maybe preferable).
- Find out if some information is only available to app subscribers.
- Explore other read only SteamCMD commands to be added.
- Test on mac and linux.
- Monitoring/logging.
- Stats page.
- GUI for humans to make requests.