Skip to main content

Steam Idle Bot — farm playtime and trading-card drops on autopilot

Python 3.12+ uv-managed 406 tests passing mypy clean MIT license English docs Docs em Português

Farm Steam playtime and trading-card drops on autopilot. Steam Idle Bot syncs your library, idles only the games that still have cards to drop, and remembers what's already finished — so every run scans less and starts faster. Live terminal dashboard, web UI, three interchangeable idling backends with automatic fallback.


Why it's different

Most idlers blindly run every game forever. Steam Idle Bot is accurate and self-pruning:

🎴 Drops only where it matters Detects which games have trading cards and how many drops remain — idles just those, never wasting a slot on a drained game.
🧠 Learns over time Persistent no-drop caches record fully-farmed games; short-lived positive caches avoid re-scraping active games every refresh.
🔐 Accurate by design Verifies the Steam web session is genuinely logged in before trusting it; auto-recovers a valid session from a browser you're signed into.
🖥️ Readable output Live panel of game names, cards remaining and idle time; structured session report + optional JSON/Markdown checkpoints.
🔁 Three backends, one interface native Steam client (modern login, Steam Guard once, self-renewing web session), the legacy python client, or a local steam-utility install — with transparent fallback if one fails.
🔄 Rotates when cards drain Inventory snapshots can prove a game dropped all known remaining cards before badge pages catch up, so refreshes can replace it mid-session.
⚡ Modern & tested uv-managed, fully typed, 670+ tests across Python 3.12–3.15.

Quick start

# 1. Install uv (if needed)
curl -LsSf https://astral.sh/uv/install.sh | sh

# 2. Clone & install
git clone https://github.com/bernardopg/steam-idler-python.git
cd steam-idler-python
uv sync

# 3. Configure (never commit the filled .env)
cp .env.example .env
#    edit .env → USERNAME, PASSWORD, and ideally STEAM_API_KEY

# 4. Preview without contacting Steam
./run.sh --dry-run

# 5. Run it — terminal, or ./run-web.sh for the web UI
./run.sh

💡 A free Steam Web API key unlocks automatic library sync and badge-based filtering. Without it the bot still runs — it just can't filter as precisely.


How it works

The orchestrator wires a configuration layer to a swappable idling backend and three card services, then drives a refresh loop that tracks drops as they drain.

Architecture: entry and config feed the SteamIdleBot orchestrator, which drives a swappable backend and three card services, with results tracked by IdleTracker

Game selection is a funnel — each stage narrows the set, capped at Steam's hard limit of 32:

Pipeline: library source, then has-cards filter, then drops-remaining filter, then exclusions and cap to 32 games


Common commands

./run.sh                              # run normally (terminal)
./run.sh --dry-run                    # print config + chosen games, no Steam contact
./run.sh --no-trading-cards           # skip trading-card filtering
./run.sh --max-games 10               # cap idled games
./run.sh --refresh-interval-seconds 300   # re-run selection every 5 min
./run.sh --checkpoint-minutes 5 --duration-minutes 25  # timed run + JSON/MD checkpoints
./run.sh --stop-app-ids "570,730"     # stop steam-utility idles for those App IDs and exit
STEAM_IDLE_SKIP_SYNC=1 ./run.sh       # skip the runner's preflight uv sync
STEAM_IDLE_RUNNER_VERBOSE=1 ./run.sh  # show uv sync output while preparing the environment

./run.sh keeps the Python bot out of a shell pipeline so Ctrl+C reaches it directly, writes bot output to logs/runs/run_*.log, and prints a short startup/exit banner. By default it clears stale exported Steam Idle Bot environment overrides so .env wins; set STEAM_IDLE_PRESERVE_ENV=1 when you intentionally want exported variables to override .env.

Full flag and setting reference: USAGE guide.


Configuration

Settings come from environment variables / a .env file (copy .env.example). The two required values are USERNAME and PASSWORD; everything else has sane defaults.

Key Default Purpose
STEAM_API_KEY — Library sync + badge filtering (recommended)
IDLING_BACKEND python native (recommended), python or steam_utility
MAX_GAMES_TO_IDLE 30 Cap (Steam hard limit: 32)
REFRESH_INTERVAL_SECONDS 600 How often the selection pipeline re-runs
CHECKPOINT_MINUTES 0 Write JSON/MD checkpoints every N min (0 = off)
DURATION_MINUTES 0 Stop after N min (0 = run until interrupted)
POST_RUN_VERIFY_SECONDS 0 Re-scrape card counts N s after stopping
AUTO_BROWSER_COOKIES true Recover a community session from a logged-in browser

🔐 Card-drop filtering needs an authenticated web:community session. See the authentication & accuracy guide.


Documentation

🇺🇸 English 🇧🇷 Português (BR)
Full guide README README
Command sheet USAGE USAGE
Security SECURITY SECURITY
Roadmap & backlog BACKLOG BACKLOG

Requirements

  • Python 3.12+ — managed for you by uv
  • A Steam account with games that have trading cards
  • Steam Web API key (recommended) — library sync + badge data
  • For drop filtering — an authenticated Steam web session

Contributing

Contributions welcome in both languages. Run uv run ruff check . && uv run mypy src && uv run pytest -q before opening a PR. See the developer guides: 🇺🇸 English · 🇧🇷 Português. The prioritized roadmap lives in BACKLOG.md.

License

MIT — see LICENSE. Not affiliated with Valve. Use responsibly and follow Steam's Terms of Service.

Metadata

Release files for steam-idle-bot 1.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for steam-idle-bot 1.1.1
File Size Uploaded Provenance Actions
steam_idle_bot-1.1.1.tar.gz 451.8 kB With provenance Details for steam_idle_bot-1.1.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for steam-idle-bot 1.1.1
File Interpreter ABI Platform Actions
steam_idle_bot-1.1.1-py3-none-any.whl Python 3 none any Details for steam_idle_bot-1.1.1-py3-none-any.whl

Total release size: 635.8 kB

Release files / steam_idle_bot-1.1.1.tar.gz

Download URL steam_idle_bot-1.1.1.tar.gz
Size 451.8 kB
Tags Source
SHA-256 checksum
How to use checksums
298f6cc8b6bec83d6667d280fc24b5ece9f6cd69ba32590de77c41ef92bddafc
BLAKE2b-256 checksum
How to use checksums
dc638c0e52dabd0fb78f9ae1b78f791d0743d6a3f1f9e5ea9408832cdff4a6fb
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 17, 2026.

Transparency log

Release files / steam_idle_bot-1.1.1-py3-none-any.whl

Download URL steam_idle_bot-1.1.1-py3-none-any.whl
Size 184.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
686791e8cbaf09a55ee9dee9f7be7b19d98128cc6de8b640e6ea69be5f437495
BLAKE2b-256 checksum
How to use checksums
ac693b584550d9246bcd25356d4fa935a2f3fcac8b262b3e0f3c4f221381509e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 17, 2026.

Transparency log

Security for steam-idle-bot 1.1.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for steam_idle_bot-1.1.1.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 17, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page