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 🙏

© 2024 – Pkg Stats / Ryan Hefner

steam-hour-farmer

v2.1.0

Published

Farm hours headlessly on Steam without game installation

Downloads

56

Readme

Simple Steam hour farmer

steam-hour-farmer is a program that emulates you playing a game on Steam, with the purpose of effortlessly getting hours played on certain games on your profile.

  • Can be deployed on a VPS to run 24/7.
  • Only requires the games to be in your Steam library - they don't need to be installed.
  • When you start playing games on your main computer, it pauses automatically.
  • After you're finished playing, the bot resumes automatically (provided it's able to log in again).
  • Doesn't require multiple accounts.
  • Inspired by @Gunthersuper/steam-idle-bot.

How to use

  1. Have Node.js configured (minimum version 16). This can be done through nvm on a VPS or through the official website.

  2. Install this package:

    npm install -g steam-hour-farmer
  3. Make a directory somewhere. This is where your Steam data will be stored, and where you can configure the bot.

  4. Find your Steam game ids. In each game, go to Properties -> Updates -> Copy the App ID.

  5. In this directory, make an .env file with the content:

    ACCOUNT_NAME="your_steam_username"
    PASSWORD="your_steam_password"
    GAMES="440,4000"

    This will start playing Team Fortress 2 and Garry's Mod for example.

    The GAMES part of the file describes what games you'd like the bot to play, separated by a comma. You can also include a non-Steam game name, for example:

    GAMES="Hello World,440,400"

    Additionally, a PERSONA value may be supplied to set the online status of the user. Can be Online (1), Busy (2), Away (3), Snooze (4). For example,

    PERSONA="1"

    to be Online. Do not write this value if you don't want the user's presence to change.

    All of this configuration can be passed via environment variables too - they don't need to be in this .env file.

  6. Run the program in the same directory:

    steam-hour-farmer

[!TIP] If you have access to your Steam Shared Secret (using something like SteamDesktopAuthenticator), you can input it into a SHARED_SECRET variable like so:

SHARED_SECRET="xxxxxxxxxx"

This will prevent you from needing to input your Steam Guard code at all, and will allow the bot to reconnect without any manual intervention.

When the bot starts, it will request a Steam Guard code via email or the mobile application. When you start playing on another machine, the bot will be kicked from its session, requiring a re-login, with a new Steam Guard code.

This can be remedied by using the Steam Shared Secret, or disabling Steam Guard.

Note that the playtime might seem to be the same when looking from another client - it can take a couple hours for Steam to refresh it sometimes.

Running in the background

To run the program in the background, multiple methods can be followed. These include:

  • Using PM2 (this is what I use)
  • Creating a Systemd service
  • Using GNU Screen