{"id":50919478,"url":"https://github.com/sukiboo/tg_ids","last_synced_at":"2026-06-16T18:31:19.193Z","repository":{"id":361617015,"uuid":"1255119008","full_name":"sukiboo/tg_ids","owner":"sukiboo","description":"Fetch Telegram IDs for group participants 🛩️","archived":false,"fork":false,"pushed_at":"2026-05-31T13:05:37.000Z","size":4,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-05-31T15:06:23.775Z","etag":null,"topics":["telegram","utils"],"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/sukiboo.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":"2026-05-31T12:34:52.000Z","updated_at":"2026-05-31T13:05:41.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/sukiboo/tg_ids","commit_stats":null,"previous_names":["sukiboo/tg_ids"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/sukiboo/tg_ids","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sukiboo%2Ftg_ids","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sukiboo%2Ftg_ids/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sukiboo%2Ftg_ids/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sukiboo%2Ftg_ids/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sukiboo","download_url":"https://codeload.github.com/sukiboo/tg_ids/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sukiboo%2Ftg_ids/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34419046,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-16T02:00:06.860Z","response_time":126,"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":["telegram","utils"],"created_at":"2026-06-16T18:30:52.899Z","updated_at":"2026-06-16T18:31:19.011Z","avatar_url":"https://github.com/sukiboo.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Telegram CLI 🛩️\n\nA tiny CLI for your own Telegram account (logs in over MTProto, sees what your\napp sees). It currently does two things:\n\n- **Look up IDs** — chat \u0026 user IDs for your groups, channels, and DMs.\n- **Download history** — export a chat's full message history (and media) to disk.\n\n## Setup\n\n1. Get `api_id` + `api_hash` at https://my.telegram.org → **API development tools**.\n2. Install and configure:\n   ```bash\n   python3 -m venv .venv\n   ./.venv/bin/pip install -r requirements.txt\n   cp .env.example .env      # paste api_id + api_hash\n   chmod +x tg\n   ```\n3. Log in once (needs a real terminal):\n   ```bash\n   ./tg whoami               # prompts for phone + code (+ 2FA)\n   ```\n   Cached in `tg.session` — a full-account credential, gitignored. Keep it private.\n\n## Look up IDs\n\n```bash\n./tg whoami                          # your own account id\n./tg list                            # every chat: id, type, @username, name\n./tg list --type group supergroup    # filter by type\n./tg resolve @somebody               # id/@username/title -\u003e id + type + name\n./tg members \u003cid|@username|title\u003e    # list a group's members\n```\n\nIDs use the Bot API \"marked\" form: users positive, groups `-\u003cid\u003e`,\nsupergroups/channels `-100\u003cid\u003e`.\n\n## Download history\n\n```bash\n./tg history \u003cid|@username|title\u003e    # full history -\u003e export/\u003cid\u003e/messages.jsonl\n./tg history \u003cid\u003e --media            # also download photos/videos/docs\n./tg history \u003cid\u003e --limit 500        # only the most recent 500\n```\n\nOne JSON object per message (id, date, sender_id, text, reply/forward/media\nmarkers), sorted by id (chronological); media goes to `export/\u003cid\u003e/media/`.\nRe-running is idempotent — it skips saved messages, appends new ones, resumes\ninterrupted runs, and waits out rate limits. `export/` is gitignored.\n\n## Notes\n\n- Member lists are complete for basic groups and supergroups you admin; otherwise\n  Telegram returns a partial list.\n- `.env` and `tg.session` are secrets — never commit them.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsukiboo%2Ftg_ids","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsukiboo%2Ftg_ids","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsukiboo%2Ftg_ids/lists"}