Notes → compile → publish, using a private Telegram group as the store and posting under your own account.
Project description
tg_notes
Turn a private Telegram group into your notes store, then publish tailored updates under your own account. Capture notes from anywhere — any AI-agent chat, the CLI, or your phone — and compile a subset into a per-recipient view that gets posted as you, into a real chat or forum topic. Daily work reports are one built-in preset.
Status: planning. No implementation yet. See TODO.md for the plan and docs/architecture.md for the design.
Why
- Your notes live in Telegram — private, synced, reachable from your phone. Nothing is stored in local files.
- Posts go out as you. Delivery uses the Telegram client API (userbot), so an update can land in a real work group or topic under your own name, not a bot's.
- Small CLI, portable Skill. A single CLI does the Telegram work; AI-agent Skills (Claude Code first) drive it and do the writing/summarizing. The Skill is meant to be reused across other agent runtimes.
Features
- Notes stored in a private Telegram forum group; one topic per notebook.
- A dedicated contacts topic acts as the address book (one message per contact).
- Compile a subset of notes into a recipient-specific view and post it as you.
- Per-contact style (e.g. verbatim technical for a lead, simplified for a manager).
- Post to a plain chat or a specific forum topic; optional mention.
- Daily work-report preset.
Full list: docs/features.md.
How it works
A private forum supergroup is the store:
contactstopic — the address book (chat/topic/style per recipient).- one topic per notebook — the raw notes for a stream (project, audience, …).
The tg-notes CLI creates/attaches the group, appends notes, lists them for an agent
to compile, and publishes the result. See docs/architecture.md.
Install & usage
Two pieces: the CLI (does the Telegram I/O) and the Claude Code plugin (the skills that drive it).
# CLI — from PyPI (once published; see CHANGELOG for release status):
pipx install tg-notes
# Plugin (bundles the tg-notes and tg-notes-send skills) — from this git marketplace:
# /plugin marketplace add korkin25/tg_notes
# /plugin install tg-notes@tg-notes-marketplace
The skills drive the CLI, so tg-notes must be on PATH. The two skills:
skills/tg-notes/— capture: compose a note (verbatim or a summary of real session facts) and file it withtg-notes note add.skills/tg-notes-send/— compile & send: rewrite stored notes per a contact's style, confirm, and publish withtg-notes send(daily report is a preset).
For agent hosts that can't shell out (Claude Desktop, …), a local stdio MCP server
exposes the same core (note_add / note_add_file / notes_list / contacts_list /
send). note_add_file uploads a local file as a media note — audio auto-transcribes to
the caption, or the agent passes its own caption (e.g. an image description) to skip it:
pipx install "tg-notes[mcp]" # then point your MCP client at the `tg-notes-mcp` command
It runs over stdio only — the session and secrets never leave the machine. When the host
spawns the server with a sanitized environment, the (opt-in) keyring backend self-heals
DBUS_SESSION_BUS_ADDRESS so it can still reach the Secret Service.
Available so far:
# One-time: create (or attach to) the private forum supergroup that stores your notes.
# On first run it walks you through onboarding — prompts for your api_id/api_hash
# (get them at https://my.telegram.org), saves them to local config (chmod 600), and
# runs the interactive login (phone → code → 2FA). Then it ensures the `contacts` topic
# and a default `daily` notebook, pins a recovery marker, and saves the group id.
# Idempotent — safe to re-run.
tg-notes setup [--notebook <name>]
# Append a note to a notebook topic (creates the topic on demand). Read the text from a
# file or from stdin (-); attach optional #hashtags. Prints the posted note as JSON.
tg-notes note add --notebook daily --text-file note.txt --hashtag infra
echo "quick note" | tg-notes note add --text-file -
# Or attach a media file (photo/video/audio/document) as the note — stored as native
# Telegram media in the topic, kind auto-detected. --caption is the searchable text (any
# --hashtag is appended to it).
tg-notes note add --notebook daily --file ~/clips/demo.mp4 --caption "walkthrough" --hashtag demo
# Audio notes auto-transcribe: when --file is audio (.ogg/.opus/.mp3/.m4a/.wav/…) and no
# --caption is given, tg-notes transcribes it LOCALLY and uses the transcript as the caption
# (searchable text) — best-effort, so if no engine is installed the file still uploads
# without a caption. Enable a local engine (both need `ffmpeg` to decode audio):
# pipx inject tg-notes faster-whisper # the faster-whisper backend
# # …or set whisper_cmd in config.toml to a whisper.cpp/openai-whisper binary
# whisper_model (e.g. base/small) picks the model. Force/skip with --transcribe/--no-transcribe.
tg-notes note add --notebook daily --file ~/voice/idea.ogg # caption ← transcript
tg-notes note add --notebook daily --file ~/voice/idea.ogg --no-transcribe
# List the raw notes of a notebook (oldest first) as JSON, optionally bounded by --since
# (today | HH:MM | YYYY-MM-DD | ISO datetime; local when no offset). Feeds compilation.
tg-notes notes list --notebook daily --since today
# Address book (one message per contact in the `contacts` topic). `set` creates or
# updates (only the given fields change; a new contact needs --chat-id). List/remove
# print JSON. chat_id is -100… | @username | me.
tg-notes contacts set boss --chat-id @alice --name Alice --style "verbatim technical"
tg-notes contacts list
tg-notes contacts remove boss
# Publish compiled text to a contact's chat, as you — into a forum topic when the contact
# has a topic_id, prepending its mention if set. Text from a file or stdin (-). Use
# --dry-run to print exactly what would be sent without sending.
tg-notes send --contact boss --text-file report.txt
echo "..." | tg-notes send --contact boss --text-file - --dry-run
# List the storage group's notebook topics as JSON (excludes General/contacts).
tg-notes notebooks list
# Secrets backend. By default the api_hash + session live in local files (config.toml
# 600 + *.session). Optionally move them into the OS Secret Service (gnome-keyring /
# KWallet / KeePassXC — whichever owns org.freedesktop.secrets; the session is stored as
# a StringSession). `secrets status` shows the active backend and which provider answers.
pipx install "tg-notes[keyring]"
tg-notes secrets status
tg-notes secrets doctor # diagnose the store + get setup/migration steps
tg-notes secrets migrate --to keyring # or: --to file to move back
# Using KeePassXC as the store (serve Secret Service, dedicated group, the
# confirmation trade-off): see docs/keepassxc.md. On Linux + keyring, the CLI re-execs
# through a named launcher so the vault prompt shows "tg-notes", not "python3.12".
# Test setup/doctor/migrate end-to-end against a throwaway isolated install
# (never touches the real config/session/vault): see docs/sandbox-testing.md.
# Log in on its own (setup calls this for you; useful to re-authorize a new device).
# Requires api_id/api_hash in local config; writes a chmod-600 session file.
tg-notes login
# Print the logged-in account identity (id / username / first name).
tg-notes whoami
Omit --contact / --to / --notebook in an interactive terminal to pick from a list
(uses fzf/sk/fzy if installed, else a numbered menu); with the flag or when piped,
behavior is unchanged.
Security & Telegram ToS
- Userbot automation is a gray area of Telegram's ToS; you run it on your own account at your own risk. The tool only publishes your own notes and reports.
- The Telethon session file grants full access to your account: it is
chmod 600and never committed.api_id/api_hashand local config stay on your machine.
License
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file tg_notes-0.1.1.tar.gz.
File metadata
- Download URL: tg_notes-0.1.1.tar.gz
- Upload date:
- Size: 95.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d12885dc78f49a97731848bd0827c08597ea9f895f8a6ee7f40f256deedaeadf
|
|
| MD5 |
d43b62d234e7f7244251b5f44a2d3283
|
|
| BLAKE2b-256 |
60c3cad123725c7b4b3ebb3f6d85a9f574b7a04cc12a9ad510d9c5ac09fa2e42
|
Provenance
The following attestation bundles were made for tg_notes-0.1.1.tar.gz:
Publisher:
release.yml on korkin25/tg_notes
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
tg_notes-0.1.1.tar.gz -
Subject digest:
d12885dc78f49a97731848bd0827c08597ea9f895f8a6ee7f40f256deedaeadf - Sigstore transparency entry: 2235868142
- Sigstore integration time:
-
Permalink:
korkin25/tg_notes@4d493cd208a30a4665b1315489c8fab44bd9a37d -
Branch / Tag:
refs/tags/v0.1.1 - Owner: https://github.com/korkin25
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@4d493cd208a30a4665b1315489c8fab44bd9a37d -
Trigger Event:
push
-
Statement type:
File details
Details for the file tg_notes-0.1.1-py3-none-any.whl.
File metadata
- Download URL: tg_notes-0.1.1-py3-none-any.whl
- Upload date:
- Size: 48.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
19ac5fcc75dcb2e5e72730a10fd030658804440a3bcda14a84de4ef6da747205
|
|
| MD5 |
8daa754d307f7d58c72bf45cba9d9dcc
|
|
| BLAKE2b-256 |
ea80ad1455a5dc6d005b13db4e7a5264aa81e4800c41587ee4913e51bb64b0da
|
Provenance
The following attestation bundles were made for tg_notes-0.1.1-py3-none-any.whl:
Publisher:
release.yml on korkin25/tg_notes
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
tg_notes-0.1.1-py3-none-any.whl -
Subject digest:
19ac5fcc75dcb2e5e72730a10fd030658804440a3bcda14a84de4ef6da747205 - Sigstore transparency entry: 2235868391
- Sigstore integration time:
-
Permalink:
korkin25/tg_notes@4d493cd208a30a4665b1315489c8fab44bd9a37d -
Branch / Tag:
refs/tags/v0.1.1 - Owner: https://github.com/korkin25
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@4d493cd208a30a4665b1315489c8fab44bd9a37d -
Trigger Event:
push
-
Statement type: