Metadata-Version: 2.4
Name: steamggames
Version: 1.0.0
Summary: SteamGGames — CLI + TUI for browsing games on steamgg.net
Project-URL: Homepage, https://github.com/DevTroli/SteamGGames
Project-URL: Repository, https://github.com/DevTroli/SteamGGames
Project-URL: Issues, https://github.com/DevTroli/SteamGGames/issues
Project-URL: Changelog, https://github.com/DevTroli/SteamGGames/blob/main/CHANGELOG.md
Author-email: Troli <contato@pablotroli.com>
Maintainer: steamggames contributors
License: MIT
License-File: LICENSE
Keywords: browser,cli,cross-platform,games,scraper,steamgg,terminal,tui
Classifier: Development Status :: 4 - Beta
Classifier: Environment :: Console
Classifier: Intended Audience :: End Users/Desktop
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: MacOS :: MacOS X
Classifier: Operating System :: Microsoft :: Windows
Classifier: Operating System :: POSIX :: Linux
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Games/Entertainment
Classifier: Topic :: Internet :: WWW/HTTP :: Indexing/Search
Classifier: Topic :: Utilities
Requires-Python: >=3.10
Requires-Dist: aiofiles>=23.2.0
Requires-Dist: aiohttp>=3.9.0
Requires-Dist: beautifulsoup4>=4.12.0
Requires-Dist: brotli>=1.1.0
Requires-Dist: certifi
Requires-Dist: rich>=13.7.0
Requires-Dist: urllib3>=2.0.0
Provides-Extra: dev
Requires-Dist: mypy>=1.10.0; extra == 'dev'
Requires-Dist: pytest-asyncio>=0.23.0; extra == 'dev'
Requires-Dist: pytest>=8.0.0; extra == 'dev'
Requires-Dist: ruff>=0.6.0; extra == 'dev'
Description-Content-Type: text/markdown

# SteamGGames — CLI + TUI for steamgg.net

Interactive game browser for [steamgg.net](https://steamgg.net), right from the terminal.

**Author:** DevTroli · **License:** MIT · **Version:** 1.0

<sub><a href="README.md">🇺🇸 English</a> | <a href="README_pt.md">🇧🇷 Português</a></sub>

---

## Installation

**Global (recommended):**
```bash
pip install steamggames
steamggames
```

**Development:**
```bash
git clone https://github.com/DevTroli/SteamGGames.git && cd SteamGGames
uv venv && uv pip install -r requirements.txt
uv run steamggames
```

## Usage

```bash
steamggames                        # Interactive TUI mode
steamggames search "Elden Ring"    # Direct search
steamggames info <url>             # Game details
steamggames open <url>             # Open in browser
steamggames --refresh              # Force cache refresh
```

## TUI Commands

| Command | Action |
|---------|--------|
| `<text>` | Search by name |
| `info <n>` | Details for result #N |
| `info <url>` | Details from URL |
| `open <n>` | Open result #N in browser |
| `open <url>` | Open URL in browser |
| `next` / `n` | Next page |
| `prev` / `p` | Previous page |
| `refresh` | Clear cache and re-fetch |
| `help` / `h` | Help |
| `quit` / `q` | Quit |

## Features

- ⚡ **Async**: 8 concurrent connections (aiohttp) with semaphore
- 🛡️ **Anti-block**: 1.5~4.5s delay, backoff on 403/429/503, User-Agent rotation
- 📦 **Smart cache**: 4h for search, 12h for game page (XDG)
- 🔒 **SSL/TLS**: certifi CA bundle + SSRF protection
- 🎨 **Rich TUI**: colored interface with tables and panels
- 🔍 **Version extraction**: detects v1.2.3, Build N, Update N automatically
- 🔗 **Download links**: extracts `vc_btn3` buttons for datanodes.to, rootz.so, etc.

## Project Structure

```
steamggames/
├── __init__.py     # Version and metadata
├── config.py       # Constants, URLs, anti-block, cache config
├── models.py       # Dataclasses: SearchResult, GamePage, DownloadLink
├── utils.py        # User-Agent rotation, extract_version, helpers
├── cache.py        # Disk cache with TTL (XDG)
├── scraper.py      # Async scraper with multi-layer selectors
├── cli.py          # CLI with argparse + entry point
└── tui.py          # Interactive TUI with Rich
```

## Cache Location

Cache is stored at:
- **Linux/macOS**: `~/.cache/steamggames/`
- **Windows**: `%LOCALAPPDATA%\steamggames\`

To clear: use the `refresh` command in TUI, or delete the folder manually.

## Development

```bash
# Install dev dependencies
uv pip install -e ".[dev]"

# Lint
ruff check steamggames/

# Type check
mypy steamggames/

# Tests
pytest
```

---

> Not affiliated with steamgg.net. Use in accordance with the site's terms.
