{"repo":"gotd/cli","free":true,"listed":false,"github":"https://github.com/gotd/cli","clone":"git clone https://github.com/gotd/cli.git","description":"The command line utility for Telegram","language":"Go","stars":30,"topics":["go","telegram","bot","cli","automation"],"license":"MIT","category":"cli-tools","readme_excerpt":"tg — Telegram CLI for humans and agents tg is a single static Go binary for driving a Telegram personal account (or a bot) from the command line or an AI agent: message yourself, list and triage chats, read history, send/forward/edit/delete messages, upload and download files, manage groups and channels, and stream new messages in real time. Built on gotd/td . Installation Download a prebuilt binary or package ( .deb / .rpm / .apk ) for your platform from the latest release. Quick start App credentials are required. The prebuilt release binaries embed them at build time and present the session as a desktop client, so tg init just works. If you build from source, provide your own from : tg init --app-id APP ID --app-hash APP HASH . The config is written to the gotd subdirectory of your config dir, e.g. /.config/gotd/gotd.cli.yaml . The session persists too, so subsequent commands run headless. On macOS the session is stored in the login Keychain by default; an existing file session is migrated into the Keychain automatically on first use. Set keychain: false in the config to keep it in a file alongside the config instead (useful for headless macOS). Other platforms always use a file. Login options Bot login still works too: provide a token via tg init --token and pass --bot to commands that support it (e.g. tg whoami --bot ). Agent-friendly by design - Structured output: --output json ( -o json ) on any command emits a stable envelope {\"schema\":1,\"data\":…} on stdout. Logs, pro","default_branch":null,"files":null,"tree":[],"storefront":"/r/gotd","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/gotd/cli/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}