Agent-first Telegram community management tools.
Project description
telek
Agent-first Telegram community management tools.
telek is an AgentCulture sibling repo.
The shape it wears — pyproject layout, CLI conventions, vendored skills, CI
pipeline — comes from
steward's sibling pattern.
Status
Alpha. v0.2 lands the Telegram surface: telek bot send,
telek group roster, telek group pin. Every write verb is dry-run by
default; pass --apply to commit.
Install
uv tool install telek
Then telek --version should work on your PATH. uv tool install is the
supported path — not pip install.
Usage
telek learn # structured self-teaching prompt for an agent
telek learn --json # same, as a JSON payload
telek explain # top-level overview
telek explain whoami # per-verb markdown
telek whoami # nick + version + bot-token-configured probe
telek whoami --json # structured payload
Every command supports --json where it produces a listing or report,
and respects the exit-code policy (0 success / 1 user error / 2 env
error). Errors carry a {code, message, remediation} shape; text mode
renders as error: ... + hint: ... on stderr.
Telegram verbs (requires pip install 'telek[telegram]')
# read-only: count + admins + bot's own permissions
telek group roster --chat @announcements --json
# write (dry-run by default; --apply to commit)
telek bot send --chat @announcements --text "hello" --parse-mode markdown
telek bot send --chat @announcements --text "hello" --apply
# pin / unpin (also dry-run by default)
telek group pin --chat @announcements --message 123 --apply
telek group pin --chat @announcements --unpin --apply
Configuration
| Variable | Purpose |
|---|---|
TELEK_BOT_TOKEN |
Telegram bot token. Required for write verbs once they land. Never logged. |
Bot tokens, group IDs, and webhook secrets must never be committed to
the repo — keep them in repo secrets or a git-ignored .env.
Tokens are loaded from os.environ first, then from a .env file in the
current directory, then from a .env at the nearest enclosing git root.
Process env always wins. .env files that are world-writable on POSIX are
skipped with a warning.
Testing
The unit suite runs offline. Run it with:
uv run pytest -v
Live smoke tests
Optional live tests in tests/test_telegram_live.py exercise bot send /
group roster / group pin / unpin against the real Bot API. Enable by
exporting two numeric chat IDs the bot can reach:
export TELEK_LIVE_TEST_USER_CHAT=<numeric user chat_id>
export TELEK_LIVE_TEST_GROUP_CHAT=<numeric group chat_id>
uv run pytest tests/test_telegram_live.py -v
The bot must be a member of the user DM (the user must have started a chat with the bot) and a member-admin (with Pin Messages) in the group. CI does not set these env vars, so live tests skip in CI.
Project shape
See CLAUDE.md for the directory layout, build / test /
publish commands, and the sibling-pattern conventions telek inherits.
Contributing
Every PR must bump the version in pyproject.toml and prepend a
Keep a Changelog entry to CHANGELOG.md.
The version-check CI job enforces this. Use the vendored version-bump
skill:
python .claude/skills/version-bump/scripts/bump.py patch # or minor / major
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 telek-0.2.0.tar.gz.
File metadata
- Download URL: telek-0.2.0.tar.gz
- Upload date:
- Size: 105.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: uv/0.11.14 {"installer":{"name":"uv","version":"0.11.14","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2b81dc3cc5e42d35ec8a16bce1428c27615c2a0f025494979f5959aeab2bddb2
|
|
| MD5 |
a5d7215bf1ce5c38d84e2e0109df16f9
|
|
| BLAKE2b-256 |
6ea4af146815c58c46652d1a6b13b0dc44e0775de2f54209748ce00d1820fd64
|
File details
Details for the file telek-0.2.0-py3-none-any.whl.
File metadata
- Download URL: telek-0.2.0-py3-none-any.whl
- Upload date:
- Size: 22.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: uv/0.11.14 {"installer":{"name":"uv","version":"0.11.14","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d751fb9f81a929351bd9b6bb3dcab45dabcf5d7378d3e15e1e782083f488b758
|
|
| MD5 |
e345c86682287c17961c69212f950c84
|
|
| BLAKE2b-256 |
f3fb8fb88223ab0f62416c5080a4119e272cfb8b4c23d40e38c1c2c61943ed19
|