testsAndMisc/python_pkg/steam_backlog_enforcer
Krzysztof kuhy Rudnicki 833c5755e8 fix: prevent tests from touching real Steam files
Tests for pick_next_game were calling uninstall_other_games and
state.save against real filesystem paths, deleting installed games
and overwriting the user's state.json whenever tests or pre-commit
ran.

- Add conftest.py safety net that redirects STEAMAPPS_PATH,
  CONFIG_DIR, STATE_FILE, SNAPSHOT_FILE, CONFIG_FILE, and
  HOSTS_FILE to tmp_path in all steam_backlog_enforcer tests
- Add missing uninstall_other_games mock to 4 tests in
  test_scanning.py (test_picks_shortest, test_skips_finished,
  test_unknown_hours, test_picks_game_no_hours)
2026-03-25 21:15:40 +01:00
..
tests fix: prevent tests from touching real Steam files 2026-03-25 21:15:40 +01:00
__init__.py feat: steam 100 percent extension 2026-03-02 20:29:32 +01:00
_enforce_loop.py fix(steam_backlog_enforcer): prevent enforce daemon from deleting assigned game 2026-03-25 19:19:52 +01:00
config.py fix(steam_backlog_enforcer): prevent enforce daemon from deleting assigned game 2026-03-25 19:19:52 +01:00
enforcer.py fix(steam_backlog_enforcer): prevent enforce daemon from deleting assigned game 2026-03-25 19:19:52 +01:00
game_install.py fix(steam_backlog_enforcer): reload state in enforce loop, use steam:// protocol for installs 2026-03-17 21:48:33 +01:00
hltb.py fix(steam_backlog_enforcer): prevent enforce daemon from deleting assigned game 2026-03-25 19:19:52 +01:00
install.sh feat: steam 100 percent extension 2026-03-02 20:29:32 +01:00
library_hider.py Reduce per-file-ignores by fixing lint violations across codebase 2026-03-25 18:58:05 +01:00
main.py fix: resolve all pre-commit hook failures after file splits 2026-03-18 22:20:05 +01:00
protondb.py fix(steam_backlog_enforcer): prevent enforce daemon from deleting assigned game 2026-03-25 19:19:52 +01:00
README.md feat: steam 100 percent extension 2026-03-02 20:29:32 +01:00
run.sh feat: robotgo improvements in phone focus bluetooth and printer scripts 2026-03-09 18:34:15 +01:00
scanning.py refactor: enforce 500-line limit on all Python source files 2026-03-17 22:47:42 +01:00
steam_api.py feat: improvements in hosts bluetooth focus mode and backglog scripts 2026-03-11 20:47:03 +01:00
steam-backlog-enforcer.service WIP: Enforce 500-line limit - split batch 1 2026-03-16 22:46:48 +01:00
store_blocker.py feat: robotgo improvements in phone focus bluetooth and printer scripts 2026-03-09 18:34:15 +01:00

Steam Backlog Enforcer

Forces you to 100% complete one Steam game at a time before moving on.

Features

  • Achievement tracking: Picks the next game by shortest HLTB completionist time
  • Store blocking: Blocks store.steampowered.com via /etc/hosts
  • Game uninstalling: Removes all installed games except the assigned one
  • Process enforcement: Kills unauthorized game processes
  • Tampering detection: Detects achievement unlocks on non-assigned games
  • HLTB integration: Estimates completion time with persistent cache

Setup

python -m python_pkg.steam_backlog_enforcer.main setup

Commands

Command Description
scan Scan library, fetch HLTB data, assign game
check Check if assigned game is complete
status Show current assignment and blocking
list List incomplete games from snapshot
skip Skip the currently assigned game
enforce Run enforcer (block, uninstall, kill)
unblock Remove store blocking
reset Reset all state
installed List currently installed Steam games
uninstall Interactively uninstall non-assigned games
setup First-time configuration

Enforce mode

sudo python -m python_pkg.steam_backlog_enforcer.main enforce

This will:

  1. Block Steam store in /etc/hosts
  2. Uninstall all games except the assigned one
  3. Continuously kill any unauthorized game processes

Game Uninstall

Directly removes appmanifest files and game directories from ~/.local/share/Steam/steamapps/. Preserves Proton versions and Steam Linux Runtime.

python -m python_pkg.steam_backlog_enforcer.main uninstall