{"id":28447047,"url":"https://github.com/mateconpizza/pytwitch","last_synced_at":"2025-06-30T06:32:34.794Z","repository":{"id":156474549,"uuid":"572214765","full_name":"mateconpizza/PyTwitch","owner":"mateconpizza","description":"📃 A user-friendly tool for easily accessing and watching live streams, videos, and clips from Twitch.","archived":false,"fork":false,"pushed_at":"2024-12-07T16:32:06.000Z","size":9792,"stargazers_count":6,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-06-06T11:09:10.157Z","etag":null,"topics":["dmenu","dmenu-scripts","dmenu-twitch","dmenu-wrapper","fzf","fzf-scripts","fzf-wrapper","rofi","rofi-menus","twitch","twitter-api","twtich-streams"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mateconpizza.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","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}},"created_at":"2022-11-29T19:48:05.000Z","updated_at":"2025-02-14T18:21:36.000Z","dependencies_parsed_at":"2024-12-07T17:32:20.413Z","dependency_job_id":null,"html_url":"https://github.com/mateconpizza/PyTwitch","commit_stats":null,"previous_names":["mateconpizza/pytwitch"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/mateconpizza/PyTwitch","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mateconpizza%2FPyTwitch","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mateconpizza%2FPyTwitch/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mateconpizza%2FPyTwitch/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mateconpizza%2FPyTwitch/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mateconpizza","download_url":"https://codeload.github.com/mateconpizza/PyTwitch/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mateconpizza%2FPyTwitch/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":262723765,"owners_count":23354105,"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","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":["dmenu","dmenu-scripts","dmenu-twitch","dmenu-wrapper","fzf","fzf-scripts","fzf-wrapper","rofi","rofi-menus","twitch","twitter-api","twtich-streams"],"created_at":"2025-06-06T11:09:12.681Z","updated_at":"2025-06-30T06:32:34.785Z","avatar_url":"https://github.com/mateconpizza.png","language":"Python","readme":"\u003cdiv align=\"center\"\u003e\n\n![Python](https://img.shields.io/badge/python-3670A0?style=Flat\u0026logo=python\u0026logoColor=ffdd54)\n[![Hatch project](https://img.shields.io/badge/%F0%9F%A5%9A-Hatch-4051b5.svg)](https://github.com/pypa/hatch)\n[![linting - Ruff](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/charliermarsh/ruff/main/assets/badge/v0.json)](https://github.com/charliermarsh/ruff)\n[![types - Mypy](https://img.shields.io/badge/types-Mypy-blue.svg)](https://github.com/python/mypy)\n[![License - MIT](https://img.shields.io/badge/license-MIT-9400d3.svg)](https://spdx.org/licenses/)\n\n\u003c/div\u003e\n\n## Twitch Menu\n\n### ⭐ About\n\nA user-friendly tool for accessing and watching live streams, videos, and clips\nfrom Twitch.\n\n### 📼 Video\n\nhttps://github.com/haaag/PyTwitch/assets/81921095/e8f07a06-d9dd-47e0-a6d4-f9fba455be16\n\n### ⚡️ Requirements\n\n- Player:\n  - [mpv](https://mpv.io/)\n- Launcher:\n  - 🔹[Rofi](https://github.com/davatorium/rofi) \u003csub\u003e_(default)_\u003c/sub\u003e\n  - [dmenu](https://tools.suckless.org/dmenu/)\n  - [fzf](https://github.com/junegunn/fzf)\n\n### 🔒Credentials\n\nFor authentication, you can set environment vars in your `shell` and export them or use the\n`.env` file and put it in the root of the project.\n\n[env-template](https://github.com/haaag/pytwitch/blob/main/env-template) file\n\n```bash\n# Twitch credentials\nTWITCH_CLIENT_ID=\"xxxxx\"\nTWITCH_ACCESS_TOKEN=\"xxx\"\nTWITCH_USER_ID=\"123456\"\n```\n\n#### 🔓Credentials directions\n\n- [Twitch token generator](https://twitchtokengenerator.com/)\n  - Scope: `user:read:follows`\n- [Twitch Channel ID and User ID Converter](https://www.streamweasels.com/tools/convert-twitch-username-to-user-id/)\n\n### 📦 Installation\n\n```bash\n# Clone repository\n$ git clone \"https://github.com/haaag/pytwitch.git\"\n$ cd pytwitch\n\n# Create virtual environment \u0026 source\n$ python -m venv .venv\n$ source .venv/bin/activate\n\n# Install requirements\n(.venv) $ pip install -r requirements.txt\n\n# Install\n(.venv) $ pip install .\n```\n\n### 🛠️ Usage\n\nAfter installation you can use the command `pytwitch`\n\nOr use a **alias** like `alias pt='pytwitch -e ~/path/to/envfile/.env'`\n\n```bash\n$ pytwtich -h\nSimple tool menu for watching streams, videos from twitch.\n\narguments:\n    -m, --menu          select menu [rofi|dmenu] (default: rofi)\n    -e, --env           path to env file\n    -C, --channel       search by channel query\n    -G, --games         search by game or category\n    -v, --verbose       increase verbosity (use -v, -vv, or -vvv)\n    -h, --help          show this help\n\noptions:\n    --no-markup         disable pango markup (rofi)\n    --no-conf           disable `mpv` configuration\n```\n\n### ⌨️ Keybinds \u003csub\u003e_Rofi only_\u003c/sub\u003e\n\n| Keybind       | Usage                       |\n| ------------- | --------------------------- |\n| **alt-k**     | list keybinds               |\n| **alt-s**     | search by category or game  |\n| **alt-c**     | search by channel           |\n| **alt-v**     | list channel's videos       |\n| **alt-t**     | group by category or game   |\n| **alt-o**     | open stream chat in browser |\n| **alt-i**     | show item information       |\n| **alt-m**     | show top streams            |\n| **alt-g**     | show top games with streams |\n| ~~**alt-m**~~ | ~~multi-select streams~~    |\n\n### 🔗 References\n\n- [Twitch API](https://dev.twitch.tv/docs/api/)\n- [Twitch API Reference](https://dev.twitch.tv/docs/api/reference)\n\n### ➕ Dependencies\n\n- [httpx](https://www.python-httpx.org/)\n- [python-dotenv](https://pypi.org/project/python-dotenv/)\n- [pyselector](https://pypi.org/project/pyselector/)\n- [mpv](https://pypi.org/project/mpv/)\n- [pydantic](https://pypi.org/project/pydantic/)\n- [tenacity](https://pypi.org/project/tenacity/)\n\n### 🧰 TODO\n\n- [ ] Finish tests\n- [x] Create/Update requirements/dependencies\n- [x] Complete Usage\n- [x] Update screenshots\n- [x] Better logging\n- [x] Update GIFs\n- [x] Update `argparse` help\n- [x] Display `keybinds`\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmateconpizza%2Fpytwitch","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmateconpizza%2Fpytwitch","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmateconpizza%2Fpytwitch/lists"}