software-factory
MAmattpocock/skills336k近 7 天新增 4,217 个 star
Read and search the user's Telegram with the `tg` CLI - unread messages, chat history, search, downloads, and (only when enabled and asked) sending or marking read. Use when the user asks about Telegram, unread messages, what someone wrote, or to reply on Telegram.
tgtg <command> prints compact text and exits. Add --json for JSON. Run tg <command> --help for all flags.
tg whoami prints the logged in account.tg login in their terminal. Never try to log in yourself.tg unread: unread chats, newest unread messages of each. Start here. --chat X for one chat, --per-chat N, --muted to include muted chats.tg chats [--unread] [--query Q]: list chats.tg history CHAT [--limit N] [--before MSG_ID] [--after MSG_ID]: messages of a chat, oldest first.tg search QUERY [--chat CHAT]: search messages in all chats (archived included) or in one chat.tg download CHAT MSG_ID [--out DIR]: download a message file, prints its path.tg watch [--chat CHAT] [--mentions] [--count N] [--timeout S]: print new incoming messages as they arrive, one per line. --count 1 --timeout 600 waits for the next one and exits (exit 7 on timeout); run it in the background to get woken on a new message. While it runs it holds the Telegram session: other tg commands report busy and the tg TUI cannot start, so keep watches short.tg mark-read CHAT: mark a chat read. Only when the user asks.tg send CHAT TEXT (or - to read stdin): only when the user asks. Show the exact text and get confirmation before sending. Disabled unless the user set CLI_SEND = True in ~/.config/tg/conf.py. send and mark-read need an exact chat: id, @username, me, or the full title. pending=yes means Telegram queued the message and will send it later: never resend it.CHAT is a chat_id, @username, me (Saved Messages), or a chat title. If a title is ambiguous, tg lists candidates with their chat_id: use the id.
chat_id=... type=private|bot|group|supergroup|channel|secret title="..." [username=@...] unread=N [mentions=N] [muted=yes].msg_id=... date=YYYY-MM-DDTHH:MM from="..." [reply_to=MSG_ID] [forwarded=yes] [media=photo|video|voice|document|... name="..." size=... duration=...]: text.: that follows the from="..." field (and its optional fields). Newlines and other control characters in it are escaped (\n, \x1b), so every message is exactly one line. Long texts end with … (raise --max-chars to see more).chat_id is positive for users and bots, negative for groups and channels. Use it as is.next: <command> at the end means there is more: run that exact command to get the next page. more: under a chat does the same for that chat's older unread messages.mark-read or send unless the user asked for that specific action.--chat, --limit) over large dumps.MAmattpocock/skills336k近 7 天新增 4,217 个 star
MAmattpocock/skills336k近 7 天新增 4,217 个 star
AFaffaan-m/ECC314k近 7 天新增 3,503 个 star
AFaffaan-m/ECC314k近 7 天新增 3,503 个 star
AFaffaan-m/ECC314k近 7 天新增 3,503 个 star
DIDietrichGebert/ponytail202k近 7 天新增 4,226 个 star