npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

steam-locate

v1.0.6

Published

Find Steam client installation location and apps across Windows, macOS, and Linux

Readme

steam-locate

A cross-platform Node.js library for detecting the Steam client installation, checking if Steam is running, and listing or locating installed Steam games on Windows, macOS, and Linux. Inspired by the steamlocate Rust crate.

Installation

npm install steam-locate

Usage

import {
  findSteamLocation,
  findSteamLocationSync,
  isSteamRunning,
  isSteamRunningSync,
  findSteamApp,
  findSteamAppSync,
  getInstalledSteamApps,
  getInstalledSteamAppsSync,
  SteamNotFoundError,
  SteamAppNotFoundError
} from 'steam-locate';

// Async usage
const location = await findSteamLocation();
console.log(location);

// Sync usage
const locationSync = findSteamLocationSync();
console.log(locationSync);

// Check if Steam is running
const running = await isSteamRunning();
const runningSync = isSteamRunningSync();

// Find a specific app
const app = await findSteamApp('570'); // Dota 2
const appSync = findSteamAppSync('570');

// List all installed apps
const apps = await getInstalledSteamApps();
const appsSync = getInstalledSteamAppsSync();

API Reference

Types

SteamLocation

interface SteamLocation {
  path: string; // Path to Steam installation
  isRunning: boolean; // Whether Steam is running
  platform: 'win32' | 'darwin' | 'linux';
  version?: string;
  libraryFolders: string[];
}

SteamApp

interface SteamApp {
  appId: string;
  name?: string;
  installDir?: string;
  sizeOnDisk?: number;
  isInstalled: boolean;
  lastUpdated?: Date;
}

Errors

  • SteamNotFoundError: Thrown when Steam installation is not found
  • SteamAppNotFoundError: Thrown when a specific app is not found

Functions

findSteamLocation(): Promise<SteamLocation>

Detects the Steam installation and libraries

Example response:

{
  "path": "C:\\Program Files (x86)\\Steam",
  "isRunning": true,
  "platform": "win32",
  "version": "5.98.0.0",
  "libraryFolders": [
    "C:\\Program Files (x86)\\Steam\\steamapps",
    "D:\\SteamLibrary\\steamapps"
  ]
}

findSteamLocationSync(): SteamLocation

Synchronous version


isSteamRunning(): Promise<boolean>

Checks if Steam is running

isSteamRunningSync(): boolean

Synchronous version


findSteamApp(appId: string, steamPath?: string): Promise<SteamApp>

Finds a specific Steam app/game by App ID

Example response:

{
  "appId": "570",
  "name": "Dota 2",
  "installDir": "C:\\Program Files (x86)\\Steam\\steamapps\\common\\dota 2 beta",
  "sizeOnDisk": 20000000000,
  "isInstalled": true,
  "lastUpdated": "2024-06-01T12:34:56.000Z"
}

findSteamAppSync(appId: string, steamPath?: string): SteamApp

Synchronous version


getInstalledSteamApps(steamPath?: string): Promise<SteamApp[]>

Lists all installed Steam apps/games

Example response:

[
  {
    "appId": "570",
    "name": "Dota 2",
    "installDir": "C:\\Program Files (x86)\\Steam\\steamapps\\common\\dota 2 beta",
    "sizeOnDisk": 20000000000,
    "isInstalled": true,
    "lastUpdated": "2024-06-01T12:34:56.000Z"
  },
  {
    "appId": "730",
    "name": "Counter-Strike: Global Offensive",
    "installDir": "D:\\SteamLibrary\\steamapps\\common\\Counter-Strike Global Offensive",
    "sizeOnDisk": 30000000000,
    "isInstalled": true,
    "lastUpdated": "2024-05-20T10:00:00.000Z"
  }
]

getInstalledSteamAppsSync(steamPath?: string): SteamApp[]

Synchronous version


Error Handling

All functions may throw SteamNotFoundError or SteamAppNotFoundError if Steam or a specific app cannot be found. Use try/catch to handle errors


License

MIT License