Comandos de Telegram para la cuenta personal
Chats, mensajes, contactos, búsqueda, archivos, envío y respuestas automáticas en tu cuenta.
Esta referencia reúne comandos de cuenta personal. Consulta argumentos y opciones de chats, mensajes, contactos, búsqueda, archivos y envío.
Chats, mensajes, contactos, búsqueda, archivos, envío y respuestas automáticas en tu cuenta.
Opciones globales
| Option | What it does |
|---|---|
-V, --version | output the version number. |
-v, --verbose | more detail in what is shown: -v ids, -vv everything we know. Default: 0. |
--json | machine-readable output: one JSON value on stdout; --json=id,text keeps only those fields. |
--jsonl | machine-readable output: one JSON object per line, for streaming and jq. |
--quiet | diagnostics off; a failure is still said. |
--trace | the connection's own log lines on stderr — never message content. |
--debug | on a failure, its whole record — cause and stack — in place of the short line. |
--timeout <duration> | give up on the whole command after this — 30s, 2m, 500ms. |
--offline | answer from what was recorded and never connect; fails if nothing was. |
--no-input | never prompt or open interactive login; piped input remains available. |
--max-input-bytes <bytes> | maximum buffered input bytes (default: 16777216). |
--max-output-bytes <bytes> | maximum machine output bytes (default: 4194304; 0 disables). |
--brief | found messages as reference, title, time, sender and excerpt only. |
--full | found messages with their whole text and every provider field. |
--compact | one line per item for an agent: reference first, text last, paging and next steps as # lines. |
--dry-run | preview parsed arguments and permissions before running the action. |
--yes | go ahead without the question an ask level puts before a write. |
--record | keep this run even where the config says record false; record_input false leaves the typed words out. |
--no-record | do not keep this run, even if it fails. |
Comandos
tg chats
the account's chats
tg chats list
chats, newest first, archived ones included; the query is answered from the local store, so online, where the messenger filters nothing, it needs --offline
tg chats list [query] [options]| Argument | Obligatoriedad | What it is |
|---|---|---|
query | optional | field:value terms that narrow the list — the fields are below. |
| Option | What it does |
|---|---|
--limit <n> | how many to show. |
--page <n> | which page, starting at 1. |
--all | every row, no paging. |
Returns: chat — ref, id, title, kind, unread_count, last_message_at, participants_count, provider, and 14 more; every field: tg commands info chats list
Next usually: tg chats events <chat> [query], tg chats show <chat>, tg chats send-as <chat>
Example: tg personal chats list --limit 10
tg chats events
who joined, left, was added or removed, and by whom — from the chat's service messages; the last 7 days unless the query names time
tg chats events <chat> [query]| Argument | Obligatoriedad | What it is |
|---|---|---|
chat | required | a chat: its title or part of it, its id, @username, or me for Saved Messages. |
query | optional | field:value terms that narrow the list — the fields are below. |
Returns: chat event — chat_id, time, type, people, message_id, by, title, before; every field: tg commands info chats events
Example: tg personal chats events "Book club"
tg chats inspect
what an invite or public link leads to, without joining it
tg chats inspect <link>| Argument | Obligatoriedad | What it is |
|---|---|---|
link | required | an invite link or a public one. |
Returns: chat inspection — kind, title, id, username, participants_count, description, member, approval_needed; every field: tg commands info chats inspect
Example: tg personal chats inspect https://example.com/invite/book-club
tg chats show
one chat: its kind, unread count, last message time and who is in it
tg chats show <chat>| Argument | Obligatoriedad | What it is |
|---|---|---|
chat | required | a chat: its title or part of it, its id, @username, or me for Saved Messages. |
Returns: chat — ref, id, title, kind, unread_count, last_message_at, participants_count, provider, and 14 more; every field: tg commands info chats show
Next usually: tg chats events <chat> [query], tg chats send-as <chat>, tg chats documents list <chat> [query]
Example: tg personal chats show "Book club"
tg chats send-as
who this account may post as in a chat; changes no saved choice
tg chats send-as <chat>| Argument | Obligatoriedad | What it is |
|---|---|---|
chat | required | a chat: its title or part of it, its id, @username, or me for Saved Messages. |
Returns: chat sender — id, title, kind, premium_required, default; every field: tg commands info chats send-as
Example: tg personal chats send-as "Project room"
tg chats documents
the Google Docs and Drive documents linked in a chat's stored messages
tg chats documents list
every document link in the chat, newest first, and whether the store has it
tg chats documents list <chat> [query] [options]| Argument | Obligatoriedad | What it is |
|---|---|---|
chat | required | a chat: its title or part of it, its id, @username, or me for Saved Messages. |
query | optional | field:value terms that narrow the list — the fields are below. |
| Option | What it does |
|---|---|
--limit <n> | how many to show. |
--page <n> | which page, starting at 1. |
Returns: document link — ref, url, document_id, title, in_store, sent_at, sender; every field: tg commands info chats documents list
Example: tg personal chats documents list "Project room" --limit 10
tg chats mark-read
mark a chat read; the other side sees that you read it
Changes something in Telegram.
tg chats mark-read <chat> [options]| Argument | Obligatoriedad | What it is |
|---|---|---|
chat | required | a chat: its title or part of it, its id, @username, or me for Saved Messages. |
| Option | What it does |
|---|---|
--until-id <id> | only up to this message id; the newest by default. |
--topic <id> | mark only this forum topic read. |
Returns: chat read — operation_id, chat_id, until, thread_id; every field: tg commands info chats mark-read
Example: tg personal chats mark-read "Book club" --until-id 101
tg chats tracking
the chats whose member lists serve fetches daily into the local store — chats members fetch --track adds one
tg chats tracking list
every tracked chat: since when, and its last member count
tg chats tracking list [query]| Argument | Obligatoriedad | What it is |
|---|---|---|
query | optional | field:value terms that narrow the list — the fields are below. |
Returns: tracked chat — chat_id, title, tracked_at, last_count; every field: tg commands info chats tracking list
Example: tg personal chats tracking list
tg chats tracking show
one chat: whether it is tracked, and its member count per day for the last 30 days
tg chats tracking show <chat>| Argument | Obligatoriedad | What it is |
|---|---|---|
chat | required | a chat: its title or part of it, its id, @username, or me for Saved Messages. |
Returns: tracked chat history — chat_id, tracked_at, counts; every field: tg commands info chats tracking show
Example: tg personal chats tracking show "Book club"
tg chats tracking add
fetch this chat's member list daily while serve runs, from its next run
Changes something on this computer only.
tg chats tracking add <chat>| Argument | Obligatoriedad | What it is |
|---|---|---|
chat | required | a chat: its title or part of it, its id, @username, or me for Saved Messages. |
Returns: chat tracking — chat_id, tracked; every field: tg commands info chats tracking add
Example: tg personal chats tracking add "Book club"
tg chats tracking remove
stop fetching it daily; the history already kept stays
Changes something on this computer only.
tg chats tracking remove <chat>| Argument | Obligatoriedad | What it is |
|---|---|---|
chat | required | a chat: its title or part of it, its id, @username, or me for Saved Messages. |
Returns: chat tracking — chat_id, tracked; every field: tg commands info chats tracking remove
Example: tg personal chats tracking remove "Book club"
tg chats join
join a group or channel by its link; the others in it see that you joined
Changes something in Telegram.
tg chats join <link>| Argument | Obligatoriedad | What it is |
|---|---|---|
link | required | an invite link, or a public one. |
Returns: chat group change — operation_id, chat, requested; every field: tg commands info chats join
Example: tg personal chats join https://example.com/invite/book-club
tg chats leave
leave a group or channel; the others in it see that you left
Changes something in Telegram.
tg chats leave <chat>| Argument | Obligatoriedad | What it is |
|---|---|---|
chat | required | a chat: its title or part of it, its id, @username, or me for Saved Messages. |
Returns: chat removal — operation_id, chat_id; every field: tg commands info chats leave
Example: tg personal chats leave "Book club"
tg chats folders
your chat folders
tg chats folders list
your chat folders, in the order the app shows them
tg chats folders list [query]| Argument | Obligatoriedad | What it is |
|---|---|---|
query | optional | field:value terms; this list filters by none yet. |
Returns: folder — id, title, chat_ids, emoji, include, skip, excluded_chat_ids, pinned_chat_ids, and 3 more; every field: tg commands info chats folders list
Next usually: tg chats folders show <folder>, tg chats folders update <folder>, tg chats folders delete <folder>
Example: tg personal chats folders list
tg chats folders show
one chat folder, with the names of the chats in it
tg chats folders show <folder>| Argument | Obligatoriedad | What it is |
|---|---|---|
folder | required | the folder's id, or its title exactly. |
Returns: folder — id, title, chat_ids, emoji, include, skip, excluded_chat_ids, pinned_chat_ids, and 3 more; every field: tg commands info chats folders show
Next usually: tg chats folders update <folder>, tg chats folders delete <folder>, tg chats folders order <folders>
Example: tg personal chats folders show "Reading"
tg chats folders create
create a chat folder
Changes something in Telegram.
tg chats folders create <title> [options]| Argument | Obligatoriedad | What it is |
|---|---|---|
title | required | the folder's name; the app may refuse a long one. |
| Option | What it does |
|---|---|
--chat <chat> | a chat to put in it, by id or name; repeat it for more. |
--include <kinds> | every chat of these kinds: contacts, non-contacts, groups, channels, bots. |
--skip <which> | leave out chats that are muted, read, archived. |
--exclude-chat <chat> | never show this chat in it; repeat it for more. |
--pin <chat> | pin this chat at the top of the folder; repeat it for more. |
--emoji <emoji> | the folder's icon. |
Returns: chat folder change — operation_id, folder; every field: tg commands info chats folders create
Example: tg personal chats folders create "Reading" --chat "Book club"
tg chats folders update
rename a folder, or change which chats are in it
Changes something in Telegram.
tg chats folders update <folder> [options]| Argument | Obligatoriedad | What it is |
|---|---|---|
folder | required | folder id, or its title exactly. |
| Option | What it does |
|---|---|
--title <title> | a new name. |
--add <chat> | put a chat in it; repeat it for more. |
--remove <chat> | take a chat out of it, and off its excluded and pinned lists; repeat it for more. |
--include <kinds> | every chat of these kinds: contacts, non-contacts, groups, channels, bots; replaces what it had, none clears it. |
--skip <which> | leave out chats that are muted, read, archived; replaces what it had, none clears it. |
--exclude-chat <chat> | never show this chat in it; repeat it for more. |
--pin <chat> | pin this chat at the top of the folder; repeat it for more. |
--emoji <emoji> | the folder's icon. |
Returns: chat folder change — operation_id, folder; every field: tg commands info chats folders update
Example: tg personal chats folders update "Reading" --title "Books"
tg chats folders delete
delete a folder; the chats in it stay
Changes something in Telegram.
tg chats folders delete <folder>| Argument | Obligatoriedad | What it is |
|---|---|---|
folder | required | folder id, or its title exactly. |
Returns: chat folder removal — operation_id, folder_id; every field: tg commands info chats folders delete
Example: tg personal chats folders delete "Reading"
tg chats folders order
put folders in this order; the ones not named keep theirs after them
Changes something in Telegram.
tg chats folders order <folders>| Argument | Obligatoriedad | What it is |
|---|---|---|
folders | required | folder ids, or titles exactly, first one first. |
Returns: chat folder order — operation_id, folders; every field: tg commands info chats folders order
Example: tg personal chats folders order "Reading" "Work"
tg chats folders join
add a folder someone shared by a link; joins every chat in it, and the others there see you joined
Changes something in Telegram.
tg chats folders join <link>| Argument | Obligatoriedad | What it is |
|---|---|---|
link | required | the folder's link, as t.me/addlist/…. |
Returns: chat folder change — operation_id, folder; every field: tg commands info chats folders join
Example: tg personal chats folders join https://t.me/addlist/example
tg chats rules
what chats moderate judges a group by, kept in a file of this profile
tg chats rules show
the group's rules; the defaults, marked not saved, if it has none yet
tg chats rules show <chat>| Argument | Obligatoriedad | What it is |
|---|---|---|
chat | required | a chat: its title or part of it, its id, @username, or me for Saved Messages. |
Returns: chat rules — chat_id, title, file, saved, rules; every field: tg commands info chats rules show
Example: tg personal chats rules show "Book club"
tg chats rules set
change one rule; the group's first change writes every rule with its default
Changes something on this computer only.
tg chats rules set <chat> <key> <value>| Argument | Obligatoriedad | What it is |
|---|---|---|
chat | required | a chat: its title or part of it, its id, @username, or me for Saved Messages. |
key | required | one of: trusted, blocked, blockedNames, links, invites, forwards, blockedPeople, flood.messages, flood.minutes, flood.action, newAccount.days, newAccount.action, consent.delete, consent.remove. |
value | required | the new value; a list is comma-separated. |
Returns: chat rules — chat_id, title, file, saved, rules; every field: tg commands info chats rules set
Example: tg personal chats rules set "Book club" links report
tg chats rules unset
put one rule back to its default
Changes something on this computer only.
tg chats rules unset <chat> <key>| Argument | Obligatoriedad | What it is |
|---|---|---|
chat | required | a chat: its title or part of it, its id, @username, or me for Saved Messages. |
key | required | one of: trusted, blocked, blockedNames, links, invites, forwards, blockedPeople, flood.messages, flood.minutes, flood.action, newAccount.days, newAccount.action, consent.delete, consent.remove. |
Returns: chat rules — chat_id, title, file, saved, rules; every field: tg commands info chats rules unset
Example: tg personal chats rules unset "Book club" links
tg chats mute
stop notifications from a chat, for good or until a time; nobody in it is told
Changes something in Telegram.
tg chats mute <chat> [options]| Argument | Obligatoriedad | What it is |
|---|---|---|
chat | required | a chat: its title or part of it, its id, @username, or me for Saved Messages. |
| Option | What it does |
|---|---|
--until <time> | only until then: 2026-09-25T09:00 (local time), or 30m, 2h, 7d from now. |
Returns: chat muting — operation_id, chat_id, muted_until; every field: tg commands info chats mute
Example: tg personal chats mute "Book club", tg personal chats mute "Book club" --until 2h
tg chats unmute
hear a muted chat again
Changes something in Telegram.
tg chats unmute <chat>| Argument | Obligatoriedad | What it is |
|---|---|---|
chat | required | a chat: its title or part of it, its id, @username, or me for Saved Messages. |
Returns: chat muting — operation_id, chat_id, muted_until; every field: tg commands info chats unmute
Example: tg personal chats unmute "Book club"
tg chats archive
move a chat into the archive; nobody in it is told
Changes something in Telegram.
tg chats archive <chat>| Argument | Obligatoriedad | What it is |
|---|---|---|
chat | required | a chat: its title or part of it, its id, @username, or me for Saved Messages. |
Returns: chat archive — operation_id, chat_id, archived; every field: tg commands info chats archive
Example: tg personal chats archive 123456789
tg chats unarchive
bring an archived chat back to the chat list
Changes something in Telegram.
tg chats unarchive <chat>| Argument | Obligatoriedad | What it is |
|---|---|---|
chat | required | a chat: its title or part of it, its id, @username, or me for Saved Messages. |
Returns: chat archive — operation_id, chat_id, archived; every field: tg commands info chats unarchive
Example: tg personal chats unarchive 123456789
tg chats mark-unread
mark a chat unread on your own devices; nobody in it is told
Changes something in Telegram.
tg chats mark-unread <chat>| Argument | Obligatoriedad | What it is |
|---|---|---|
chat | required | a chat: its title or part of it, its id, @username, or me for Saved Messages. |
Returns: chat unread — operation_id, chat_id, unread; every field: tg commands info chats mark-unread
Example: tg personal chats mark-unread 123456789
tg chats start
start a bot, as its Start button does; the bot sees that you started it
Changes something in Telegram.
tg chats start <bot> [options]| Argument | Obligatoriedad | What it is |
|---|---|---|
bot | required | the chat with the bot — its id or its name — or the bot's link, even one never opened. |
| Option | What it does |
|---|---|
--start <param> | the start parameter the bot reads; a link's own ?start= when not given. |
Returns: start a bot, as its Start button does; the bot sees that you started it
Example: tg personal chats start "Example Bot"
tg chats app
the address that opens a bot's mini app, signed in as you — keep it to yourself
Changes something in Telegram.
tg chats app <bot> [options]| Argument | Obligatoriedad | What it is |
|---|---|---|
bot | required | the chat with the bot: its id or its name. |
| Option | What it does |
|---|---|
--start <param> | the start parameter the app reads. |
Returns: the address that opens a bot's mini app, signed in as you — keep it to yourself
Example: tg personal chats app "Example Bot"
tg contacts
people this account has a one-to-one chat with
tg contacts list
people you have a one-to-one chat with; name: matches the name, your local alias or the @username, notes: your private notes about them
tg contacts list [query] [options]| Argument | Obligatoriedad | What it is |
|---|---|---|
query | optional | field:value terms that narrow the list — the fields are below. |
| Option | What it does |
|---|---|
--limit <n> | how many to show. |
--page <n> | which page, starting at 1. |
--all | every row, no paging. |
--order <recent|name> | newest conversation first, or alphabetical. Default: recent. |
Returns: contact — ref, id, name, username, description, last_messaged_at, alias, display_name, and 15 more; every field: tg commands info contacts list
Next usually: tg contacts show <person>, tg contacts context <person>, tg contacts prepare <person>
Example: tg personal contacts list --limit 10
tg contacts show
one person: what the messenger says about them — handles, flags, last seen, phone, when they registered — your alias, the chats you share, how many of their messages the store holds in each, and the earlier names and usernames the store saw them with; --offline answers from the store alone
tg contacts show <person> [options]| Argument | Obligatoriedad | What it is |
|---|---|---|
person | required | their id, @username, or part of their name. |
| Option | What it does |
|---|---|
--with-notes | include your private notes, subject to contacts.notes.list permission. |
--hide-phone | leave the phone number out. |
Returns: contact — ref, id, name, username, description, last_messaged_at, alias, display_name, and 15 more; every field: tg commands info contacts show
Next usually: tg contacts context <person>, tg contacts prepare <person>, tg contacts events <person> [query]
Example: tg personal contacts show "Alex Example"
tg contacts context
what the local store holds about a person; --chat --sync-first explicitly asks Telegram first
tg contacts context <person> [options]| Argument | Obligatoriedad | What it is |
|---|---|---|
person | required | their id, @username, or part of their name. |
| Option | What it does |
|---|---|
--limit <n> | at most this many messages in each list; 10 if not given. |
--since-time <time> | nothing older than this ISO 8601 time, or 2h / 1d ago. |
--chat <chat> | a chat, by id or name; repeat it for more — then their newest messages in each, 20 unless --limit, short unless -v. |
--sync-first | with --chat, read their newest messages in each from the messenger first. |
Returns: contact context — person, accounts, shared, last, recent, mentions, limits, complete, and 3 more; every field: tg commands info contacts context
Example: tg personal contacts context "Alex Example" --limit 10
tg contacts prepare
before you talk to someone: what contacts context gives, plus the one-to-one chats where they wrote last, open tasks, accepted facts, your notes and their recent meetings, each with its reference; never connects
tg contacts prepare <person> [options]| Argument | Obligatoriedad | What it is |
|---|---|---|
person | required | their id, @username, or part of their name. |
| Option | What it does |
|---|---|
--limit <n> | at most this many messages, and items in each section; 10 if not given. |
--since-time <time> | no message or meeting older than this ISO 8601 time, or 2h / 1d ago. |
Returns: contact preparation — person, accounts, shared, last, recent, mentions, limits, complete, and 3 more; every field: tg commands info contacts prepare
Example: tg personal contacts prepare Ana
tg contacts events
everything one person took part in, in every messenger linked to them — messages they wrote or were mentioned in, chats, mail, meetings, tasks — newest first, from the store; only in this account's scope, personal or work, and scope: of the other one is refused; never connects
tg contacts events <person> [query] [options]| Argument | Obligatoriedad | What it is |
|---|---|---|
person | required | their id, @username, or part of their name. |
query | optional | field:value terms that narrow the list — the fields are below. |
| Option | What it does |
|---|---|
--limit <n> | at most this many; 50 if not given. |
--cursor <cursor> | go on from where the last page stopped; page.next gives it, with the same filters. |
Returns: contact activity — at, subject, subject_id, role, scope, provider, account, chat_id, and 2 more; every field: tg commands info contacts events
Example: tg personal contacts events "Alex Example" --limit 10
tg contacts check
whether one person looks like a bot, a fake or a spammer: their profile, what they wrote in the store, and the public ban lists (Combot Anti-Spam (CAS), lols.bot), which are sent their id — a hint, never a verdict
tg contacts check <person> [options]| Argument | Obligatoriedad | What it is |
|---|---|---|
person | required | their id, @username, or part of their name. |
| Option | What it does |
|---|---|
--no-registries | skip public ban lists; still ask Telegram for the profile and photos unless --offline. |
Returns: contact check — person, score, reasons, registries, unknown, checked_at; every field: tg commands info contacts check
Example: tg personal contacts check "Alex Example"
tg contacts link
record that two people in the store are one person — the same name is never enough
Changes something on this computer only.
tg contacts link <person> <other> [options]| Argument | Obligatoriedad | What it is |
|---|---|---|
person | required | their id, @username, or part of their name. |
other | required | the same in another messenger of the store, as : — max:Ana; me: it is you, as zoom: me. |
| Option | What it does |
|---|---|
--reason <text> | why they are one person; an agent's link is a proposal and needs it. |
Returns: linked person — uid, name, identities, proposal; every field: tg commands info contacts link
Example: tg personal contacts link "Alex Example" zoom:101
tg contacts unlink
undo contacts link for one identity: it is a person of its own again
Changes something on this computer only.
tg contacts unlink <person>| Argument | Obligatoriedad | What it is |
|---|---|---|
person | required | their id, @username, or part of their name; : for another messenger. |
Returns: linked person — uid, name, identities, proposal; every field: tg commands info contacts unlink
Example: tg personal contacts unlink "Alex Example"
tg contacts lookup
who has this phone number — asks for it, or reads it from stdin; never an argument
tg contacts lookupReturns: contact lookup — id, name, username; every field: tg commands info contacts lookup
Example: tg personal contacts lookup
tg contacts sync
take the whole contact list from the messenger into the local store
Changes something on this computer only.
tg contacts syncReturns: contact sync — added, changed, known; every field: tg commands info contacts sync
Example: tg personal contacts sync
tg contacts aliases
a private local display name in the selected account
tg contacts aliases set
your own name for a person in this account; kept on this machine, never sent
Changes something on this computer only.
tg contacts aliases set <person> <alias>| Argument | Obligatoriedad | What it is |
|---|---|---|
person | required | the person's id, reference or known name. |
alias | required | the private name to use for this person. |
Returns: contact alias — person_id, alias; every field: tg commands info contacts aliases set
Example: tg personal contacts aliases set "Alex Example" "Reading partner"
tg contacts aliases remove
drop your local name for a person; their own name shows again
Changes something on this computer only.
tg contacts aliases remove <person>| Argument | Obligatoriedad | What it is |
|---|---|---|
person | required | the person's id, reference or known name. |
Returns: contact alias — person_id, alias; every field: tg commands info contacts aliases remove
Example: tg personal contacts aliases remove "Alex Example"
tg contacts notes
your private notes on a stored contact, the same in every account that sees them
tg contacts notes list
every private note you keep on a person, oldest first
tg contacts notes list <person> [query]| Argument | Obligatoriedad | What it is |
|---|---|---|
person | required | the person's id, reference or known name. |
query | optional | field:value terms; this list filters by none yet. |
Returns: contact note — id, contact, text, revision, created_at, updated_at; every field: tg commands info contacts notes list
Example: tg personal contacts notes list "Alex Example"
tg contacts notes show
one private note on a person, with its revision for edit
tg contacts notes show <person> <id>| Argument | Obligatoriedad | What it is |
|---|---|---|
person | required | the person's id, reference or known name. |
id | required | the note id from contacts notes list. |
Returns: contact note — id, contact, text, revision, created_at, updated_at; every field: tg commands info contacts notes show
Example: tg personal contacts notes show "Alex Example" 1
tg contacts notes add
add a private note on a person from stdin or --text-file; never sent
Changes something on this computer only.
tg contacts notes add <person> [options]| Argument | Obligatoriedad | What it is |
|---|---|---|
person | required | the person's id, reference or known name. |
| Option | What it does |
|---|---|
--text-file <path> | read note text from a file; omitted or - reads stdin. |
Returns: contact note — id, contact, text, revision, created_at, updated_at; every field: tg commands info contacts notes add
Example: tg personal contacts notes add "Alex Example" --text-file ./note.txt
tg contacts notes edit
replace a note's text; --revision must match the one you read
Changes something on this computer only.
tg contacts notes edit <person> <id> [options]| Argument | Obligatoriedad | What it is |
|---|---|---|
person | required | the person's id, reference or known name. |
id | required | the note id from contacts notes list. |
| Option | What it does |
|---|---|
--text-file <path> | read note text from a file; omitted or - reads stdin. |
--revision <n> | the revision you read before editing. |
Returns: contact note — id, contact, text, revision, created_at, updated_at; every field: tg commands info contacts notes edit
Example: tg personal contacts notes edit "Alex Example" 1 --revision 1 --text-file ./note.txt
tg contacts notes remove
delete one private note on a person
Changes something on this computer only.
tg contacts notes remove <person> <id>| Argument | Obligatoriedad | What it is |
|---|---|---|
person | required | the person's id, reference or known name. |
id | required | the note id from contacts notes list. |
Returns: contact note removal — id, person_id, removed; every field: tg commands info contacts notes remove
Example: tg personal contacts notes remove "Alex Example" 1
tg contacts add
add a person to your contacts — contacts list still shows only people you have a dialog with
Changes something in Telegram.
tg contacts add <person>| Argument | Obligatoriedad | What it is |
|---|---|---|
person | required | person id — contacts lookup finds one — or part of a known name. |
Returns: contact update — operation_id, person; every field: tg commands info contacts add
Example: tg personal contacts add "Alex Example"
tg contacts remove
remove a person from your contacts; the chat stays, a name you gave them may not
Changes something in Telegram.
tg contacts remove <person>| Argument | Obligatoriedad | What it is |
|---|---|---|
person | required | person id — contacts lookup finds one — or part of a known name. |
Returns: contact state change — operation_id, person_id; every field: tg commands info contacts remove
Example: tg personal contacts remove "Alex Example"
tg contacts block
stop a person from writing to you — they need not be a contact
Changes something in Telegram.
tg contacts block <person>| Argument | Obligatoriedad | What it is |
|---|---|---|
person | required | person id — contacts lookup finds one — or part of a known name. |
Returns: contact state change — operation_id, person_id; every field: tg commands info contacts block
Example: tg personal contacts block "Alex Example"
tg contacts unblock
let a blocked person write to you again
Changes something in Telegram.
tg contacts unblock <person>| Argument | Obligatoriedad | What it is |
|---|---|---|
person | required | person id — contacts lookup finds one — or part of a known name. |
Returns: contact state change — operation_id, person_id; every field: tg commands info contacts unblock
Example: tg personal contacts unblock "Alex Example"
tg contacts rename
rename the contact in the messenger address book; use contacts alias for a private local name
Changes something in Telegram.
tg contacts rename <person> <first-name> [last-name]| Argument | Obligatoriedad | What it is |
|---|---|---|
person | required | person id — contacts lookup finds one — or part of a known name. |
first-name | required | the name you want to see for them. |
last-name | optional | the last name you want to see for them. |
Returns: contact update — operation_id, person; every field: tg commands info contacts rename
Example: tg personal contacts rename "Alex Example" Alex Example
tg contacts import
upload phone numbers and add the people the messenger has under them
Changes something in Telegram.
tg contacts import <file>| Argument | Obligatoriedad | What it is |
|---|---|---|
file | required | one person per line: number, then a comma, a tab or a semicolon, then the name. |
Returns: contact import — operation_id, sent, recognised; every field: tg commands info contacts import
Example: tg personal contacts import ./contacts.csv
tg messages
read and send messages
tg messages evidence
general chat context, newest first, with references, coverage and fingerprints for verification
tg messages evidence <chat> [options]| Argument | Obligatoriedad | What it is |
|---|---|---|
chat | required | a chat: its title or part of it, its id, @username, or me for Saved Messages. |
| Option | What it does |
|---|---|
--limit <n> | how many, 1–100. |
--cursor <cursor> | go on from where page.next says the last packet stopped. |
Returns: evidence packet — schema_version, id, kind, source, fingerprint, limits, content_bytes, coverage, and 1 more; every field: tg commands info messages evidence
Example: tg personal messages evidence "Book club" --limit 10
tg messages list
a chat's messages, oldest to newest
tg messages list <chat> [query] [options]| Argument | Obligatoriedad | What it is |
|---|---|---|
chat | required | a chat: its title or part of it, its id, @username, or me for Saved Messages. |
query | optional | where to start or which window, and which topic: id<42, date>=2026-10-01 date<2026-10-20, topic:12. |
| Option | What it does |
|---|---|
--limit <n> | how many. |
--cursor <cursor> | go on from where the last page stopped; page.next gives it. |
--transcribe | turn voice messages not heard yet into text — by the messenger where it can, else by a model on this machine; can take minutes. |
--model <model> | which downloaded speech model hears them, with --transcribe; models list shows them. |
Returns: message — ref, id, chat_id, sender_id, sender_name, sender_is_me, timestamp, edited_at, and 31 more; every field: tg commands info messages list
Next usually: tg messages transcribe <chat> <message>, tg messages comments <chat> <post> [query], tg messages links <chat> <message>
Example: tg personal messages list "Book club" --limit 20
tg messages send
send a text message; without [text], the text is read from stdin
Changes something in Telegram.
tg messages send <chat> [text] [options]| Argument | Obligatoriedad | What it is |
|---|---|---|
chat | required | a chat: its title or part of it, its id, @username, or me for Saved Messages. |
text | optional | the message. |
| Option | What it does |
|---|---|
--topic <id> | send to this forum topic. |
--draft | save the text as a draft for the owner to review and send. |
--reply-to <message> | answer this message, by its id in the same chat. |
--comment-to <post> | comment on this post of the channel; it goes to the post's discussion group. |
--send-as <id> | post as one of the identities chats send-as lists; required where the chat posts as someone else by default. |
--operation-id <id> | repeat a send whose outcome was unknown, without risking a second copy. |
--silent | deliver without a notification. |
--no-preview | no preview card for a link in the text. |
--md | read this messenger's Markdown; see its formatting guide for supported syntax. |
--file <file> | attach a file; the text becomes its caption; repeat it for an album. Default: ``. |
--photo <file> | attach a .jpg, .png or .webp as a photo; the text becomes its caption; repeat it for an album. Default: ``. |
--as-file | send each --file as a file to download, a video included. |
--voice <file> | send an Ogg Opus file as a voice message, alone, with no text. |
--allow-any-file | send a file even from credential folders or this CLI's own folders. |
--at-time <time> | let the messenger send it later, even with this machine off: 2026-09-25T09:00 (local time), or 30m, 2h, 1d from now. |
--spoiler | hide the --photo or video behind a spoiler until tapped. |
--caption-above | show the text above the --photo or --file, not below it. |
--filename <name> | the name others see for the --file, instead of its name on disk. |
--html | the text is HTML: , , , . |
Returns: message send — operation_id, message, messages, scheduled_for, chat_id, saved; every field: tg commands info messages send
Example: tg personal messages send "Book club" "The meeting starts at 10."
tg messages show
one message, by its chat and id or by its msg: locator
tg messages show <chat> [message]| Argument | Obligatoriedad | What it is |
|---|---|---|
chat | required | a chat: its title or part of it, its id, @username, or me for Saved Messages; or a msg: locator, with no message id after it. |
message | optional | the message id. |
Returns: message — ref, id, chat_id, sender_id, sender_name, sender_is_me, timestamp, edited_at, and 31 more; every field: tg commands info messages show
Next usually: tg messages transcribe <chat> <message>, tg messages comments <chat> <post> [query], tg messages links <chat> <message>
Example: tg personal messages show "Book club" 101
tg messages context
a message and what came either side of it, oldest first
tg messages context <chat> [message] [options]| Argument | Obligatoriedad | What it is |
|---|---|---|
chat | required | a chat: its title or part of it, its id, @username, or me for Saved Messages; or a msg: locator, with no message id after it. |
message | optional | the message id. |
| Option | What it does |
|---|---|
--thread | the stored reply chain and replies instead of time neighbours; falls back when no graph exists. |
--thread-hops <n> | at most this many links from the hit (default: 8). |
--thread-messages <n> | at most this many messages in each thread context (default: 50). |
--thread-bytes <n> | at most this many bytes of whole messages and links in each context (default: 65536). |
--thread-within <duration> | messages within this long either side of the hit (default: 1d). |
--before-n <n> | how many before it. Default: 5. |
--after-n <n> | how many after it. Default: 5. |
Returns: message context — ref, id, chat_id, sender_id, sender_name, sender_is_me, timestamp, edited_at, and 42 more; every field: tg commands info messages context
Example: tg personal messages context "Book club" 101 --before-n 3 --after-n 3
tg messages download
save a message's photos, files, videos and voice notes to a folder — or a whole chat's with --all; with --offline, copy the ones this computer already holds, one by --attachment
Changes something on this computer only.
tg messages download <chat> [message] [options]| Argument | Obligatoriedad | What it is |
|---|---|---|
chat | required | a chat: its title or part of it, its id, @username, or me for Saved Messages; or a msg: locator, with no message id after it. |
message | optional | the message id; left out with --all or a locator. |
| Option | What it does |
|---|---|
--output-dir <dir> | where to save them; created if missing. Default: .. |
--attachment <n> | which file of the message, from 1; needed when it has more than one. |
--all | every file of the chat, newest first; run it again to continue where it stopped. |
--pause <duration> | with --all, a pause between pages, to stay under the provider's limits. Default: 1s. |
--extract | read text layers from the files this download maps into the local content index. |
Returns: message download — files, extraction, complete, batch, chat, saved, existing, stopped; every field: tg commands info messages download
Example: tg personal messages download "Book club" 101 --output-dir ./downloads, tg personal messages download msg:telegram/me/500/101 --attachment 1 --offline
tg messages transcribe
a voice message as text — by Telegram where it can, else by a model on this machine
tg messages transcribe <chat> <message> [options]| Argument | Obligatoriedad | What it is |
|---|---|---|
chat | required | a chat: its title or part of it, its id, @username, or me for Saved Messages. |
message | required | the id of a voice message. |
| Option | What it does |
|---|---|
--local | use the model on this machine, never the messenger. |
--model <model> | which downloaded model; implies --local (models list). |
Returns: message transcript — message_id, text, pending, via, model; every field: tg commands info messages transcribe
Example: tg personal messages transcribe "Book club" 101
tg messages edit
change the text of your own message; the other side may have read it already
Changes something in Telegram.
tg messages edit <chat> <message> [text] [options]| Argument | Obligatoriedad | What it is |
|---|---|---|
chat | required | a chat: its title or part of it, its id, @username, or me for Saved Messages. |
message | required | the id of your own message. |
text | optional | the new text; without it, read from stdin. |
| Option | What it does |
|---|---|
--md | read this messenger's Markdown; see its formatting guide for supported syntax. |
--html | the text is HTML: , , , . |
Returns: message write — operation_id, message, messages, scheduled_for; every field: tg commands info messages edit
Example: tg personal messages edit "Book club" 101 "The meeting starts at 11."
tg messages delete
delete messages for you only; with --for-everyone, for everyone in the chat
Changes something in Telegram.
tg messages delete <chat> <message> [options]| Argument | Obligatoriedad | What it is |
|---|---|---|
chat | required | a chat: its title or part of it, its id, @username, or me for Saved Messages. |
message | required | the message ids, by spaces or commas, at most 10. |
| Option | What it does |
|---|---|
--for-everyone | delete for everyone in the chat, not only for you — they cannot get it back. |
--allow-dangerous | go ahead without the question an ask level puts before a deletion. |
Returns: message deletion — operation_id, chat_id, deleted, for_everyone; every field: tg commands info messages delete
Example: tg personal messages delete "Book club" 101
tg messages forward
forward one message to another chat
Changes something in Telegram.
tg messages forward <chat> <message> [options]| Argument | Obligatoriedad | What it is |
|---|---|---|
chat | required | the chat the message is in: a chat: its title or part of it, its id, @username, or me for Saved Messages. |
message | required | the message id. |
| Option | What it does |
|---|---|
--to <chat> | where it goes: a chat: its title or part of it, its id, @username, or me for Saved Messages. |
--silent | deliver it without a notification. |
--send-as <id> | post as one of the identities chats send-as lists for the --to chat; required where the chat posts as someone else by default. |
--operation-id <id> | repeat a forward whose outcome was unknown, without risking a second copy. |
--topic <id> | forward into this forum topic of the --to chat. |
Returns: message write — operation_id, message, messages, scheduled_for; every field: tg commands info messages forward
Example: tg personal messages forward "Book club" 101 --to "Project room"
tg messages pin
pin a message in a chat, quietly unless --notify
Changes something in Telegram.
tg messages pin <chat> <message> [options]| Argument | Obligatoriedad | What it is |
|---|---|---|
chat | required | a chat: its title or part of it, its id, @username, or me for Saved Messages. |
message | required | the message id. |
| Option | What it does |
|---|---|
--notify | tell the chat's members about the pin. |
Returns: message pin — operation_id, chat_id, message_id, pinned; every field: tg commands info messages pin
Example: tg personal messages pin <chat> <message>, tg personal messages pin <chat> <message> --notify
tg messages unpin
unpin a message in a chat
Changes something in Telegram.
tg messages unpin <chat> <message>| Argument | Obligatoriedad | What it is |
|---|---|---|
chat | required | a chat: its title or part of it, its id, @username, or me for Saved Messages. |
message | required | the message id. |
Returns: message pin — operation_id, chat_id, message_id, pinned; every field: tg commands info messages unpin
Example: tg personal messages unpin <chat> <message>
tg messages press
press a bot's button under a message; the bot sees that you pressed it
Changes something in Telegram.
tg messages press <chat> <message> <button>| Argument | Obligatoriedad | What it is |
|---|---|---|
chat | required | a chat: its title or part of it, its id, @username, or me for Saved Messages. |
message | required | the id of the message with the buttons. |
button | required | its number as messages show prints it, or its exact text. |
Returns: press a bot's button under a message; the bot sees that you pressed it
Example: tg personal messages press "Example Bot" 101 1
tg messages scheduled
messages waiting to be sent later in a chat, soonest first; cancel one in the app
tg messages scheduled <chat>| Argument | Obligatoriedad | What it is |
|---|---|---|
chat | required | a chat: its title or part of it, its id, @username, or me for Saved Messages. |
Returns: message — ref, id, chat_id, sender_id, sender_name, sender_is_me, timestamp, edited_at, and 31 more; every field: tg commands info messages scheduled
Next usually: tg messages transcribe <chat> <message>, tg messages comments <chat> <post> [query], tg messages links <chat> <message>
Example: tg personal messages scheduled "Book club"
tg messages link
a message permalink when supported, and its account-scoped locator
tg messages link <chat> [message]| Argument | Obligatoriedad | What it is |
|---|---|---|
chat | required | a chat: its title or part of it, its id, @username, or me for Saved Messages; or a msg: locator, with no message id after it. |
message | optional | the message id. |
Returns: message link — ref, url, access, reason, files; every field: tg commands info messages link
Next usually: tg messages transcribe <chat> <message>, tg messages comments <chat> <post> [query], tg messages links <chat> <message>
Example: tg personal messages link "Book club" 101
tg messages comments
the comments under a channel post, oldest to newest; they live in its discussion group
tg messages comments <chat> <post> [query] [options]| Argument | Obligatoriedad | What it is |
|---|---|---|
chat | required | the channel: a chat: its title or part of it, its id, @username, or me for Saved Messages. |
post | required | the post's message id in the channel. |
query | optional | where to start: id<42. |
| Option | What it does |
|---|---|
--limit <n> | how many. |
--cursor <cursor> | go on from where the last page stopped; page.next gives it. |
Returns: message — ref, id, chat_id, sender_id, sender_name, sender_is_me, timestamp, edited_at, and 31 more; every field: tg commands info messages comments
Next usually: tg messages transcribe <chat> <message>, tg messages links <chat> <message>, tg reactions list <chat> <message> [query]
Example: tg personal messages comments "News channel" 101 --limit 20
tg messages links
why a message is in its conversation: each link it has, and the chain of answers back to the start
tg messages links <chat> <message>| Argument | Obligatoriedad | What it is |
|---|---|---|
chat | required | a chat: its title or part of it, its id, @username, or me for Saved Messages. |
message | required | the message id. |
Returns: message links — chat, message, links, chain; every field: tg commands info messages links
Example: tg personal messages links "Book club" 101
tg messages sync
bring a chat's history in the local store up to date, newest first; run it again to continue; --all syncs every chat; with --json, stderr carries progress lines: {"event":"progress","step":"sync","chats","chats_done","fetched"}, counts only
Changes something on this computer only.
tg messages sync [chat] [options]| Argument | Obligatoriedad | What it is |
|---|---|---|
chat | optional | a chat: its title or part of it, its id, @username, or me for Saved Messages. |
| Option | What it does |
|---|---|
--all | every chat, most recently active first — what search needs; the last 90d unless --since-time or --last; muted chats only with --with-muted or history_muted true. |
--limit <n> | at most this many messages in this run, per chat with --all; 1000 if not given. |
--page-size <n> | how many messages one request asks for; 100 if not given. |
--pause <duration> | pause between pages, to stay under the provider's limits. Default: 1s. |
--since-time <time> | stop once it reaches messages older than this: ISO 8601, or 2h / 1d ago. |
--last <n> | stop once the newest n messages are held. |
--catch-up | prepare local search after this run; overrides search_catch_up. |
--no-catch-up | skip local preparation after this run. |
--catch-up-chunks <n> | at most this many local vector chunks. |
--catch-up-messages <n> | skip a graph rebuild larger than this many messages. |
--catch-up-time <duration> | local preparation time budget, 30s by default. |
--full-history | read and keep this chat's history in full from now on, past the history limits (history_* settings). |
--with-muted | with --all: also read the chats the owner muted, as history_muted true does. |
--background | run as a job that outlives this command; store jobs show follows it. |
--dry-run | only estimate how many messages, requests and minutes a full fetch would still take — from the store, no request. |
Returns: message sync — chat, held, ranges, missing, requests, runs, seconds, fetched, and 17 more; every field: tg commands info messages sync
Example: tg personal messages sync "Book club" --last 100
tg reactions
react to messages
tg reactions list
who reacted to a message, newest first; refused where the chat hides the list
tg reactions list <chat> <message> [query] [options]| Argument | Obligatoriedad | What it is |
|---|---|---|
chat | required | a chat: its title or part of it, its id, @username, or me for Saved Messages. |
message | required | the message id. |
query | optional | field:value terms that narrow the list — the fields are below. |
| Option | What it does |
|---|---|
--limit <n> | how many to show. |
--cursor <cursor> | go on from where the last page stopped; page.next gives it. |
Returns: reaction — person, reaction, reacted_at; every field: tg commands info reactions list
Example: tg personal reactions list "Book club" 101 reaction:🔥 --limit 20
tg reactions add
put your reaction on a message; it replaces the one you had
Changes something in Telegram.
tg reactions add <chat> <message> <emoji>| Argument | Obligatoriedad | What it is |
|---|---|---|
chat | required | a chat: its title or part of it, its id, @username, or me for Saved Messages. |
message | required | the message id. |
emoji | required | one emoji, for example 👍. |
Returns: reaction change — operation_id, chat_id, message_id, reaction; every field: tg commands info reactions add
Example: tg personal reactions add "Book club" 101 👍
tg reactions remove
take your reaction off a message
Changes something in Telegram.
tg reactions remove <chat> <message>| Argument | Obligatoriedad | What it is |
|---|---|---|
chat | required | a chat: its title or part of it, its id, @username, or me for Saved Messages. |
message | required | the message id. |
Returns: reaction change — operation_id, chat_id, message_id, reaction; every field: tg commands info reactions remove
Example: tg personal reactions remove "Book club" 101
tg polls
read a poll, vote in it, close your own, create one
tg polls show
a poll and its answer ids, as the message carries it now
tg polls show <chat> <message>| Argument | Obligatoriedad | What it is |
|---|---|---|
chat | required | a chat: its title or part of it, its id, @username, or me for Saved Messages. |
message | required | the id of the message that carries the poll. |
Returns: poll — chat_id, message_id, question, answers, closed, multiple, anonymous, voters, and 3 more; every field: tg commands info polls show
Example: tg personal polls show "Book club" 101
tg polls voters
who voted for what, newest first; not in an anonymous poll
tg polls voters <chat> <message> [query] [options]| Argument | Obligatoriedad | What it is |
|---|---|---|
chat | required | a chat: its title or part of it, its id, @username, or me for Saved Messages. |
message | required | the id of the message that carries the poll. |
query | optional | field:value terms that narrow the list — the fields are below. |
| Option | What it does |
|---|---|
--limit <n> | how many to show. |
--page <n> | which page, starting at 1. |
Returns: poll vote — person_id, name, username, answers, voted_at; every field: tg commands info polls voters
Example: tg personal polls voters "Book club" 101 answers:0 --limit 10
tg polls vote
vote in a poll, or take your vote back; the others see it unless the poll is anonymous
Changes something in Telegram.
tg polls vote <chat> <message> [answers] [options]| Argument | Obligatoriedad | What it is |
|---|---|---|
chat | required | a chat: its title or part of it, its id, @username, or me for Saved Messages. |
message | required | the id of the message that carries the poll. |
answers | optional | answer ids, as polls show prints them. |
| Option | What it does |
|---|---|
--retract | take your vote back. |
Returns: poll change — operation_id, poll; every field: tg commands info polls vote
Example: tg personal polls vote "Book club" 101 0
tg polls close
close your own poll; nobody can vote after that, and it cannot be reopened
Changes something in Telegram.
tg polls close <chat> <message>| Argument | Obligatoriedad | What it is |
|---|---|---|
chat | required | a chat: its title or part of it, its id, @username, or me for Saved Messages. |
message | required | the id of your own message that carries the poll. |
Returns: poll change — operation_id, poll; every field: tg commands info polls close
Example: tg personal polls close "Book club" 101
tg polls create
send a poll to a chat, as a message of its own; public unless --anonymous
Changes something in Telegram.
tg polls create <chat> <question> <answers> [options]| Argument | Obligatoriedad | What it is |
|---|---|---|
chat | required | a chat: its title or part of it, its id, @username, or me for Saved Messages. |
question | required | the question. |
answers | required | two answers or more. |
| Option | What it does |
|---|---|
--topic <id> | send to this forum topic. |
--multiple | people may pick several answers. |
--anonymous | nobody sees who voted for what. |
--revote | people may change their vote. |
--silent | send without a notification. |
--send-as <id> | post as one of the identities chats send-as lists; required where the chat posts as someone else by default. |
--operation-id <id> | repeat a create whose outcome was unknown, without risking a second poll. |
--quiz | a quiz: one answer is right, and a vote is final. |
--correct <n> | with --quiz: the right answer's position, from 1. |
--solution <text> | with --quiz: what people see once they answered. |
--close-time <delay> | it closes by itself this long after sending: 5s to 10m, like 90s or 5m. |
Returns: message write — operation_id, message, messages, scheduled_for; every field: tg commands info polls create
Example: tg personal polls create "Book club" "Which day?" Monday Tuesday
tg inbox
other people's unread messages in every chat; --new for what arrived since the last check
tg inbox [query] [options]| Argument | Obligatoriedad | What it is |
|---|---|---|
query | optional | from when: date>2h, date>2026-10-01; the saved point stays put. |
| Option | What it does |
|---|---|
--new | what arrived since the last check, each message once — for scheduled runs. |
--limit <n> | at most this many per chat, the newest. |
--all | muted and archived chats too — left out unless they mention you or reply to you. |
--transcribe | turn voice messages not heard yet into text — by the messenger where it can, else by a model on this machine; can take minutes. |
--model <model> | which downloaded speech model hears them, with --transcribe; models list shows them. |
Returns: message summary — ref, chat_id, timestamp, sender_name, sender_is_me, outgoing, text, attachments, and 4 more; every field: tg commands info inbox
Next usually: tg messages transcribe <chat> <message>, tg messages comments <chat> <post> [query], tg messages links <chat> <message>
Example: tg personal inbox --limit 10
tg review
every message, yours too, in chats that changed since a point — for reviewing who owes what
tg review [query] [options]| Argument | Obligatoriedad | What it is |
|---|---|---|
query | optional | where the last review ended and which chat: date>2h, chat:"Book club"; 3 days ago if no date. |
| Option | What it does |
|---|---|
--unanswered [duration] | only questions to you or a group's admins that nobody answered, asked at least this long ago — 4h, 1d; 24h if not given. |
--all | muted and archived chats too — left out unless they mention you or reply to you. |
--transcribe | turn voice messages not heard yet into text — by the messenger where it can, else by a model on this machine; can take minutes. |
--model <model> | which downloaded speech model hears them, with --transcribe; models list shows them. |
--new | what changed since the last review --new, a point per chat — for scheduled runs. |
Returns: message summary — ref, chat_id, timestamp, sender_name, sender_is_me, outgoing, text, attachments, and 4 more; every field: tg commands info review
Next usually: tg messages transcribe <chat> <message>, tg messages comments <chat> <post> [query], tg messages links <chat> <message>
Example: tg personal review "date>2h"
tg topics
the topics of a forum group
tg topics list
a forum group's topics, newest activity first
tg topics list <chat> [query] [options]| Argument | Obligatoriedad | What it is |
|---|---|---|
chat | required | a chat: its title or part of it, its id, @username, or me for Saved Messages. |
query | optional | field:value terms that narrow the list — the fields are below. |
| Option | What it does |
|---|---|
--limit <n> | how many to show. |
--page <n> | which page, starting at 1. |
--all | every row, no paging. |
Returns: topic — id, title, closed, pinned, unread_count, last_message_at, created_at, hidden, and 1 more; every field: tg commands info topics list
Next usually: tg topics show <chat> <topic>, tg topics edit <chat> <topic>, tg topics delete <chat> <topic>
Example: tg personal topics list Team
tg topics show
one forum topic: its title, state and last activity
tg topics show <chat> <topic>| Argument | Obligatoriedad | What it is |
|---|---|---|
chat | required | a chat: its title or part of it, its id, @username, or me for Saved Messages. |
topic | required | the topic id, from topics list. |
Returns: one forum topic: its title, state and last activity
Example: tg personal topics show Team General
tg topics icons
the emojis a forum topic can take as its icon
tg topics icons list
the emojis --emoji takes in topics create and topics edit
tg topics icons list [query]| Argument | Obligatoriedad | What it is |
|---|---|---|
query | optional | field:value terms; this list filters by none yet. |
Returns: topic icon — emoji; every field: tg commands info topics icons list
Example: tg personal topics icons list
tg schedule
run a tg command or an agent later or on a timer (systemd, launchd, Task Scheduler); an agent cannot send
tg schedule command
run tg <args…> on a timer — reads save what they read, so this is how a chat's history fills the store
Changes something on this computer only.
tg schedule command <name> <args> [options]| Argument | Obligatoriedad | What it is |
|---|---|---|
name | required | lowercase letters, digits and dashes. |
args | required | the tg command after its name, e.g. -- messages list --limit 50. |
| Option | What it does |
|---|---|
--every <duration> | repeat: 30m, 2h, 1d. |
--at <HH:MM> | every day at this local time; 'mon 09:00' once a week, 'mon,fri 09:00' on several days (mon, tue, wed, thu, fri, sat, sun); repeat it for more times. |
--at-time <time> | one run: 30m, 2d from now, or an ISO time; the schedule removes itself after it. |
--notify-on <when> | desktop notice after a run (default failures for an agent that repeats with --every, else always). One of: always, failures, never. |
--deliver-to <route> | also send the result, when --notify-on says so, by the owner's own tg or mail: telegram-bot:/, or email:/; repeat it for more. |
Returns: run tg <args…> on a timer — reads save what they read, so this is how a…
Example: tg personal schedule command health --every 1h -- doctor, tg personal schedule command morning-check --at 08:00 -- doctor
tg schedule agent
start an agent (claude or codex) with a prompt on a timer; it runs with TG_READ_ONLY=1, so it reads and drafts and cannot send — its answer is kept and you are notified
Changes something on this computer only.
tg schedule agent <name> <harness> <prompt> [options]| Argument | Obligatoriedad | What it is |
|---|---|---|
name | required | lowercase letters, digits and dashes. |
harness | required | the agent to start. One of: claude, codex. |
prompt | required | what to do, e.g. "run the daily follow-up review: tg skill show follow-ups". |
| Option | What it does |
|---|---|
--model <model> | the model it runs on: an alias such as sonnet, or a model id; "" for the harness's default (default sonnet for claude, codex's own for codex, or the config file's). |
--max-cost <usd> | claude only: stop a run that costs more than this, in US dollars. |
--max-cost-per-day <usd> | claude only: start no run for the rest of the day once its runs cost this much, in US dollars; 0 for no cap (default 5, or the config file's). |
--every <duration> | repeat: 30m, 2h, 1d. |
--at <HH:MM> | every day at this local time; 'mon 09:00' once a week, 'mon,fri 09:00' on several days (mon, tue, wed, thu, fri, sat, sun); repeat it for more times. |
--at-time <time> | one run: 30m, 2d from now, or an ISO time; the schedule removes itself after it. |
--notify-on <when> | desktop notice after a run (default failures for an agent that repeats with --every, else always). One of: always, failures, never. |
--deliver-to <route> | also send the result, when --notify-on says so, by the owner's own tg or mail: telegram-bot:/, or email:/; repeat it for more. |
Returns: start an agent (claude or codex) with a prompt on a timer; it runs with…
Example: tg personal schedule agent review claude "review what came in overnight and draft replies" --at 08:30, tg personal schedule agent triage codex "list what needs an answer today" --every 2h --max-cost 1, tg personal schedule agent weekly claude "review the week's open threads" --at 09:00 --model opus
tg schedule list
the schedules, when they run and how their last run went
tg schedule list [query]| Argument | Obligatoriedad | What it is |
|---|---|---|
query | optional | field:value terms that narrow the list — the fields are below. |
Returns: scheduled job — name, kind, when, last, paused, notify, deliver_to, spent_today_usd, and 2 more; every field: tg commands info schedule list
Example: tg personal schedule list, tg personal schedule list kind:agent
tg schedule run
run a schedule now, as its timer would, and wait for it; a paused one runs too
Changes something in Telegram.
tg schedule run <name> [options]| Argument | Obligatoriedad | What it is |
|---|---|---|
name | required | the schedule's name, as schedule list shows it. |
| Option | What it does |
|---|---|
--no-notify | keep the result here: send it along none of its routes. |
--deliver-to <route> | send it along only this one of its own routes; repeat it for more. |
Returns: run a schedule now, as its timer would, and wait for it; a paused one runs too
Example: tg personal schedule run health
tg schedule remove
stop a schedule and remove its timer; its past output stays
Changes something on this computer only.
tg schedule remove <name>| Argument | Obligatoriedad | What it is |
|---|---|---|
name | required | the schedule's name, as schedule list shows it. |
Returns: stop a schedule and remove its timer; its past output stays
Example: tg personal schedule remove health
tg schedule pause
take a schedule off its timer and keep it; run runs it, resume puts it back
Changes something on this computer only.
tg schedule pause <name>| Argument | Obligatoriedad | What it is |
|---|---|---|
name | required | the schedule's name, as schedule list shows it. |
Returns: take a schedule off its timer and keep it; run runs it, resume puts it back
Example: tg personal schedule pause health
tg schedule resume
put a paused schedule back on its timer
Changes something on this computer only.
tg schedule resume <name>| Argument | Obligatoriedad | What it is |
|---|---|---|
name | required | the schedule's name, as schedule list shows it. |
Returns: put a paused schedule back on its timer
Example: tg personal schedule resume health
tg schedule exec
what a timer runs, given the schedule's file; to run one by hand, use run
Changes something in Telegram.
tg schedule exec <file>| Argument | Obligatoriedad | What it is |
|---|---|---|
file | required | the schedule's schedule.json in the state folder, as the timer passes it. |
Returns: what a timer runs, given the schedule's file; to run one by hand, use run
Example: tg personal schedule exec ~/.local/share/tg-cli/schedules/health/schedule.json
tg conversations
the conversations inside a chat, found in the stored messages by replies, mentions and who wrote next
tg conversations list
a chat's conversations, the newest first: when, how many messages, how many people
tg conversations list <chat> [query] [options]| Argument | Obligatoriedad | What it is |
|---|---|---|
chat | required | a chat: its title or part of it, its id, @username, or me for Saved Messages. |
query | optional | field:value terms that narrow the list — the fields are below. |
| Option | What it does |
|---|---|
--limit <n> | how many. |
Returns: conversation — id, chat, first_message, started_at, ended_at, messages_count, senders_count, built_at, and 1 more; every field: tg commands info conversations list
Example: tg personal conversations list "Book club"
tg conversations show
one conversation's messages, oldest first — by its id, or the one a message is in
tg conversations show <conversation> [message]| Argument | Obligatoriedad | What it is |
|---|---|---|
conversation | required | a conversation id from conversations list; or a chat: its title or part of it, its id, @username, or me for Saved Messages, with a message. |
message | optional | a message id in that chat: show the conversation it is in. |
Returns: conversation details — id, chat, first_message, started_at, ended_at, messages_count, senders_count, built_at, and 40 more; every field: tg commands info conversations show
Example: tg personal conversations show "Book club" 101
tg conversations related
the conversations nearest in meaning to the one a message is in, in every built chat, best first — from the vectors conversations embed stored; runs no model
tg conversations related <chat> <message> [options]| Argument | Obligatoriedad | What it is |
|---|---|---|
chat | required | a chat: its title or part of it, its id, @username, or me for Saved Messages. |
message | required | a message id in that chat. |
| Option | What it does |
|---|---|
--limit <n> | how many. |
--model <model> | local: a model id from models list (default: embeddinggemma); remote: the provider's model. |
--embedding-provider <provider> | embedding provider: local or openai; flags override profile settings. |
--base-url <url> | a server with OpenAI's /v1/embeddings: Gemini, Jina, or Ollama and LM Studio on this machine. |
--dims <n> | remote: the vector size — needed with --base-url; shortens an OpenAI model's. |
Returns: conversation hit — summary, chunk, score, by, stale, source, locator, matched_in; every field: tg commands info conversations related
Example: tg personal conversations related "Book club" 101
tg conversations status
how fresh each built chat's conversations and vectors are: messages the build has not seen, chunks with a current, stale or missing vector
tg conversations status [options]| Option | What it does |
|---|---|
--chat <chat> | only this chat: a chat: its title or part of it, its id, @username, or me for Saved Messages. |
--model <model> | local: a model id from models list (default: embeddinggemma); remote: the provider's model. |
--embedding-provider <provider> | embedding provider: local or openai; flags override profile settings. |
--base-url <url> | a server with OpenAI's /v1/embeddings: Gemini, Jina, or Ollama and LM Studio on this machine. |
--dims <n> | remote: the vector size — needed with --base-url; shortens an OpenAI model's. |
Returns: conversation readiness — chat, model, state, graph, pending, vectors; every field: tg commands info conversations status
Example: tg personal conversations status
tg conversations batches
windows of a chat for your own AI agent to link: which earlier message each one answers
tg conversations batches status
how many messages still wait for an answer, in how many batches, and how much text
tg conversations batches status [options]| Option | What it does |
|---|---|
--chat <chat> | a chat: its title or part of it, its id, @username, or me for Saved Messages. |
--size <n> | messages to answer per batch, 10–200; 50 by default. |
Returns: conversation batch status — chat, messages, characters, batches, tokens_estimate; every field: tg commands info conversations batches status
Example: tg personal conversations batches status --chat "Book club"
tg conversations batches show
the next window to answer, with the messages before it; message text goes to stdout only
tg conversations batches show [options]| Option | What it does |
|---|---|
--chat <chat> | a chat: its title or part of it, its id, @username, or me for Saved Messages. |
--size <n> | messages to answer per batch, 10–200; 50 by default. |
Returns: conversation batch — batch, chat, messages, remaining; every field: tg commands info conversations batches show
Example: tg personal conversations batches show --chat "Book club"
tg conversations links
message links and the conversations derived from them
tg conversations links rebuild
find a chat's conversations in what the store holds, replacing the last build; without --chat, every chat that changed since its build and every group never built; never asks the messenger
Sends text to an outside service.
tg conversations links rebuild [options]| Option | What it does |
|---|---|
--chat <chat> | a chat: its title or part of it, its id, @username, or me for Saved Messages. |
--analyze | link batches using the configured analysis provider; requires --chat and remembers consent for this chat/provider. |
--analysis-provider <provider> | analysis: agent, openai or anthropic. |
--model <model> | analysis model; overrides models.analysis.model. |
--base-url <url> | analysis API endpoint; overrides models.analysis.base_url. |
--size <n> | analysis answer messages per batch, 10–200; default 50. |
--max-tokens <n> | analysis input/output reservation cap per run; default 100000. |
--max-chats <n> | at most this many chats in one run; 20 if not given. |
Returns: conversation build — chat, messages, links, conversations, built_at, rules_version, model, model_available, and 10 more; every field: tg commands info conversations links rebuild
Example: tg personal conversations links rebuild --chat "Book club"
tg conversations links add
store your agent's answer to a batch, read as JSON from stdin: { "model", "answers": [{ "message", "parent", "confidence" }] }; all or nothing
Changes something on this computer only.
tg conversations links add [options]| Option | What it does |
|---|---|
--batch <id> | the batch id conversations batches show printed. |
Returns: conversation change — chat, stored, cleared; every field: tg commands info conversations links add
Example: tg personal conversations links add --batch "$batch"
tg conversations links clear
drop your agent's answers for a chat, or only one model's; messages are never touched
Changes something on this computer only.
tg conversations links clear [options]| Option | What it does |
|---|---|
--chat <chat> | a chat: its title or part of it, its id, @username, or me for Saved Messages. |
--answer-model <model> | only the stored answers this model gave. |
Returns: conversation change — chat, stored, cleared; every field: tg commands info conversations links clear
Example: tg personal conversations links clear --chat "Book club"
tg conversations embeddings
stored conversation vectors
tg conversations embeddings status
how many chunks of a chat have a vector of the model, how many are left, and what is left costs
tg conversations embeddings status [options]| Option | What it does |
|---|---|
--chat <chat> | a chat: its title or part of it, its id, @username, or me for Saved Messages. |
--model <model> | local: a model id from models list (default: embeddinggemma); remote: the provider's model. |
--embedding-provider <provider> | embedding provider: local or openai; flags override profile settings. |
--base-url <url> | a server with OpenAI's /v1/embeddings: Gemini, Jina, or Ollama and LM Studio on this machine. |
--dims <n> | remote: the vector size — needed with --base-url; shortens an OpenAI model's. |
Returns: conversation embedding status — chat, model, chunks, embedded, left, estimate_seconds, tokens_at_most, price_at_most; every field: tg commands info conversations embeddings status
Example: tg personal conversations embeddings status --chat "Book club"
tg conversations embeddings clear
drop a chat's conversation and message vectors, or only one model's; messages and conversations are never touched
Changes something on this computer only.
tg conversations embeddings clear [options]| Option | What it does |
|---|---|
--chat <chat> | a chat: its title or part of it, its id, @username, or me for Saved Messages. |
--model <model> | local: a model id from models list (default: embeddinggemma); remote: the provider's model. |
--embedding-provider <provider> | embedding provider: local or openai; flags override profile settings. |
--base-url <url> | a server with OpenAI's /v1/embeddings: Gemini, Jina, or Ollama and LM Studio on this machine. |
--dims <n> | remote: the vector size — needed with --base-url; shortens an OpenAI model's. |
Returns: conversation change — chat, stored, cleared; every field: tg commands info conversations embeddings clear
Example: tg personal conversations embeddings clear --chat "Book club"
tg conversations rebuild
build, then embed with the model on this machine, the chats that changed since their build and the group chats never built — or only --chat; with the default model, also each message on its own, which search messages --discover reads; bounded per run, so run it again for the rest; never asks the messenger, downloads no model and sends no text anywhere
Changes something on this computer only.
tg conversations rebuild [options]| Option | What it does |
|---|---|
--chat <chat> | a chat: its title or part of it, its id, @username, or me for Saved Messages. |
--max-chats <n> | at most this many chats in one run; 20 if not given. |
--max-chunks <n> | at most this many chunks embedded in one run; 2000 if not given. |
Returns: conversation preparation — model, model_available, built, embedded, left, messages; every field: tg commands info conversations rebuild
Example: tg personal conversations rebuild --max-chats 5
tg conversations consents
remembered analysis permissions for this account's chats and provider endpoints
tg conversations consents list
which chats and provider endpoints you allowed to analyse, and when
tg conversations consents list [query]| Argument | Obligatoriedad | What it is |
|---|---|---|
query | optional | field:value terms that narrow the list — the fields are below. |
Returns: analysis consent — chat, provider, at; every field: tg commands info conversations consents list
Example: tg personal conversations consents list
tg conversations consents remove
forget analysis permissions so the next analysis asks again
Changes something on this computer only.
tg conversations consents remove [options]| Option | What it does |
|---|---|
--chat <chat> | revoke only this chat's consents; defaults to every chat. |
--consent-provider <identity> | exact provider identity from consents list; defaults to every provider. |
Returns: analysis consent revocation — revoked; every field: tg commands info conversations consents remove
Example: tg personal conversations consents remove --chat "Book club"
tg conversations embed
compute a vector for each chunk of a chat's conversations for search by meaning — on this machine, or with --embedding-provider through a service and your key; resumes where it stopped; without --chat, every built chat with chunks left, on this machine only
Sends text to an outside service.
tg conversations embed [options]| Option | What it does |
|---|---|
--chat <chat> | a chat: its title or part of it, its id, @username, or me for Saved Messages. |
--model <model> | local: a model id from models list (default: embeddinggemma); remote: the provider's model. |
--embedding-provider <provider> | embedding provider: local or openai; flags override profile settings. |
--base-url <url> | a server with OpenAI's /v1/embeddings: Gemini, Jina, or Ollama and LM Studio on this machine. |
--dims <n> | remote: the vector size — needed with --base-url; shortens an OpenAI model's. |
--threads <n> | local: threads in all (default: min(8, cores)). |
--concurrency <n> | remote: requests at once (default: 4). |
--max-tokens <n> | remote: stop before a run that could send more tokens than this. |
--max-chats <n> | at most this many chats in one run; 20 if not given. |
--max-chunks <n> | at most this many chunks embedded in one run; 2000 if not given, and no limit with --chat. |
Returns: conversation embedding — chat, model, embedded, skipped, model_available, built, left, messages; every field: tg commands info conversations embed
Example: tg personal conversations embed --chat "Book club"
tg attachments
the files of stored messages: their text in the local store, where search finds it
tg attachments extract
read the text of downloaded files — text, PDF/DOCX text layers, ODT/ODS/XLSX/PPTX/EPUB — into the local store, where search finds them
Changes something on this computer only.
tg attachments extract [options]| Option | What it does |
|---|---|
--chat <chat> | only this chat's files; a chat: its title or part of it, its id, @username, or me for Saved Messages. |
--from-dir <dir> | match files in this nonrecursive directory; needs --chat. |
--cursor <cursor> | continue from the cursor returned by a bounded extraction. |
--download | first save the files no download saved yet, from the messenger, into --output-dir. |
--output-dir <dir> | with --download, where to save them; created if missing. |
--limit <n> | read at most this many files; run it again to continue. |
--ocr | explicitly call models.ocr for bulk image and scanned-PDF text extraction. |
--concurrency <n> | remote: requests at once (default: 4). |
Returns: attachment extraction — extracted, failed, needs_agent, complete, unchanged, not_downloaded, unsupported, engines_missing, and 15 more; every field: tg commands info attachments extract
Example: tg personal attachments extract --chat "Book club" --limit 10
tg attachments list
files of stored messages, newest first: where each was saved and whether its text is held — never the text
tg attachments list [query] [options]| Argument | Obligatoriedad | What it is |
|---|---|---|
query | optional | field:value terms that narrow the list — the fields are below. |
| Option | What it does |
|---|---|
--limit <n> | how many to show. |
--page <n> | which page, starting at 1. |
--all | every row, no paging. |
Returns: attachment — kind, message, position, url, name, title, mime, size, and 8 more; every field: tg commands info attachments list
Example: tg personal attachments list --limit 10
tg attachments show
read a bounded chunk of one retained attachment; JSON includes base64 bytes
tg attachments show <chat> [message] [options]| Argument | Obligatoriedad | What it is |
|---|---|---|
chat | required | a chat: its title or part of it, its id, @username, or me for Saved Messages; or a msg: locator alone. |
message | optional | the message id. |
| Option | What it does |
|---|---|
--attachment <n> | file position from 1; required for several files. |
--page <n> | render one PDF page as PNG, from 1; optional unpdf/canvas, no OCR. |
--offset-bytes <n> | byte offset from 0. |
--chunk-bytes <n> | bytes to return, 1–1048576 (default524288). |
--expected-fingerprint <hash> | require the whole file SHA-256 from the preceding chunk. |
Returns: attachment bytes — ref, attachment, name, mime_type, total_bytes, sha256, offset_bytes, read_bytes, and 4 more; every field: tg commands info attachments show
Example: tg personal attachments show "Book club" 101 --attachment 1
tg attachments update
keep the text an agent read from a file — a scan, a photo — so search finds it; nothing is sent
Changes something on this computer only.
tg attachments update <chat> [message] [options]| Argument | Obligatoriedad | What it is |
|---|---|---|
chat | required | a chat: its title or part of it, its id, @username, or me for Saved Messages; or a msg: locator, with no message id after it. |
message | optional | the message id. |
| Option | What it does |
|---|---|
--attachment <n> | which file of the message, from 1; needed when it has more than one. |
--text-file <path> | read the text from this file; - or none reads stdin. |
Returns: attachment text change — ref, attachment, origin, chars, replaced; every field: tg commands info attachments update
Example: tg personal attachments update "Book club" 101 --text-file ./transcript.txt
tg attachments download
archive media from selected chats; verify and keep existing copies
Changes something on this computer only.
tg attachments download <dir> [options]| Argument | Obligatoriedad | What it is |
|---|---|---|
dir | required | archive directory; created if missing. |
| Option | What it does |
|---|---|
--chat <chat> | only this chat; repeat for more; a chat: its title or part of it, its id, @username, or me for Saved Messages. Default: ``. |
--since-time <time> | include messages from this ISO timestamp with a time zone. |
--pause <duration> | pause between history pages. Default: 1s. |
Returns: media archive — directory, chats, saved, existing, complete; every field: tg commands info attachments download
Example: tg personal attachments download ./media-archive
tg attachments check
rehash all archived files without connecting to the messenger
tg attachments check <dir>| Argument | Obligatoriedad | What it is |
|---|---|---|
dir | required | archive directory. |
Returns: media archive check — valid, checked, files; every field: tg commands info attachments check
Example: tg personal attachments check ./media-archive
tg attachments jobs
daily media archive timers for this profile
tg attachments jobs install
install a Linux daily archive timer for this directory; starts nothing
Changes something on this computer only.
tg attachments jobs install <dir> [options]| Argument | Obligatoriedad | What it is |
|---|---|---|
dir | required | archive directory, used with the same profile as install. |
| Option | What it does |
|---|---|
--at <HH:mm> | daily start time. Default: 03:00. |
--timezone <zone> | IANA time zone of the daily start time. Default: UTC. |
--chat <chat> | only this chat; repeat for more; a chat: its title or part of it, its id, @username, or me for Saved Messages. Default: ``. |
--since-time <time> | include messages from this ISO timestamp with a time zone. |
Returns: media archive timer — name, installed, service_path, timer_path, active, action; every field: tg commands info attachments jobs install
Example: tg personal attachments jobs install ./media-archive
tg attachments jobs start
enable the installed archive timer at login and start its daily schedule
Changes something on this computer only.
tg attachments jobs start <dir>| Argument | Obligatoriedad | What it is |
|---|---|---|
dir | required | archive directory, used with the same profile as install. |
Returns: media archive timer — name, installed, service_path, timer_path, active, action; every field: tg commands info attachments jobs start
Example: tg personal attachments jobs start ./media-archive
tg attachments jobs stop
disable the archive timer; a download already running finishes
Changes something on this computer only.
tg attachments jobs stop <dir>| Argument | Obligatoriedad | What it is |
|---|---|---|
dir | required | archive directory, used with the same profile as install. |
Returns: media archive timer — name, installed, service_path, timer_path, active, action; every field: tg commands info attachments jobs stop
Example: tg personal attachments jobs stop ./media-archive
tg attachments jobs status
show whether this directory's archive timer is installed and active
tg attachments jobs status <dir>| Argument | Obligatoriedad | What it is |
|---|---|---|
dir | required | archive directory, used with the same profile as install. |
Returns: media archive timer — name, installed, service_path, timer_path, active, action; every field: tg commands info attachments jobs status
Example: tg personal attachments jobs status ./media-archive
tg attachments jobs uninstall
remove this directory's stopped archive timer; keep archived files
Changes something on this computer only.
tg attachments jobs uninstall <dir>| Argument | Obligatoriedad | What it is |
|---|---|---|
dir | required | archive directory, used with the same profile as install. |
Returns: media archive timer — name, installed, service_path, timer_path, active, action; every field: tg commands info attachments jobs uninstall
Example: tg personal attachments jobs uninstall ./media-archive
tg attachments move
move older images into another verified archive; remember their new locations
Changes something on this computer only.
tg attachments move <dir> <archive-dir> [options]| Argument | Obligatoriedad | What it is |
|---|---|---|
dir | required | source media archive directory. |
archive-dir | required | destination archive directory; created if needed. |
| Option | What it does |
|---|---|
--before-time <time> | move images whose message date is before this ISO timestamp with zone. |
--dry-run | show counts and bytes without moving files or creating the destination. |
Returns: media archive move — directory, archive_directory, before_time, selected, selected_bytes, moved, moved_bytes, already_archived, and 3 more; every field: tg commands info attachments move
Example: tg personal attachments move ./media-archive ./older-images --before-time 2026-10-01T00:00:00Z --dry-run
tg tags
your own labels on chats, people, messages and tasks, kept in the local store and never sent; tag: in a search finds them
tg tags rebuild
derive local group/channel tags from cached metadata using keyword rules
Changes something on this computer only.
tg tags rebuild [options]| Option | What it does |
|---|---|
--chat <chat> | a stored group/channel; repeat to select several. Default: ``. |
--limit <n> | process at most 1–500 chats. Default: 50. |
--sync-first | read current descriptions from the messenger before classifying. |
--dry-run | preview cached classification without changing the store. |
Returns: automatic tags — items, has_more, dry_run; every field: tg commands info tags rebuild
Example: tg personal tags rebuild --chat "Book club" --dry-run
tg tags add
put tags on one chat, person, message or task
Changes something on this computer only.
tg tags add <tag> [options]| Argument | Obligatoriedad | What it is |
|---|---|---|
tag | required | one or more tags: 1–32 letters a–z, digits and hyphens; upper case is lowered. |
| Option | What it does |
|---|---|
--chat <chat> | the chat to tag, or the chat of --message; a chat: its title or part of it, its id, @username, or me for Saved Messages. |
--contact <person> | the person to tag: their id, @username or name, as the local store knows them. |
--message <message> | the message to tag: its id in --chat, or a msg: locator alone. |
--task <id> | the task to tag: its id or key, as tasks list shows it. |
Returns: tag change — target, unchanged, added, removed; every field: tg commands info tags add
Example: tg personal tags add reading --chat "Book club"
tg tags remove
take tags off one chat, person, message or task
Changes something on this computer only.
tg tags remove <tag> [options]| Argument | Obligatoriedad | What it is |
|---|---|---|
tag | required | one or more tags: 1–32 letters a–z, digits and hyphens; upper case is lowered. |
| Option | What it does |
|---|---|
--chat <chat> | the chat to untag, or the chat of --message; a chat: its title or part of it, its id, @username, or me for Saved Messages. |
--contact <person> | the person to untag: their id, @username or name, as the local store knows them. |
--message <message> | the message to untag: its id in --chat, or a msg: locator alone. |
--task <id> | the task to untag: its id or key, as tasks list shows it. |
--claim <claim> | remove only this ownership claim: manual or auto. |
Returns: tag change — target, unchanged, added, removed; every field: tg commands info tags remove
Example: tg personal tags remove reading --chat "Book club"
tg tags list
what is tagged: this account's chats, messages and tasks, and the people of its messenger
tg tags list [query]| Argument | Obligatoriedad | What it is |
|---|---|---|
query | optional | field:value terms that narrow the list — the fields are below. |
Returns: tagging — tag, type, target, name, sources, created_at; every field: tg commands info tags list
Example: tg personal tags list, tg personal tags list tag:reading
tg mentions
phones, e-mail, links, documents, names and addresses in stored messages
tg mentions list
this account's mentions matching the query, newest first; --new for those found since the last review
tg mentions list [query] [options]| Argument | Obligatoriedad | What it is |
|---|---|---|
query | optional | fields below; a bare word is a value, so a phone typed with 8 finds it written with +7. |
| Option | What it does |
|---|---|
--limit <n> | how many to show. |
--page <n> | which page, starting at 1. |
--new | undecided mentions found since the last --new run that showed them all; the first run shows every one. |
Returns: mention — id, kind, value, domain, confidence, status, field, author, and 5 more; every field: tg commands info mentions list
Example: tg personal mentions list kind:phone, tg personal mentions list domain:google.com, tg personal mentions list --new
tg mentions domains
the sites this account's links point to, most linked first, with chats and first and last time
tg mentions domains [query] [options]| Argument | Obligatoriedad | What it is |
|---|---|---|
query | optional | narrows the links counted: the fields below; dismissed links are never counted. |
| Option | What it does |
|---|---|
--limit <n> | how many to show. |
--page <n> | which page, starting at 1. |
Returns: mention domain — domain, links, chats, first_at, last_at; every field: tg commands info mentions domains
Example: tg personal mentions domains, tg personal mentions domains status:found
tg mentions places
confirmed addresses, in every account, most mentioned first; mentions confirm <id> adds one
tg mentions places [options]| Option | What it does |
|---|---|
--limit <n> | how many to show. |
--page <n> | which page, starting at 1. |
Returns: place — id, address, mentions; every field: tg commands info mentions places
Example: tg personal mentions places
tg mentions show
one mention, the text around it, and how many other places hold its value
tg mentions show <id>| Argument | Obligatoriedad | What it is |
|---|---|---|
id | required | the mention's id, from mentions list. |
Returns: mention details — id, kind, value, domain, confidence, status, field, author, and 9 more; every field: tg commands info mentions show
Example: tg personal mentions show 12
tg mentions confirm
say what a mention is: a phone's owner everywhere it is written, the stored document, who a name means, an address as a place
Changes something on this computer only.
tg mentions confirm <id> [person] [options]| Argument | Obligatoriedad | What it is |
|---|---|---|
id | required | the mention's id, from mentions list. |
person | optional | person: or organization: that owns the phone or the e-mail address; person: a name means; a document or a street address needs none. |
| Option | What it does |
|---|---|
--all-in-chat | a name: also every undecided place of the same name in its chat. |
--as-owner | record it as yours although an agent's terminal runs the tool (AI_AGENT or CLAUDECODE set). |
Returns: mention decision — kind, value, status, target, mentions, proposal; every field: tg commands info mentions confirm
Example: tg personal mentions confirm 12 person:7, tg personal mentions confirm 15, tg personal mentions confirm 31 person:7 --all-in-chat
tg mentions reject
not a real mention: dismiss its value everywhere and on later syncs; a name only where it is
Changes something on this computer only.
tg mentions reject <id> [options]| Argument | Obligatoriedad | What it is |
|---|---|---|
id | required | the mention's id, from mentions list. |
| Option | What it does |
|---|---|
--all-in-chat | a name: also every undecided place of the same name in its chat. |
--as-owner | record it as yours although an agent's terminal runs the tool (AI_AGENT or CLAUDECODE set). |
Returns: mention decision — kind, value, status, target, mentions, proposal; every field: tg commands info mentions reject
Example: tg personal mentions reject 12
tg mentions rebuild
find the mentions of every stored message again; decisions are kept
Changes something on this computer only.
tg mentions rebuild [kind]| Argument | Obligatoriedad | What it is |
|---|---|---|
kind | optional | only this kind: person-name after people were added or renamed. One of: phone, email, url, document, person-name, place. |
Returns: mention rebuild — messages, attachments, documents, notes, emails, mentions; every field: tg commands info mentions rebuild
Example: tg personal mentions rebuild, tg personal mentions rebuild person-name
tg images
search pictures by what they show, with a model on this machine
tg images embed
compute a vector for each picture the store knows and has none for — downloading it through the messenger, keeping only the vector; needs picture_search on in the profile and images models download clip-b32; resumes where it stopped
Changes something on this computer only.
tg images embed [options]| Option | What it does |
|---|---|
--chat <chat> | only this chat; a chat: its title or part of it, its id, @username, or me for Saved Messages. |
--limit <n> | at most this many pictures in one run; 100 if not given. |
Returns: image embedding — model, embedded, skipped, failed, more; every field: tg commands info images embed
Example: tg personal images embed, tg personal images embed --limit 500
tg images models
models that read pictures, for images embed and picture search
tg images models list
the picture models, which are downloaded, and which one is the default
tg images models list [query]| Argument | Obligatoriedad | What it is |
|---|---|---|
query | optional | field:value terms; this list filters by none yet. |
Returns: model — id, kind, title, languages, size_bytes, downloaded, default, path, and 6 more; every field: tg commands info images models list
Next usually: tg models download <model>, tg models set <model>, tg images models download <model>
Example: tg personal images models list
tg images models download
download a picture model once, checked against the sha256 this version expects
Reads from an outside service.
tg images models download <model>| Argument | Obligatoriedad | What it is |
|---|---|---|
model | required | a model id from images models list. |
Returns: model — id, kind, title, languages, size_bytes, downloaded, default, path, and 6 more; every field: tg commands info images models download
Next usually: tg models download <model>, tg models set <model>
Example: tg personal images models download clip-b32
tg metadata
cached group/channel descriptions for local automatic tags
tg metadata show
a stored chat's cached description, as automatic tags read it
tg metadata show [options]| Option | What it does |
|---|---|
--chat <chat> | a stored chat. |
Returns: chat metadata — chat_id, metadata; every field: tg commands info metadata show
Example: tg personal metadata show --chat 7
tg metadata sync
fetch group and channel descriptions again and cache them
Changes something on this computer only.
tg metadata sync [options]| Option | What it does |
|---|---|
--chat <chat> | stored group/channel; repeat for several. Default: ``. |
--only-missing | only chats with no metadata yet; without --chat, every stored group/channel. |
--limit <n> | process at most 1–500 chats. Default: 50. |
Returns: chat metadata refresh — chats, has_more; every field: tg commands info metadata sync
Example: tg personal metadata sync --chat 7 --chat 8, tg personal metadata sync --only-missing --limit 20
tg tasks
what waits on you — unanswered questions, mentions, requests, promises — kept in the local store; review and serve add them
tg tasks list
tasks, oldest first, with their message or note source
tg tasks list [query] [options]| Argument | Obligatoriedad | What it is |
|---|---|---|
query | optional | field:value terms that narrow the list — the fields are below. |
| Option | What it does |
|---|---|
--limit <n> | how many. |
Returns: task — ref, id, title, kind, state, created_at, key, description, and 26 more; every field: tg commands info tasks list
Next usually: tg tasks show <task>, tg tasks related <task>, tg tasks update <task>
Example: tg personal tasks list --limit 10
tg tasks add
add a task for a stored message or note — a promise, a request
Changes something on this computer only.
tg tasks add <message> [options]| Argument | Obligatoriedad | What it is |
|---|---|---|
message | required | a message locator, msg:///, or note:. |
| Option | What it does |
|---|---|
--type <type> | the task's type: question, request, mention or promise. |
--category <name> | what it is about, from the list tasks categories prints: money, documents, meeting, …. |
--into <id> | when tasks add listed tasks that may be the same job: link the message to this one instead of opening a task. |
--new | when tasks add listed tasks that may be the same job: open the task anyway. |
--open-new | open a task from a message the chat's task point already passed (a read again with tasks review --since-time); without it such a read only updates and closes tasks. |
--title <title> | one line: the action and its object — send Alex the API token. |
--description <text> | the detail, in Markdown: who owes whom, done when, next step, keywords. |
--due <time> | when it must be done: an ISO 8601 time or 2h, 3d from now; none clears it. |
--remind-time <time> | when to look at it again: an ISO 8601 time or 2h, 3d from now; none clears it. |
--assignee <person...> | who does it: sender (whoever sent the task's message) or person:; none clears it. Leave it out when unsure: a task with no assignee is better than none. |
Returns: task created — id, source, source_kind, account, group, kind, state, origin, and 16 more; every field: tg commands info tasks add
Example: tg personal tasks add note:101 --type promise --category documents --title "Review draft"
tg tasks update
update a task's text, schedule, category, assignees, priority or parent; nothing reaches the messenger
Changes something on this computer only.
tg tasks update <task> [options]| Argument | Obligatoriedad | What it is |
|---|---|---|
task | required | the task's id or key, as tasks list shows it. |
| Option | What it does |
|---|---|
--category <name> | what it is about, from the list tasks categories prints: money, documents, meeting, …; a change is kept in the task's history. |
--priority <n> | low, medium, high, critical or none; 0 (urgent) … 4 (low) still read as before. |
--parent <id> | parent task in the same project; none clears it. |
--title <title> | one line: the action and its object — send Alex the API token. |
--description <text> | the detail, in Markdown: who owes whom, done when, next step, keywords. |
--due <time> | when it must be done: an ISO 8601 time or 2h, 3d from now; none clears it. |
--remind-time <time> | when to look at it again: an ISO 8601 time or 2h, 3d from now; none clears it. |
--assignee <person...> | who does it: sender (whoever sent the task's message) or person:; none clears it. Leave it out when unsure: a task with no assignee is better than none. |
Returns: task card — id, ref, key, project, project_key, project_name, created_by, title, and 26 more; every field: tg commands info tasks update
Example: tg personal tasks update DOC-12 --title "Review draft"
tg tasks link
link a task to messages, chats, people or URLs — or to another task: task:
Changes something on this computer only.
tg tasks link <task> [targets] [options]| Argument | Obligatoriedad | What it is |
|---|---|---|
task | required | the task's id or key, as tasks list shows it. |
targets | optional | msg: locators, person:, document:, note:, a URL; or task:, which links two project tasks. |
| Option | What it does |
|---|---|
--chat <chat> | a chat it concerns, repeatable; a chat: its title or part of it, its id, @username, or me for Saved Messages. |
--kind <kind> | related-to (default), evidence — it shows the task is real — or created-from; for task:, related-to, blocked-by, follow-up-of, duplicate-of or discovered-from. |
Returns: task links — id, ref, key, project, project_key, project_name, created_by, title, and 28 more; every field: tg commands info tasks link
Example: tg personal tasks link DOC-12 https://example.com/draft
tg tasks show
one task: its plan and everything linked to it
tg tasks show <task>| Argument | Obligatoriedad | What it is |
|---|---|---|
task | required | the task's id or key, as tasks list shows it. |
Returns: task card — id, ref, key, project, project_key, project_name, created_by, title, and 26 more; every field: tg commands info tasks show
Example: tg personal tasks show DOC-12
tg tasks related
tasks that may be the same job as this one, best first, each with a band — likely, maybe, different — and the reasons; merges nothing
tg tasks related <task> [options]| Argument | Obligatoriedad | What it is |
|---|---|---|
task | required | the task's id or key, as tasks list shows it. |
| Option | What it does |
|---|---|
--limit <n> | how many, at most 40 (default 10). |
Returns: task similar — ref, key, title, status, created_at, found_by, score, band, and 3 more; every field: tg commands info tasks related
Example: tg personal tasks related PR-12
tg tasks duplicates
pairs of tasks that may be one job
tg tasks duplicates list
pairs of tasks a rule opened that may be one job, newest first, with score and reasons: merge, reject or defer each; decision:unsure lists the ones deferred to the owner
tg tasks duplicates list [query] [options]| Argument | Obligatoriedad | What it is |
|---|---|---|
query | optional | field:value terms that narrow the list — the fields are below. |
| Option | What it does |
|---|---|
--limit <n> | how many. |
Returns: task pair — task, source, other, score, band, levels, reasons, decision, and 2 more; every field: tg commands info tasks duplicates list
Example: tg personal tasks duplicates list --limit 10, tg personal tasks duplicates list decision:unsure
tg tasks duplicates reject
two tasks are not the same job: the pair leaves the list and is never offered again
Changes something on this computer only.
tg tasks duplicates reject <task> <other-task>| Argument | Obligatoriedad | What it is |
|---|---|---|
task | required | the task listed as the duplicate, by its id or key. |
other-task | required | the task it was paired with. |
Returns: task pair — task, source, other, score, band, levels, reasons, decision, and 2 more; every field: tg commands info tasks duplicates reject
Example: tg personal tasks duplicates reject PR-14 PR-12
tg tasks duplicates defer
the fields and the text cannot tell: leave the pair to the owner, who lists it with decision:unsure
Changes something on this computer only.
tg tasks duplicates defer <task> <other-task>| Argument | Obligatoriedad | What it is |
|---|---|---|
task | required | the task listed as the duplicate, by its id or key. |
other-task | required | the task it was paired with. |
Returns: task pair — task, source, other, score, band, levels, reasons, decision, and 2 more; every field: tg commands info tasks duplicates defer
Example: tg personal tasks duplicates defer PR-14 PR-12
tg tasks merge
one job seen twice: link every message of the duplicate to the task and close the duplicate dismissed, duplicate-of the task; nothing is deleted, and tasks unmerge undoes it
Changes something on this computer only.
tg tasks merge <task> [options]| Argument | Obligatoriedad | What it is |
|---|---|---|
task | required | the duplicate, by its id or key; it must be open. |
| Option | What it does |
|---|---|
--into <id> | the task that stays, by its id or key. |
Returns: task merge — pair, linked, review, task; every field: tg commands info tasks merge
Example: tg personal tasks merge PR-14 --into PR-12
tg tasks unmerge
undo a merge: reopen the task and remove its duplicate-of relation; messages the merge linked stay linked
Changes something on this computer only.
tg tasks unmerge <task>| Argument | Obligatoriedad | What it is |
|---|---|---|
task | required | the merged task, by its id or key. |
Returns: task unmerge — pair, task; every field: tg commands info tasks unmerge
Example: tg personal tasks unmerge PR-14
tg tasks agenda
what needs a look today, from the local store and without message text: tasks overdue, due or to check, chats where you owe an answer, chats where you wait for one, open tasks someone else does
tg tasks agenda [query] [options]| Argument | Obligatoriedad | What it is |
|---|---|---|
query | optional | field:value terms that narrow the list — the fields are below. |
| Option | What it does |
|---|---|
--due-within <duration> | list tasks due within this: 30m, 2h, 1d (default 1d). |
--unanswered <duration> | list chats where someone else wrote last this long ago (default 1d). |
--waiting <duration> | list chats where you wrote last this long ago (default 7d). |
--within <duration> | leave out chats silent longer than this: they ended (default 30d). |
--holder <name> | who you are for claims: a session id or a chat id; default WIRECAT_HOLDER, else Claude Code's session, else the agent's name. |
Returns: agenda — at, account, stored_at, stale, tasks, owed, waiting, unsynced, and 2 more; every field: tg commands info tasks agenda
Example: tg personal tasks agenda
tg tasks categories
the categories a task takes, with what each means and the words a rule picks it by
tg tasks categoriesReturns: task categories — categories, unlisted, file; every field: tg commands info tasks categories
Example: tg personal tasks categories
tg tasks scan
the task rules over a chat's newest stored messages: in a one-to-one chat a question you did not answer, in a group only a question in reply to you and a mention of you, open a task, and your answer closes one; a channel opens none — for a chat the first sync left alone (config task_first_pass_per_chat). Lists what would open and changes nothing unless --yes; with --yes the duplicate check runs as on a sync. Reads only the local store
Changes something on this computer only.
tg tasks scan <chat> [options]| Argument | Obligatoriedad | What it is |
|---|---|---|
chat | required | a chat: its title or part of it, its id, @username, or me for Saved Messages. |
| Option | What it does |
|---|---|
--last <n> | read the newest n stored messages of each chat (default 50, at most 1000). |
Returns: task scan — chat, messages, added, closed, review, tasks, held, held_chats; every field: tg commands info tasks scan
Example: tg personal tasks scan <chat>, tg personal tasks scan <chat> --last 300 --yes
tg tasks status
every chat that can hold your tasks — not a channel or Saved Messages — with the point its messages were read for tasks through, who read them, how many stored messages wait after it, and how many arrived late inside the stretch already read (history fetched afterwards). Its own point: reading a chat, marking it read, inbox --new and review --new never move it; tasks acknowledge does. Reads only the local store
tg tasks status [options]| Option | What it does |
|---|---|
--limit <n> | how many chats. |
Returns: task analysis — chat, title, kind, newest_at, mark, waiting, late, untrusted; every field: tg commands info tasks status
Example: tg personal tasks status
tg tasks review
the stored messages after the chat's task point, oldest first, and the chat's open tasks, so one read can open new tasks and update or close the old ones. A chat never read starts 14 days back. Moves nothing: when done, tasks acknowledge records it. Reads only the local store; messages sync or backfill fetch what it lacks
tg tasks review <chat> [options]| Argument | Obligatoriedad | What it is |
|---|---|---|
chat | required | a chat: its title or part of it, its id, @username, or me for Saved Messages. |
| Option | What it does |
|---|---|
--limit <n> | how many messages (default 100, 1000 with --since-time; at most 1000). |
--since-time <time> | read again from this ISO 8601 time, or 30d ago, whatever the point says; what the point already passed only updates and closes tasks, unless tasks add is given --open-new. |
Returns: task review — chat, from, mark, late, has_more, through, messages, open_tasks, and 1 more; every field: tg commands info tasks review
Example: tg personal tasks review <chat>, tg personal tasks review <chat> --since-time 30d
tg tasks acknowledge
moves the chat's task point to this message once its tasks are opened, updated or closed; it never moves back. With --since-time, the read started there: a read again from the start of the stretch clears what arrived late inside it
Changes something on this computer only.
tg tasks acknowledge <chat> <message> [options]| Argument | Obligatoriedad | What it is |
|---|---|---|
chat | required | a chat: its title or part of it, its id, @username, or me for Saved Messages. |
message | required | the id of the last message read, as tasks review shows it. |
| Option | What it does |
|---|---|
--since-time <time> | where the read started, when tasks review was given --since-time. |
Returns: task analysis mark — chat, from, through, through_id, by, checked_at, checked_through, at, and 1 more; every field: tg commands info tasks acknowledge
Example: tg personal tasks acknowledge <chat> <message>
tg tasks claim
take an open task so no other agent works it at once; the claim lapses by itself
Changes something on this computer only.
tg tasks claim <task> [options]| Argument | Obligatoriedad | What it is |
|---|---|---|
task | required | the task's id or key, as tasks list shows it. |
| Option | What it does |
|---|---|
--lease <duration> | how long the claim lasts: 30m, 2h (default 30m); claiming again extends it. |
--holder <name> | who you are for claims: a session id or a chat id; default WIRECAT_HOLDER, else Claude Code's session, else the agent's name. |
Returns: task card — id, ref, key, project, project_key, project_name, created_by, title, and 26 more; every field: tg commands info tasks claim
Example: tg personal tasks claim PR-12 --lease 2h
tg tasks release
give back a task you claimed, before the claim lapses; the owner may release any
Changes something on this computer only.
tg tasks release <task> [options]| Argument | Obligatoriedad | What it is |
|---|---|---|
task | required | the task's id or key, as tasks list shows it. |
| Option | What it does |
|---|---|
--holder <name> | who you are for claims: a session id or a chat id; default WIRECAT_HOLDER, else Claude Code's session, else the agent's name. |
Returns: task card — id, ref, key, project, project_key, project_name, created_by, title, and 26 more; every field: tg commands info tasks release
Example: tg personal tasks release PR-12
tg tasks close
close a task: done, or dismissed when it needs no answer. An agent (AI_AGENT or CLAUDECODE set) states its --certainty; below config task_agent_close_min, or with task_agent_close off, the task stays open and the close waits on the owner, who confirms it with tasks close or refuses it with tasks reject. A closed task stays closed, unless tasks unmerge reopens a merged one
Changes something on this computer only.
tg tasks close <task> [options]| Argument | Obligatoriedad | What it is |
|---|---|---|
task | required | the task's id or key, as tasks list shows it. |
| Option | What it does |
|---|---|
--as <state> | how it is closed: done, or dismissed — it needs no answer; the owner may leave it out to confirm an agent's close. |
--reason <text> | why, kept with the task — no-reply-needed, for example. |
--certainty <n> | an agent's: how sure it is, 0 to 1, that the task needs nothing more. |
--as-owner | close it as yours although an agent's terminal runs the tool (AI_AGENT or CLAUDECODE set). |
Returns: task closed — id, source, source_kind, account, group, kind, state, origin, and 13 more; every field: tg commands info tasks close
Example: tg personal tasks close Q-15 --as done --certainty 0.9 --reason answered-in-chat, tg personal tasks close Q-15
tg tasks reject
refuse the close an agent suggested: the task stays open and leaves close:suggested; the agent may close it again
Changes something on this computer only.
tg tasks reject <task> [options]| Argument | Obligatoriedad | What it is |
|---|---|---|
task | required | the task's id or key, as tasks list shows it. |
| Option | What it does |
|---|---|
--as-owner | refuse it as yours although an agent's terminal runs the tool (AI_AGENT or CLAUDECODE set). |
Returns: task card — id, ref, key, project, project_key, project_name, created_by, title, and 26 more; every field: tg commands info tasks reject
Example: tg personal tasks reject Q-15
tg projects
what the store holds about the owner's projects
tg projects evidence
cited references about a project in this profile's stored messages. The project's name, key, each alias and each --alias, --context-query and --contact name is its own search; their hits are joined. Every message of a chat confirmed as the project's is read too, and so is what a confirmed person member wrote. Reads what the store holds; with --sync-first it first syncs the project's linked chats the store does not hold for the window
Changes something on this computer only.
tg projects evidence <project> [options]| Argument | Obligatoriedad | What it is |
|---|---|---|
project | required | an existing project's id, key, exact name or alias, or a new project's name. |
| Option | What it does |
|---|---|
--alias <name> | another name of the project, searched on its own; repeat for more. Default: ``. |
--context-query <words> | more words that all appear in one text; repeat for another. Default: ``. |
--contact <person> | a name to search, or person: to read what that person wrote. Default: ``. |
--purpose <purposes> | the linked chats' purposes to read, comma separated (work, sales, support, other), or all; the configured defaults if not given, and a chat left out is counted, never dropped silently. Default: ``. |
--include-proposed | also read chats and members proposed for the project and not yet confirmed; each item they bring is marked. |
--since-time <time> | how far back: days (90d, at most 730d) or a start date (2026-09-01). Default: 60d. |
--before-time <time> | fixed exclusive end: ISO 8601 timestamp with UTC offset. |
--limit <n> | new references at most, up to 500; 100 if not given. |
--max-pages <pages> | store pages read at most this run, up to 512. |
--cursor <cursor> | continue a stopped search from its checkpoint, with the same options. |
--before-n <n> | messages before each message hit, at most 5. Default: 2. |
--after-n <n> | messages after each message hit, at most 5. Default: 2. |
--no-catch-up | read the search index as it is, without indexing new text first. |
--sync-first | first sync the linked chats this account does not hold back to --since-time; off by default. |
--sync-time <duration> | time for all of --sync-first's syncs together; 3m if not given. Default: 3m. |
Returns: what this account's stored messages hold about a project, linked chats included
Example: tg personal projects evidence "Harbour" --since-time 30d --sync-first
tg projects status
per chat confirmed as the project's (and its child projects'), from what the store holds: the last message, who replies next, open questions both ways, promises, amounts with their direction, payments recorded, how long each --context-query has been quiet on their side, and how much of the chat is held. Amounts, directions and promises found by words are marked pattern: read the cited message before trusting one. Others' questions in a group with no role, and others' word-found promises in a group, are counted on the chat's row as unlisted, not listed. Only this profile's account is read; the other linked chats are named, and memo projects status reads them
tg projects status <project> [options]| Argument | Obligatoriedad | What it is |
|---|---|---|
project | required | an existing project's id, key, exact name or alias. |
| Option | What it does |
|---|---|
--since-time <time> | how far back: days (60d, at most 730d) or a start date (2026-09-01). Default: 60d. |
--before-time <time> | fixed exclusive end: ISO 8601 timestamp with UTC offset. |
--purpose <purposes> | the linked chats' purposes to read, comma separated (work, sales, support, other), or all; the configured defaults if not given, and a chat left out is counted, never dropped silently. Default: ``. |
--context-query <words> | words that all appear in one text; reports their last mention per side. Repeat for another. Default: ``. |
Returns: project status — project, key, name, signals, money, chats, purposes, out_of_scope, and 7 more; every field: tg commands info projects status
Example: tg personal projects status HRB --context-query 1C
tg search
find things by text: one resource when you know it (messages, notes), or search all across messages and notes; for mail, the separate memo CLI: memo search mail
tg search all
search messenger messages and notes in the local store, and by default the messenger's server for messages too (notes and events are local only; --backend archive or --offline keeps it to the local store), calendar events when the store holds a calendar, and meeting transcripts, chat and summaries when it holds a meeting account — best match first; not mail (the separate memo CLI searches it: memo search mail), tasks, people, memories or projects. Use it when you do not know where something was written; search messages or notes reads one kind with all its fields
tg search all <query> [options]| Argument | Obligatoriedad | What it is |
|---|---|---|
query | required | strict Lucene query: words, "phrases", AND/OR/NOT, field groups and date ranges. |
| Option | What it does |
|---|---|
--only <resources> | only these resources, separated by commas: messages, notes, events, meetings. |
--source <accounts> | only these accounts, separated by commas: provider:account as a hit shows it, a provider, a kind or group:; each resource reads the ones of its kind. |
--limit <n> | how many. |
--page <n> | which page, starting at 1. |
--exact | bare words and quotes match their exact form only, as exact:word does. |
--timezone <zone> | the IANA timezone for calendar date boundaries. |
--backend <archive|server|both> | where to search: the local archive, the messenger's server (default: both; message discovery uses archive only), or both. |
--server-time <duration> | stop waiting for the server after this long (default: 5s). |
Returns: hit — kind, ref, provider, account, title, timestamp, excerpt, url, and 17 more; every field: tg commands info search all
Example: tg personal search all draft
tg search messages
search messenger messages in the local store and on the messenger's server (--backend); optionally fetches new messages with --sync-first; --discover searches the archive only
tg search messages [query] [options]| Argument | Obligatoriedad | What it is |
|---|---|---|
query | optional | strict Lucene query: words, "phrases", AND/OR/NOT, field groups and date ranges; with --saved, more words AND-ed to it. |
| Option | What it does |
|---|---|
--sync-first | first fetch new messages within the chat, time and message bounds. |
--max-chats <n> | refresh at most this many chats (default: 5). |
--sync-time <duration> | stop fetching after this long (default: 30s). |
--max-messages <n> | fetch at most this many messages total (default: 500). |
--thread | the stored reply chain and replies instead of time neighbours; falls back when no graph exists. |
--thread-hops <n> | at most this many links from the hit (default: 8). |
--thread-messages <n> | at most this many messages in each thread context (default: 50). |
--thread-bytes <n> | at most this many bytes of whole messages and links in each context (default: 65536). |
--thread-within <duration> | messages within this long either side of the hit (default: 1d). |
--backend <archive|server|both> | where to search: the local archive, the messenger's server (default: both; message discovery uses archive only), or both. |
--server-time <duration> | stop waiting for the server after this long (default: 5s). |
--source <accounts> | every account of this messenger held in the store; personal, bots or all — the same as in: in the query; or a list: group:work,telegram:Alice. |
--limit <n> | how many. |
--page <n> | which page, starting at 1. |
--newest | newest first instead of best first. |
--exact | bare words and quotes match their exact form only, as exact:word does; text: still matches every form. |
--context <n> | messages before and after each hit; 2 in the terminal, 0 otherwise. |
--discover | find partial word matches, eligible replies and, once messages have vectors, messages close in meaning in the local archive; results are evidence, not confirmed answers. |
--timezone <zone> | the IANA timezone for calendar date boundaries. |
--saved <name|id> | run a saved search or an earlier run; options typed here replace its own. |
Returns: message hit — ref, timestamp, sender_name, sender_is_me, chat_title, excerpt, matched_in, score, and 9 more; every field: tg commands info search messages
Next usually: tg messages transcribe <chat> <message>, tg messages comments <chat> <post> [query], tg messages links <chat> <message>
Example: tg personal search messages draft --limit 10
tg search notes
search the notes — written in memo, or imported from a notes folder — by words and, with the local text model, by meaning; each hit says which found it and what it links to
tg search notes <query> [options]| Argument | Obligatoriedad | What it is |
|---|---|---|
query | required | strict Lucene query: words, "phrases", AND/OR/NOT, tag:, source:internal (written in memo) or source:file (from a notes folder) and date ranges. |
| Option | What it does |
|---|---|
--source <accounts> | only these notes accounts, separated by commas: notes:internal for notes written in memo, notes: as a hit shows it, notes, documents or group:. |
--filter <query> | a query every hit must also match, found by words or by meaning. |
--limit <n> | how many. |
--page <n> | which page, starting at 1. |
--exact | words as written only; meaning is not searched. |
--timezone <zone> | the IANA timezone for calendar date boundaries. |
Returns: note hit — ref, source, folder_id, path, title, updated_at, kind, provider, and 6 more; every field: tg commands info search notes
Example: tg personal search notes draft --limit 10
tg search conversations
the conversations nearest to a query in meaning and in words, best first, in one chat or every one — meaning after conversations embed; runs on this machine
Reads from an outside service.
tg search conversations <query> [options]| Argument | Obligatoriedad | What it is |
|---|---|---|
query | required | what to look for, in your own words, in any language the model reads. |
| Option | What it does |
|---|---|
--model <model> | local: a model id from models list (default: embeddinggemma); remote: the provider's model. |
--embedding-provider <provider> | embedding provider: local or openai; flags override profile settings. |
--base-url <url> | a server with OpenAI's /v1/embeddings: Gemini, Jina, or Ollama and LM Studio on this machine. |
--dims <n> | remote: the vector size — needed with --base-url; shortens an OpenAI model's. |
--max-chats <n> | at most this many chats; 5 with --sync-first, 20 with --catch-up if not given. |
--max-chunks <n> | at most this many chunks embedded in one run; 2000 if not given. |
--sync-first | first fetch new messages within the chat, time and message bounds. |
--sync-time <duration> | stop fetching after this long (default: 30s). |
--max-messages <n> | fetch at most this many messages total (default: 500). |
--chat <chat> | only this chat: a chat: its title or part of it, its id, @username, or me for Saved Messages. |
--since-time <time> | only those still going at this ISO 8601 time, or 30m / 2h / 1d ago, or later. |
--filter <query> | strict Lucene filter: any message in a conversation must match; does not change the meaning query. |
--source <accounts> | accounts to search: personal, bots, all, a provider, or a list like group:work,telegram:Alice,email:[email protected]; defaults to the active account. |
--timezone <zone> | IANA timezone for filter dates; system timezone by default. |
--limit <n> | how many. |
--catch-up | first build and embed, on this machine, the chats in scope that changed or were never built — within --max-chats and --max-chunks. |
Returns: conversation hit — summary, chunk, score, by, stale, source, locator, matched_in; every field: tg commands info search conversations
Example: tg personal search conversations "Reviewing the project draft"
tg search topics
a forum group's topics whose title matches
tg search topics <chat> <text> [options]| Argument | Obligatoriedad | What it is |
|---|---|---|
chat | required | a chat: its title or part of it, its id, @username, or me for Saved Messages. |
text | required | words from the topic's title. |
| Option | What it does |
|---|---|
--limit <n> | how many to show. |
--page <n> | which page, starting at 1. |
--all | every row, no paging. |
Returns: a forum group's topics whose title matches
Example: tg personal search topics "Book club" draft
tg searches
saved searches and the history of search messages and stats messages show, kept in the local store; --saved runs one
tg searches create
save a search under a name without running it; search messages --saved runs it
Changes something on this computer only.
tg searches create <name> [query] [options]| Argument | Obligatoriedad | What it is |
|---|---|---|
name | required | up to 64 letters a–z, digits and hyphens, not only digits. |
query | optional | the query, as for search messages; none matches every stored message. |
| Option | What it does |
|---|---|
--chat <chat> | only this chat — the same as chat: in the query; a chat: its title or part of it, its id, @username, or me for Saved Messages. |
--source <accounts> | every account of this messenger held in the store; personal, bots or all — the same as in: in the query; or a list: group:work,telegram:Alice,email:[email protected]. |
--limit <n> | how many. |
--newest | newest first instead of best first. |
--exact | bare words and quotes match their exact form only, as exact:word does; text: still matches every form. |
--context <n> | messages before and after each hit. |
--timezone <zone> | the IANA timezone for calendar date boundaries. |
--by <group> | count by chat, sender, day or hour for stats messages show --saved. |
--selection <json> | save the resolved parent ranking query and options from a drilldown. |
--replace | overwrite a saved search of the same name. |
Returns: saved search — id, name, command, params, language, version, fields_version, created_at, and 2 more; every field: tg commands info searches create
Example: tg personal searches create project-drafts draft --chat "Project room"
tg searches show
one saved search or earlier run: its query, options and how often it ran
tg searches show <name|id>| Argument | Obligatoriedad | What it is |
|---|---|---|
name|id | required | a saved search's name, or the id of any row of searches history. |
Returns: saved search — id, name, command, params, language, version, fields_version, created_at, and 2 more; every field: tg commands info searches show
Example: tg personal searches show project-drafts
tg searches list
the saved searches, by name
tg searches list [query]| Argument | Obligatoriedad | What it is |
|---|---|---|
query | optional | field:value terms; this list filters by none yet. |
Returns: saved search — id, name, command, params, language, version, fields_version, created_at, and 2 more; every field: tg commands info searches list
Example: tg personal searches list
tg searches history
the searches and counts that ran, newest first — saved ones included; never their results
tg searches history [options]| Option | What it does |
|---|---|
--limit <n> | how many to show. |
--page <n> | which page, starting at 1. |
--all | every row, no paging. |
Returns: saved search — id, name, command, params, language, version, fields_version, created_at, and 2 more; every field: tg commands info searches history
Example: tg personal searches history --limit 10
tg searches delete
delete a saved search, or one run from the history
Changes something on this computer only.
tg searches delete <name|id>| Argument | Obligatoriedad | What it is |
|---|---|---|
name|id | required | a saved search's name, or the id of any row of searches history. |
Returns: saved search — id, name, command, params, language, version, fields_version, created_at, and 2 more; every field: tg commands info searches delete
Example: tg personal searches delete project-drafts
tg searches clear
empty the history; saved searches stay
Changes something on this computer only.
tg searches clearReturns: search history clear — cleared; every field: tg commands info searches clear
Example: tg personal searches clear
tg replies
rules that answer messages for you, kept in a file of this profile
tg replies add
add a rule with every default written out, off until you edit and enable it
Changes something on this computer only.
tg replies add <id>| Argument | Obligatoriedad | What it is |
|---|---|---|
id | required | lower-case letters, digits and -; unique in this profile. |
Returns: add a rule with every default written out, off until you edit and enable it
Example: tg personal replies add 1
tg replies on
enable one reply rule; its template must be ready
Changes something on this computer only.
tg replies on <id>| Argument | Obligatoriedad | What it is |
|---|---|---|
id | required | the rule's id. |
Returns: enable one reply rule; its template must be ready
Example: tg personal replies on 1
tg replies off
disable one reply rule
Changes something on this computer only.
tg replies off <id>| Argument | Obligatoriedad | What it is |
|---|---|---|
id | required | the rule's id. |
Returns: disable one reply rule
Example: tg personal replies off 1
tg replies edit
change only the named fields of a reply rule; lists replace the whole list
Changes something on this computer only.
tg replies edit <id> [options]| Argument | Obligatoriedad | What it is |
|---|---|---|
id | required | the rule's id. |
| Option | What it does |
|---|---|
--do <actions> | actions: reply, task, or both, comma-separated. |
--kinds <kinds> | chat kinds: dialog, group; comma-separated, empty for any. |
--allow-chats <ids> | only these chat ids, comma-separated; empty for any. |
--deny-chats <ids> | leave these chat ids out, comma-separated; empty clears. |
--words <words> | match any of these whole words, comma-separated; empty clears. |
--question | match only questions. |
--no-question | do not require a question. |
--mentions-me | require a mention of you or a reply to you. |
--no-mentions-me | do not require a mention of you or a reply to you. |
--allow-people <ids> | only these sender ids, comma-separated; empty for any. |
--deny-people <ids> | leave these sender ids out, comma-separated; empty clears. |
--contacts-only | match only contacts. |
--no-contacts-only | do not require a contact. |
--template <text> | the reply template. |
--template-mode <mode> | legacy template mode: fill-only or may-reword; use ai blocks instead. |
--as-reply | send as a reply to the matched message. |
--no-as-reply | send without linking to the matched message. |
--per-chat <limit> | at most this many per chat, such as 1/12h. |
--per-person <limit> | at most this many per person, such as 1/1d. |
--outside <hours> | answer outside this 24-hour window, such as 09:00-19:00. |
--days <days> | days of the working window, such as mon-fri or sat,sun. |
--timezone <zone> | the IANA timezone for the working window. |
--no-hours | clear the working window. |
Returns: change only the named fields of a reply rule; lists replace the whole list
Example: tg personal replies edit 1
tg replies audience
show the reply audience, who the rules may answer, or replace its named fields; a new file answers everyone a rule matches
Changes something on this computer only.
tg replies audience [options]| Option | What it does |
|---|---|
--reply <mode> | answer all or only listed senders and chats: all, listed. |
--allow-people <ids> | replace allowed sender ids, comma-separated; empty clears. |
--allow-chats <ids> | replace allowed chat ids, comma-separated; empty clears. |
--deny-people <ids> | replace denied sender ids, comma-separated; empty clears; deny wins. |
--deny-chats <ids> | replace denied chat ids, comma-separated; empty clears; deny wins. |
Returns: show the reply audience, who the rules may answer, or replace its named…
Example: tg personal replies audience
tg replies consents
consent for reply models once per profile and endpoint, with chat opt-outs
tg replies consents show
show the reply model consent and chat opt-outs; never calls a model
tg replies consents showReturns: show the reply model consent and chat opt-outs; never calls a model
Example: tg personal replies consents show
tg replies consents grant
allow incoming message data to go to the configured reply model for this profile; chat opt-outs remain
Changes something on this computer only.
tg replies consents grantReturns: allow incoming message data to go to the configured reply model for this…
Example: tg personal replies consents grant
tg replies consents revoke
revoke the profile's reply model consent immediately; chat opt-outs remain
Changes something on this computer only.
tg replies consents revokeReturns: revoke the profile's reply model consent immediately; chat opt-outs remain
Example: tg personal replies consents revoke
tg replies consents deny
keep this chat's incoming data away from the reply model
Changes something on this computer only.
tg replies consents deny <chat>| Argument | Obligatoriedad | What it is |
|---|---|---|
chat | required | the native chat id, used as written; never resolved over the network. |
Returns: keep this chat's incoming data away from the reply model
Example: tg personal replies consents deny Team
tg replies consents allow
remove this chat's model opt-out; does not grant profile consent
Changes something on this computer only.
tg replies consents allow <chat>| Argument | Obligatoriedad | What it is |
|---|---|---|
chat | required | the native chat id, used as written; never resolved over the network. |
Returns: remove this chat's model opt-out; does not grant profile consent
Example: tg personal replies consents allow Team
tg replies test
what the rules would have answered in the stored messages, to whom and why — sends nothing, changes nothing, never connects
tg replies test [rule] [options]| Argument | Obligatoriedad | What it is |
|---|---|---|
rule | optional | only this rule, by its id; every rule in file order if not given. |
| Option | What it does |
|---|---|
--since-time <time> | from this ISO 8601 time, or 2h / 1d ago; 7d ago if not given. |
--ai | call the configured reply model with stored message data; requires reply consent, otherwise uses fallback. |
Returns: what the rules would have answered in the stored messages, to whom and why —…
Example: tg personal replies test
tg replies pause
stop every reply rule of this profile at once, a running serve too; resume undoes it
Changes something on this computer only.
tg replies pauseReturns: stop every reply rule of this profile at once, a running serve too; resume…
Example: tg personal replies pause
tg replies resume
let the reply rules answer again after pause
Changes something on this computer only.
tg replies resumeReturns: let the reply rules answer again after pause
Example: tg personal replies resume
tg replies status
whether the rules may send, which are on, and who they may answer
tg replies statusReturns: whether the rules may send, which are on, and who they may answer
Example: tg personal replies status
tg recipients
the chats this profile may send to, when the list is on
tg recipients list
the chats on the list; empty and off until the first add
tg recipients list [query]| Argument | Obligatoriedad | What it is |
|---|---|---|
query | optional | field:value terms that narrow the list — the fields are below. |
Returns: recipient — id, title, added_at, partner_id; every field: tg commands info recipients list
Example: tg personal recipients list
tg recipients add
allow sending to this chat; the first add turns the list on
Changes something on this computer only.
tg recipients add <chat>| Argument | Obligatoriedad | What it is |
|---|---|---|
chat | required | a chat: its title or part of it, its id, @username, or me for Saved Messages. |
Returns: recipient change added — id, title, added; every field: tg commands info recipients add
Example: tg personal recipients add "Book club"
tg recipients remove
stop allowing this chat; the list stays on
Changes something on this computer only.
tg recipients remove <chat>| Argument | Obligatoriedad | What it is |
|---|---|---|
chat | required | chat id, or the title as the list shows it. |
Returns: recipient change removed — id, title, removed; every field: tg commands info recipients remove
Example: tg personal recipients remove "Book club"
tg recipients clear
delete the list, which turns it off: this profile may send to any chat again
Changes something on this computer only.
tg recipients clearReturns: recipient change off — off, was_on; every field: tg commands info recipients clear
Example: tg personal recipients clear
tg sends
every attempt to send from this profile — never the text
tg sends list
attempts to send, newest first: sent, refused, failed, or not known
tg sends list [query] [options]| Argument | Obligatoriedad | What it is |
|---|---|---|
query | optional | field:value terms that narrow the list — the fields are below. |
| Option | What it does |
|---|---|
--limit <n> | how many to show. |
--page <n> | which page, starting at 1. |
--all | every row, no paging. |
Returns: send attempt — at, profile, chat_id, outcome, kind, action, people, message_id, and 16 more; every field: tg commands info sends list
Example: tg personal sends list --limit 10
tg guide
scenarios: the commands for a common task, in order, and why each
tg guide [name]| Argument | Obligatoriedad | What it is |
|---|---|---|
name | optional | one scenario; without it, the list. |
Returns: scenarios: the commands for a common task, in order, and why each
Example: tg guide, tg guide agent-without-send --json
Exit codes
Branch on the code, not on the text: the text can change, the code does not.
| Code | When |
|---|---|
0 | it worked |
2 | validation_error |
3 | configuration_error |
4 | authentication_error |
5 | permission_error |
6 | not_found |
7 | confirmation_required |
8 | rate_limited |
9 | timeout |
10 | network_error |
11 | provider_error |
12 | provider_unavailable |
13 | invalid_response |
14 | outcome_unknown |
15 | conflict |
130 | cancelled |
1 | anything else |
0 and only 0 means the operation was done. 14 (outcome_unknown) means a message may
have gone: repeat it only with the same --operation-id, which Telegram uses to drop a second copy.