Use cases
Search your whole Telegram history
Dotiphant copies the history of every Telegram chat you are in into one file on your computer and gives you full-text search across all of it. Search in the local viewer with dotiphant open, in the terminal with dotiphant search, or ask your AI assistant in plain words.
Searches run on your computer, against your local archive, not against Telegram.
Why Telegram's own search is not always enough
Telegram's search works, but it is built for finding a recent message in one place. It gets harder when you remember the words but not the chat, when you want only one person's messages from last spring, or when you want the result as text you can reuse. A local archive with a full-text index makes those searches fast and repeatable.
Get your history into the archive
- Install Dotiphant and finish the setup in your browser. It takes about five minutes.
curl -fsSL https://dotiphant.com/install.sh | sh - The first sync loads the last 365 days of your chats with people and groups by default. For everything, run one full sync. Large accounts can take a while; stop with Ctrl-C and the next sync continues where it stopped.
dotiphant sync --all-history - Keep it current. Background refresh fetches new messages every 15 minutes if you turn it on.
dotiphant schedule install
Channels are off by default; turn them on with dotiphant setup --reconfigure. Secret chats are not included, because they never reach Telegram's servers in readable form.
Search in the viewer
dotiphant open starts the viewer at http://127.0.0.1:8765 and opens it in your browser. It shows your chat list, each chat with its media, and a search box across all chats. From a result you jump into the chat at that message. The viewer listens on your own computer only and needs a private key, so other programs and other user accounts cannot read it.
Search in the terminal
dotiphant search "launch date"dotiphant search invoice --chat "Acme" --since 30ddotiphant search contract --sender @clara --since 2026-03-01 --until 2026-06-30dotiphant search wallet --limit 50 --json--chatlimits to one chat, by id, @username or title.--senderlimits to a sender name or @username.--sinceand--untiltake a span like24hor7d, or a date like2026-09-01.--limitsets the number of results (20 by default).--jsonprints JSON for scripts.
Results come newest first, with the chat and a snippet. Matched words are marked in [brackets].
How queries work
- Every word must match.
launch datefinds messages that contain both words, anywhere in the message. - The last word also matches as a prefix, so
invoicfinds "invoice" and "invoices". - Quotes keep a phrase together:
"launch date"only finds the two words side by side. - OR gives alternatives:
contract OR agreement.
Not sure which chat? List them first with dotiphant chats, filtered by name, kind or recent activity:
dotiphant chats acmedotiphant chats --kind group --active 7dAsk your AI instead
Sometimes you do not know the words at all, only the topic. Connect your AI app with dotiphant connect and ask in plain language: "What did Clara and I agree on about the launch date?" or "Find the wallet address someone sent me in the Acme group." The assistant runs the searches, reads the matching parts of the chats and answers with the context. See A local Telegram MCP server. The AI provider receives the messages its assistant reads.
For a quick look at what happened lately, dotiphant recent prints a digest of the last 24 hours, or any span with --since.
Limits
- Search covers what is in the archive. Older history needs one
--all-historysync. - Photos and files are downloaded on demand. Use the button in the viewer or
dotiphant media CHAT. - The archive keeps messages even after they are edited or deleted in Telegram, until you delete them.
Want the result as a transcript? See Export a Telegram chat to Markdown.
Install Dotiphant
Free and open source (MIT). macOS and Linux; Windows experimental. The command installs the latest GitHub release and opens the setup in your browser. It takes about five minutes.
The script is about 150 lines. Read it first, or see other ways to install. The installer verifies the download against the release checksums (SHA256SUMS) before installing. You can check signed build provenance with gh attestation verify; see Verify a download.
curl -fsSL https://dotiphant.com/install.sh | shdotiphant open # setup opens in your browser