{"id":22222353,"url":"https://github.com/misiektoja/steam_monitor","last_synced_at":"2025-12-29T05:34:14.145Z","repository":{"id":236172226,"uuid":"792068584","full_name":"misiektoja/steam_monitor","owner":"misiektoja","description":"Real-time tracking of Steam players activities","archived":false,"fork":false,"pushed_at":"2025-11-11T22:20:19.000Z","size":2780,"stargazers_count":27,"open_issues_count":0,"forks_count":5,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-11-28T00:44:21.575Z","etag":null,"topics":["osint","python","steam","steam-api","steam-monitor"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/misiektoja.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2024-04-25T23:11:03.000Z","updated_at":"2025-11-11T22:20:22.000Z","dependencies_parsed_at":null,"dependency_job_id":"6a3e6d00-6b90-4eda-9b10-3ab7496adff5","html_url":"https://github.com/misiektoja/steam_monitor","commit_stats":null,"previous_names":["misiektoja/steam_monitor"],"tags_count":6,"template":false,"template_full_name":null,"purl":"pkg:github/misiektoja/steam_monitor","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/misiektoja%2Fsteam_monitor","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/misiektoja%2Fsteam_monitor/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/misiektoja%2Fsteam_monitor/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/misiektoja%2Fsteam_monitor/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/misiektoja","download_url":"https://codeload.github.com/misiektoja/steam_monitor/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/misiektoja%2Fsteam_monitor/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28111104,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-12-29T02:00:07.021Z","response_time":58,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["osint","python","steam","steam-api","steam-monitor"],"created_at":"2024-12-02T23:18:05.490Z","updated_at":"2025-12-29T05:34:14.139Z","avatar_url":"https://github.com/misiektoja.png","language":"Python","funding_links":[],"categories":["[↑](#-table-of-contents) Gaming Platforms"],"sub_categories":["[↑](#-table-of-contents) GitHub"],"readme":"# steam_monitor\n\nsteam_monitor is a tool for real-time monitoring of **Steam players' activities**.\n\n\u003ca id=\"features\"\u003e\u003c/a\u003e\n## Features\n\n- **Real-time tracking** of Steam users' gaming activity (including detection when a user gets online/offline or plays games)\n- **Basic statistics for user activity** (such as how long in different states, how long a game is played, overall time and the number of played games in the session etc.)\n- **Detailed user information** display mode providing comprehensive Steam profile insights including list of **recently played \u0026 top games**, **recent achievements**, **total XP**, **earned badges**, **ban status** and **list of friends**\n- **Steam level and total XP change tracking**\n- **Friends list change tracking** (friends count and when available - added/removed friends)\n- **Email notifications** for different events (when a player gets online/away/snooze/offline, starts/finishes/changes a game, Steam level and total XP changes, friends list changes or errors occur)\n- **Saving all user activities and profile changes** with timestamps to a **CSV file**\n- Possibility to **control the running copy** of the script via signals\n- **Functional, procedural Python** (minimal OOP)\n\n\u003cp align=\"center\"\u003e\n   \u003cimg src=\"https://raw.githubusercontent.com/misiektoja/steam_monitor/refs/heads/main/assets/steam_monitor.png\" alt=\"steam_monitor_screenshot\" width=\"85%\"/\u003e\n\u003c/p\u003e\n\n\u003ca id=\"table-of-contents\"\u003e\u003c/a\u003e\n## Table of Contents\n\n1. [Requirements](#requirements)\n2. [Installation](#installation)\n   * [Install from PyPI](#install-from-pypi)\n   * [Manual Installation](#manual-installation)\n   * [Upgrading](#upgrading)\n3. [Quick Start](#quick-start)\n4. [Configuration](#configuration)\n   * [Configuration File](#configuration-file)\n   * [Steam Web API key](#steam-web-api-key)\n   * [User Privacy Settings](#user-privacy-settings)\n   * [SMTP Settings](#smtp-settings)\n   * [Storing Secrets](#storing-secrets)\n5. [Usage](#usage)\n   * [Detailed User Information Display Mode](#detailed-user-information-display-mode)\n   * [Monitoring Mode](#monitoring-mode)\n   * [Email Notifications](#email-notifications)\n   * [CSV Export](#csv-export)\n   * [Check Intervals](#check-intervals)\n   * [Signal Controls (macOS/Linux/Unix)](#signal-controls-macoslinuxunix)\n   * [Coloring Log Output with GRC](#coloring-log-output-with-grc)\n6. [Change Log](#change-log)\n7. [License](#license)\n\n\u003ca id=\"requirements\"\u003e\u003c/a\u003e\n## Requirements\n\n* Python 3.6 or higher\n* Libraries: [steam](https://github.com/ValvePython/steam), `requests`, `python-dateutil`, `python-dotenv`\n\nTested on:\n\n* **macOS**: Ventura, Sonoma, Sequoia, Tahoe\n* **Linux**: Raspberry Pi OS (Bullseye, Bookworm, Trixie), Ubuntu 24/25, Rocky Linux 8.x/9.x, Kali Linux 2024/2025\n* **Windows**: 10, 11\n\nIt should work on other versions of macOS, Linux, Unix and Windows as well.\n\n\u003ca id=\"installation\"\u003e\u003c/a\u003e\n## Installation\n\n\u003ca id=\"install-from-pypi\"\u003e\u003c/a\u003e\n### Install from PyPI\n\n```sh\npip install steam_monitor\n```\n\n\u003ca id=\"manual-installation\"\u003e\u003c/a\u003e\n### Manual Installation\n\nDownload the *[steam_monitor.py](https://raw.githubusercontent.com/misiektoja/steam_monitor/refs/heads/main/steam_monitor.py)* file to the desired location.\n\nInstall dependencies via pip:\n\n```sh\npip install \"steam[client]\" requests python-dateutil python-dotenv\n```\n\nAlternatively, from the downloaded *[requirements.txt](https://raw.githubusercontent.com/misiektoja/steam_monitor/refs/heads/main/requirements.txt)*:\n\n```sh\npip install -r requirements.txt\n```\n\n\u003ca id=\"upgrading\"\u003e\u003c/a\u003e\n### Upgrading\n\nTo upgrade to the latest version when installed from PyPI:\n\n```sh\npip install steam_monitor -U\n```\n\nIf you installed manually, download the newest *[steam_monitor.py](https://raw.githubusercontent.com/misiektoja/steam_monitor/refs/heads/main/steam_monitor.py)* file to replace your existing installation.\n\n\u003ca id=\"quick-start\"\u003e\u003c/a\u003e\n## Quick Start\n\n- Grab your [Steam Web API key](#steam-web-api-key) and track the `steam_user_id` gaming activities:\n\n```sh\nsteam_monitor \u003csteam_user_id\u003e -u \"your_steam_web_api_key\"\n```\n\nOr if you installed [manually](#manual-installation):\n\n```sh\npython3 steam_monitor.py \u003csteam_user_id\u003e -u \"your_steam_web_api_key\"\n```\n\nTo get the list of all supported command-line arguments / flags:\n\n```sh\nsteam_monitor --help\n```\n\n\u003ca id=\"configuration\"\u003e\u003c/a\u003e\n## Configuration\n\n\u003ca id=\"configuration-file\"\u003e\u003c/a\u003e\n### Configuration File\n\nMost settings can be configured via command-line arguments.\n\nIf you want to have it stored persistently, generate a default config template and save it to a file named `steam_monitor.conf`:\n\n```sh\nsteam_monitor --generate-config \u003e steam_monitor.conf\n\n```\n\nEdit the `steam_monitor.conf` file and change any desired configuration options (detailed comments are provided for each).\n\n\u003ca id=\"steam-web-api-key\"\u003e\u003c/a\u003e\n### Steam Web API key\n\nYou can get the Steam Web API key here: [http://steamcommunity.com/dev/apikey](http://steamcommunity.com/dev/apikey)\n\nProvide the `STEAM_API_KEY` secret using one of the following methods:\n - Pass it at runtime with `-u` / `--steam-api-key`\n - Set it as an [environment variable](#storing-secrets) (e.g. `export STEAM_API_KEY=...`)\n - Add it to [.env file](#storing-secrets) (`STEAM_API_KEY=...`) for persistent use\n\nFallback:\n - Hard-code it in the code or config file\n\nIf you store the `STEAM_API_KEY` in a dotenv file you can update its value and send a `SIGHUP` signal to the process to reload the file with the new API key without restarting the tool. More info in [Storing Secrets](#storing-secrets) and [Signal Controls (macOS/Linux/Unix)](#signal-controls-macoslinuxunix).\n\n\u003ca id=\"user-privacy-settings\"\u003e\u003c/a\u003e\n### User Privacy Settings\n\nIn order to monitor Steam user activity, proper privacy settings need to be enabled on the monitored user account.\n\nThe user should go to [Steam Privacy Settings](https://steamcommunity.com/my/edit/settings).\n\nThe value in **My Profile → Game details** should be set to **Friends Only** or **Public**.\n\n\u003ca id=\"smtp-settings\"\u003e\u003c/a\u003e\n### SMTP Settings\n\nIf you want to use email notifications functionality, configure SMTP settings in the `steam_monitor.conf` file.\n\nVerify your SMTP settings by using `--send-test-email` flag (the tool will try to send a test email notification):\n\n```sh\nsteam_monitor --send-test-email\n```\n\n\u003ca id=\"storing-secrets\"\u003e\u003c/a\u003e\n### Storing Secrets\n\nIt is recommended to store secrets like `STEAM_API_KEY` or `SMTP_PASSWORD` as either an environment variable or in a dotenv file.\n\nSet environment variables using `export` on **Linux/Unix/macOS/WSL** systems:\n\n```sh\nexport STEAM_API_KEY=\"your_steam_web_api_key\"\nexport SMTP_PASSWORD=\"your_smtp_password\"\n```\n\nOn **Windows Command Prompt** use `set` instead of `export` and on **Windows PowerShell** use `$env`.\n\nAlternatively store them persistently in a dotenv file (recommended):\n\n```ini\nSTEAM_API_KEY=\"your_steam_web_api_key\"\nSMTP_PASSWORD=\"your_smtp_password\"\n```\n\nBy default the tool will auto-search for dotenv file named `.env` in current directory and then upward from it.\n\nYou can specify a custom file with `DOTENV_FILE` or `--env-file` flag:\n\n```sh\nsteam_monitor \u003csteam_user_id\u003e --env-file /path/.env-steam_monitor\n```\n\n You can also disable `.env` auto-search with `DOTENV_FILE = \"none\"` or `--env-file none`:\n\n```sh\nsteam_monitor \u003csteam_user_id\u003e --env-file none\n```\n\nAs a fallback, you can also store secrets in the configuration file or source code.\n\n\u003ca id=\"usage\"\u003e\u003c/a\u003e\n## Usage\n\n\u003ca id=\"detailed-user-information-display-mode\"\u003e\u003c/a\u003e\n### Detailed User Information Display Mode\n\nTo display comprehensive Steam profile information for a user without starting monitoring, type the player's Steam64 ID (`steam_user_id` in the example below) and use the `-i` / `--info` flag:\n\n```sh\nsteam_monitor \u003csteam_user_id\u003e -i\n```\n\nOr with a Steam community URL:\n\n```sh\nsteam_monitor -r \"https://steamcommunity.com/id/steam_username/\" -i\n```\n\nIf you have not set `STEAM_API_KEY` secret, you can use `-u` flag:\n\n```sh\nsteam_monitor \u003csteam_user_id\u003e -i -u \"your_steam_web_api_key\"\n# or\nsteam_monitor -r \"https://steamcommunity.com/id/steam_username/\" -i -u \"your_steam_web_api_key\"\n```\n\nThis mode displays detailed information including:\n- Steam64 ID, display name, real name\n- Country/region\n- Current status and profile visibility\n- Account creation date\n- Profile URL\n- Steam level, badges earned and XP statistics\n- Ban status (VAC, Community, Economy)\n- Friends count\n- Top games by lifetime hours\n- Recently played games with playtime statistics\n- Hours played in the last 2 weeks\n\nOptionally, you can also display **recently earned achievements** using the `--achievements` flag:\n\n```sh\nsteam_monitor \u003csteam_user_id\u003e -i --achievements                    # show recent achievements (default: 10)\nsteam_monitor \u003csteam_user_id\u003e -i --achievements -n 20              # show up to 20 recent achievements\nsteam_monitor \u003csteam_user_id\u003e -i --achievements --achievements-all-games  # check all owned games instead of only recently played\n```\n\nRecent achievements show game name, achievement name, description (if available) and earn time.\n\n**How it works:**\n- By default, the tool checks achievements from the user's recently played games (up to 15 games).\n- If the recently played games list is empty or hidden, it automatically falls back to checking all owned games.\n- Use `--achievements-all-games` to force checking all owned games instead of only recently played games. This is useful for users who haven't played recently, as their recently played list may be limited and older games with achievements might be missed.\n- Achievements are sorted by unlock time (most recent first) and limited to the number specified with `-n` (default: 10).\n\nThe visibility of achievements depends on the user's Steam privacy settings for game details. If game details are set to \"Private\", achievements may not be accessible.\n\nThe tool displays this information and then exits (does not start monitoring).\n\n\u003ca id=\"monitoring-mode\"\u003e\u003c/a\u003e\n### Monitoring Mode\n\nTo monitor specific user activity, just type the player's Steam64 ID (`steam_user_id` in the example below):\n\n```sh\nsteam_monitor \u003csteam_user_id\u003e\n```\n\nIf you have not set `STEAM_API_KEY` secret, you can use `-u` flag:\n\n```sh\nsteam_monitor \u003csteam_user_id\u003e -u \"your_steam_web_api_key\"\n```\n\nIf you do not know the user's Steam64 ID, but you know the Steam profile/community URL (which can be customized by the user), you can also run the tool with `-r` flag which will automatically resolve it to Steam64 ID:\n\n```sh\nsteam_monitor -r \"https://steamcommunity.com/id/steam_username/\"\n```\n\nWhen monitoring starts, the tool displays user information including Steam64 ID, display name, real name (if available), country/region, current status, profile visibility, account creation date and profile URL.\n\nBy default, the tool looks for a configuration file named `steam_monitor.conf` in:\n - current directory\n - home directory (`~`)\n - script directory\n\n If you generated a configuration file as described in [Configuration](#configuration), but saved it under a different name or in a different directory, you can specify its location using the `--config-file` flag:\n\n\n```sh\nsteam_monitor \u003csteam_user_id\u003e --config-file /path/steam_monitor_new.conf\n```\n\nThe tool runs until interrupted (`Ctrl+C`). Use `tmux` or `screen` for persistence.\n\nYou can monitor multiple Steam players by running multiple instances of the script.\n\nThe tool automatically saves its output to `steam_monitor_\u003cuser_steam_id/file_suffix\u003e.log` file. The log file name can be changed via `ST_LOGFILE` configuration option and its suffix via `FILE_SUFFIX` / `-y` flag. Logging can be disabled completely via `DISABLE_LOGGING` / `-d` flag.\n\nThe tool also saves the timestamp and last status (after every change) to the `steam_\u003cuser_display_name\u003e_last_status.json` file, so the last status is available after the restart of the tool.\n\nTo track when the user's **Steam level and total XP** changes:\n- set `STEAM_LEVEL_XP_CHECK` to `True`\n- or use the `--check-level-xp` flag\n\nTo track changes in the user's **friends list** (count and when available - added/removed friends):\n- set `FRIENDS_CHECK` to `True`\n- or use the `--check-friends` flag\n\n\u003ca id=\"email-notifications\"\u003e\u003c/a\u003e\n### Email Notifications\n\nTo enable email notifications when a user gets online or offline:\n- set `ACTIVE_INACTIVE_NOTIFICATION` to `True`\n- or use the `-a` flag\n\n```sh\nsteam_monitor \u003csteam_user_id\u003e -a\n```\n\nTo be informed when a user starts, stops or changes the played game:\n- set `GAME_CHANGE_NOTIFICATION` to `True`\n- or use the `-g` flag\n\n```sh\nsteam_monitor \u003csteam_user_id\u003e -g\n```\n\nTo get email notifications about any changes in user status (online/away/snooze/offline):\n- set `STATUS_NOTIFICATION` to `True`\n- or use the `-s` flag\n\n```sh\nsteam_monitor \u003csteam_user_id\u003e -s\n```\n\nTo get email notifications when the user's **Steam level and total XP** changes:\n- set `STEAM_LEVEL_XP_NOTIFICATION` to `True`\n- or use the `--notify-level-xp` flag\n\nIt requires Steam level and total XP tracking (`STEAM_LEVEL_XP_CHECK` / `--check-level-xp`) to be enabled.\n\n```sh\nsteam_monitor \u003csteam_user_id\u003e --check-level-xp --notify-level-xp\n```\n\nTo get email notifications when the user's **friends list** changes:\n- set `FRIENDS_NOTIFICATION` to `True`\n- or use the `--notify-friends` flag\n\nIt requires friends tracking (`FRIENDS_CHECK` / `--check-friends`) to be enabled.\n\n```sh\nsteam_monitor \u003csteam_user_id\u003e --check-friends --notify-friends\n```\n\nTo disable sending an email on errors (enabled by default):\n- set `ERROR_NOTIFICATION` to `False`\n- or use the `-e` flag\n\n```sh\nsteam_monitor \u003csteam_user_id\u003e -e\n```\n\nMake sure you defined your SMTP settings earlier (see [SMTP settings](#smtp-settings)).\n\nExample email:\n\n\u003cp align=\"center\"\u003e\n   \u003cimg src=\"https://raw.githubusercontent.com/misiektoja/steam_monitor/refs/heads/main/assets/steam_monitor_email_notifications.png\" alt=\"steam_monitor_email_notifications\" width=\"85%\"/\u003e\n\u003c/p\u003e\n\n\u003ca id=\"csv-export\"\u003e\u003c/a\u003e\n### CSV Export\n\nIf you want to save all reported activities of the Steam user to a CSV file, set `CSV_FILE` or use `-b` flag:\n\n```sh\nsteam_monitor \u003csteam_user_id\u003e -b steam_user_id.csv\n```\n\nThe file will be automatically created if it does not exist.\n\nIf you want to save **profile-related changes** (Steam level changes, total XP changes, friends count changes and individual added/removed friends) to a **separate CSV file**, set `PROFILE_CSV_FILE` or use the `--profile-csv-file` flag:\n\n```sh\nsteam_monitor \u003csteam_user_id\u003e --profile-csv-file steam_user_id_profile.csv\n```\n\nEach row contains a timestamp, event type and associated values (for example: old/new Steam level or XP, friends count delta or one friend per row for added/removed friends, when available).\n\n\u003ca id=\"check-intervals\"\u003e\u003c/a\u003e\n### Check Intervals\n\nIf you want to customize polling intervals, use `-k` and `-c` flags (or corresponding configuration options):\n\n```sh\nsteam_monitor \u003csteam_user_id\u003e -k 30 -c 120\n```\n\n* `STEAM_ACTIVE_CHECK_INTERVAL`, `-k`: check interval when the user is online, away or snooze (seconds)\n* `STEAM_CHECK_INTERVAL`, `-c`: check interval when the user is offline (seconds)\n\n\u003ca id=\"signal-controls-macoslinuxunix\"\u003e\u003c/a\u003e\n### Signal Controls (macOS/Linux/Unix)\n\nThe tool has several signal handlers implemented which allow to change behavior of the tool without a need to restart it with new configuration options / flags.\n\nList of supported signals:\n\n| Signal | Description |\n| ----------- | ----------- |\n| USR1 | Toggle email notifications when user gets online or offline (-a) |\n| USR2 | Toggle email notifications when user starts/stops/changes the game (-g) |\n| CONT | Toggle email notifications for all user status changes (online/away/snooze/offline) (-s) |\n| URG | Toggle email notifications for Steam level/XP changes (--notify-level-xp) |\n| PIPE | Toggle email notifications for friends list changes (--notify-friends) |\n| TRAP | Increase the check timer for player activity when user is online/away/snooze (by 30 seconds) |\n| ABRT | Decrease check timer for player activity when user is online/away/snooze (by 30 seconds) |\n| HUP | Reload secrets from .env file |\n\nSend signals with `kill` or `pkill`, e.g.:\n\n```sh\npkill -USR1 -f \"steam_monitor \u003csteam_user_id\u003e\"\n```\n\nAs Windows supports limited number of signals, this functionality is available only on Linux/Unix/macOS.\n\n\u003ca id=\"coloring-log-output-with-grc\"\u003e\u003c/a\u003e\n### Coloring Log Output with GRC\n\nYou can use [GRC](https://github.com/garabik/grc) to color logs.\n\nAdd to your GRC config (`~/.grc/grc.conf`):\n\n```\n# monitoring log file\n.*_monitor_.*\\.log\nconf.monitor_logs\n```\n\nNow copy the [conf.monitor_logs](https://raw.githubusercontent.com/misiektoja/steam_monitor/refs/heads/main/grc/conf.monitor_logs) to your `~/.grc/` and log files should be nicely colored when using `grc` tool.\n\nExample:\n\n```sh\ngrc tail -F -n 100 steam_monitor_\u003cuser_steam_id/file_suffix\u003e.log\n```\n\n\u003ca id=\"change-log\"\u003e\u003c/a\u003e\n## Change Log\n\nSee [RELEASE_NOTES.md](https://github.com/misiektoja/steam_monitor/blob/main/RELEASE_NOTES.md) for details.\n\n\u003ca id=\"license\"\u003e\u003c/a\u003e\n## License\n\nLicensed under GPLv3. See [LICENSE](https://github.com/misiektoja/steam_monitor/blob/main/LICENSE).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmisiektoja%2Fsteam_monitor","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmisiektoja%2Fsteam_monitor","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmisiektoja%2Fsteam_monitor/lists"}