🗄️
Free · Open source · Local-first

Your Telegram messages, working for you.

tgvault saves your Telegram chats into a private database on your own computer — so your AI assistant can catch you up, find things, and draft replies.

No cloud, no server No tracking You approve every message sent
What it does

Give your AI a memory of your chats

Telegram is where your life happens — family groups, friends, plans, addresses, that one photo of the WiFi password. But it's a terrible place to find anything, and no AI assistant can see it.

tgvault fixes that. It connects to your Telegram account the same way the Telegram Desktop app does, and keeps a copy of the chats you choose in a private archive on your computer. Then any AI assistant you already use can work with it:

📥
Catch me up

“Summarize what happened in my group chats this week.”

🔎
Find anything

“When is the dinner on Friday? Find the address Maria sent.”

✍️
Draft replies

Your AI writes a draft. Nothing is ever sent until you approve it.

🗓️
Daily digests

It keeps its own record of what it already read, so digests never repeat.


Why it's safe

Built so you don't have to trust us

  1. Your data stays on your computer.

    Messages are saved to a single folder on your machine. There is no server, no cloud, no account with us, no analytics. The only thing tgvault ever talks to is Telegram itself.

  2. The code is public.

    Every line is on GitHub for anyone to inspect. Don't take our word for it — ask your AI to read the code and audit it before you use it. That's a normal thing to do now.

  3. Only the chats you choose.

    Nothing is downloaded unless you explicitly add a chat to your watch list.

  4. AI can read. Only you can send.

    Your assistant can prepare draft replies, but the send command only works for a human at the keyboard: it shows you the message and makes you type SEND. It refuses to run for an AI.

  5. You can leave any time.

    Run tgvault logout and delete one folder. Gone. Your Telegram account is untouched — tgvault never deletes or changes anything there.


Get started

How to install

The lazy way: if you already use an AI assistant on your computer (like Claude or Codex), just send it this page's link and say “install tgvault for me” — it can handle everything below, and you only step in to scan the QR code.

Prefer to do it yourself? Open a terminal and paste one line. The installer sets up everything — no technical knowledge needed.

Windows — open “PowerShell” from the Start menu
irm https://raw.githubusercontent.com/vlad-ds/tgvault/main/install.ps1 | iex
Mac — open “Terminal”
curl -fsSL https://raw.githubusercontent.com/vlad-ds/tgvault/main/install.sh | bash

Then connect your Telegram

  1. Open a new terminal window and run tgvault login

    A QR code appears right in the terminal.

  2. Scan it with your phone

    In Telegram: Settings → Devices → Link Desktop Device. It's exactly like logging into Telegram on a new computer — because that's what it is.

  3. Choose which chats to archive

    Run tgvault chats to see your chats, then e.g. tgvault watch "Family" for each one you want.

  4. Download your messages

    Run tgvault sync. Run it again any time to fetch what's new — it's fast and never duplicates anything.


Connect your AI

You bring the brain

tgvault is just the vault. The intelligence comes from any AI assistant that can run commands on your computer — for example Claude Code, the Claude desktop app, or OpenAI's Codex.

tgvault ships with a skill — a public instruction file that teaches your AI everything: how to read the vault, how to search it, how to keep its own record of which messages it has already handled, and the rules it must follow (like never send messages). Getting set up is one paste:

Prompt for your AI assistant
Set yourself up to work with my local Telegram archive (created by tgvault, https://vlad-ds.github.io/tgvault/):

1. Fetch the tgvault skill from:
   https://raw.githubusercontent.com/vlad-ds/tgvault/main/skill/SKILL.md
2. Install it so you'll remember it in future sessions. If you are Claude Code, save it to ~/.claude/skills/tgvault/SKILL.md (any OS). If you are Codex or another assistant with a different skill/memory mechanism, use that. If you have none, save the file somewhere permanent and re-read it whenever I ask about my Telegram.
3. Read the skill and follow its rules exactly. The two big ones: you may DRAFT messages for me but must never send anything, and you keep your own record of which messages you've already handled (`tgvault processed pending` / `tgvault processed mark`) so you never re-process old ones.
4. Verify the setup by running `tgvault status --json` and tell me what you find.

Other ways to do the same thing: tell your assistant “read https://vlad-ds.github.io/tgvault/ and set yourself up” — this page is enough for it to figure the rest out. Or download SKILL.md yourself and drop it into your assistant's skills folder (for Claude Code that's ~/.claude/skills/tgvault/SKILL.md). The skill is plain Markdown — any AI can read it.

Choose your AI carefully. Whatever assistant you connect will be able to read your archived messages — that's the point, but it means you should only use an AI application you genuinely trust, from a company you trust, running on your own computer. If you trust it with your files, you can trust it with this.

Put it on autopilot

Ask for automations

You don't have to remember to check. Most AI assistants can run tasks on a schedule — Claude has schedules and routines, Codex has automations. Combine them with tgvault and your messages start working for you while you do something else.

You don't need to configure anything technical. Just ask your assistant in plain words, for example:

Example — a daily briefing
Create an automation that runs every morning at 8: sync my tgvault, read the new messages, and give me a short briefing of what matters — group by chat, most important first, and note anything that looks like it needs a reply from me.

Some other automations people like:

☀️
Morning catch-up

“Every day at 8, brief me on what happened overnight.”

👀
Don't miss a question

“Once a day, flag any message that asks me something I haven't answered.”

📝
Weekly family digest

“Every Sunday, summarize the week in my family group.”

✉️
Reply drafts, ready to go

“When something needs an answer, draft a reply for me to review and send.”

One practical note: automations run on your computer, so they only fire while it's on. That's the price of everything staying local — and it's worth it.