Telegram
Migración desde tgcli
Pasa de tgcli a la CLI de Telegram: equivalencias de comandos de cuentas, archivos, bots, grupos, carpetas, contactos y búsqueda.
tgcli es otro cliente de línea de comandos para una cuenta personal de Telegram.
Esta página enumera cada comando de tgcli y su equivalente en tg. Cuando tg no tiene un equivalente,
la fila lo indica y explica el motivo.
En tg, el chat se indica como argumento, no con --chat ni --to: tg messages send "Book club" "hi".
Todos los comandos aceptan --json (cli-contract.md).
Inicio de sesión, perfiles y servicio en segundo plano
| tgcli | tg |
|---|---|
auth, auth --qr | tg session start (QR por defecto), tg session start phone |
auth status | tg account show, tg doctor --online |
auth logout | tg session end |
accounts add, --account <id> | un perfil: tg work chats list o TG_PROFILE=work (profiles.md) |
config get/set/unset | tg config show/set/unset (configuration.md) |
ajuste proxy, TELEGRAM_PROXY | ajuste proxy, TG_PROXY (configuration-reference.md) |
server, service install/start/stop/status/logs | tg serve, tg server start/stop/status/logs/install |
MCP mediante HTTP (mcp.enabled) | tg mcp --http (mcp.md, remote.md) |
sync --once, sync --follow | tg store fetch, tg serve (archive.md) |
sync jobs list/add/retry/cancel | tg store fetch --background, tg store jobs list/show/cancel |
owner request <id> | tg sends list y --send-id para repetir un envío de resultado desconocido |
doctor | tg doctor |
Lectura y búsqueda
| tgcli | tg |
|---|---|
channels list, groups list | tg chats list --kind channel, --kind group |
channels show, groups info, metadata get | tg chats show <chat> |
topics list/search | tg topics list/search <chat> |
messages list --chat … --topic … | tg messages list <chat> --topic <id> |
messages list --after/--before | --after-time, --before-time, --after-id, --before-id |
messages show, messages context | tg messages show, tg messages context |
messages search --after --before --tag --topic --regex | consulta: date:7d tag:work topic:12, --regex (query-language.md) |
messages search --source live/both | tg messages search --backend server/both (search.md) |
media download | tg messages download <chat> <id>, o un chat completo con --all |
contacts search, contacts show | tg contacts list --search, tg contacts show, tg contacts profile |
Enviar
| tgcli | tg |
|---|---|
send text, send photo, send file | tg messages send <chat> [text], con --photo o --file |
--parse-mode markdown | --md (usage.md) |
--parse-mode html | --html |
--reply-to, --topic, --silent, --no-preview | las mismas opciones |
--schedule <iso> | --at-time <time> |
--spoiler, --caption-above | las mismas opciones |
--force-document | --as-file |
--filename | --filename |
--retries, --retry-backoff | no hacen falta: una carga interrumpida se reintenta automáticamente y nunca se envía dos veces |
--no-forwards | no es posible: Telegram solo permite a los bots proteger un mensaje individual. Activa la protección de contenido propia del chat en Telegram. |