better-tg-cli 0.25.2 → 0.27.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +24 -3
- package/README.ru.md +24 -3
- package/dist/telegram.mjs +1 -1
- package/package.json +1 -1
- package/skills/better-tg-cli/SKILL.md +1 -1
- package/skills/better-tg-cli/reference.md +12 -4
package/README.md
CHANGED
|
@@ -91,6 +91,7 @@ Every channel ships the same version from one release:
|
|
|
91
91
|
| Gemini CLI extension | skill and MCP server | `gemini extensions install https://github.com/TheVilfer/better-tg-cli` |
|
|
92
92
|
| Cursor, VS Code | MCP server | [one-click buttons](#mcp-server) |
|
|
93
93
|
| Grok Bot | MCP server over HTTP from your Mac | [see below](#grok-bot-remote-mcp-over-http) |
|
|
94
|
+
| The CLI itself | agent skill for Claude Code, Codex, Cursor, Gemini CLI and 7 more | `telegram skill install` |
|
|
94
95
|
| [skills.sh](https://skills.sh) | agent skill for any shell agent | `npx skills add TheVilfer/better-tg-cli` |
|
|
95
96
|
| [MCP Registry](https://registry.modelcontextprotocol.io/v0/servers?search=better-tg-cli) | MCP server entry `io.github.TheVilfer/better-tg-cli` | through your MCP client |
|
|
96
97
|
|
|
@@ -121,7 +122,18 @@ grok plugin marketplace add TheVilfer/better-tg-cli && grok plugin install bette
|
|
|
121
122
|
The skill ([`skills/better-tg-cli`](skills/better-tg-cli/SKILL.md)) teaches any agent with a shell
|
|
122
123
|
(Claude Code, Codex, Cursor, Gemini CLI, OpenCode and others) to use the CLI safely. It checks the
|
|
123
124
|
setup, never logs in on its own, keeps writes behind your approval, and avoids ban-prone patterns.
|
|
124
|
-
|
|
125
|
+
The CLI carries the skill and installs it itself, so it always matches your version:
|
|
126
|
+
|
|
127
|
+
```bash
|
|
128
|
+
telegram skill install # every supported agent found on this machine
|
|
129
|
+
telegram skill install -a claude-code codex
|
|
130
|
+
telegram skill status # installed, outdated, linked or missing, per agent
|
|
131
|
+
```
|
|
132
|
+
|
|
133
|
+
It knows Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Grok Build, OpenCode, Goose,
|
|
134
|
+
Droid, Windsurf and Pi (`telegram skill status` lists the folders). Run it again after
|
|
135
|
+
`telegram update` to refresh the skill. A skill folder that is a symlink is left alone unless you
|
|
136
|
+
pass `--force`. For other agents, use the [skills](https://skills.sh) CLI:
|
|
125
137
|
|
|
126
138
|
```bash
|
|
127
139
|
npx skills add TheVilfer/better-tg-cli # pick agents interactively
|
|
@@ -130,6 +142,12 @@ npx skills add TheVilfer/better-tg-cli -g -a claude-code -a codex -y
|
|
|
130
142
|
|
|
131
143
|
## Log in
|
|
132
144
|
|
|
145
|
+
**Through your agent** (easiest): ask it to set up Telegram, or run `telegram onboard` yourself. It
|
|
146
|
+
opens a page on 127.0.0.1 where you get an invite from [better-tg-cli.com](https://better-tg-cli.com)
|
|
147
|
+
(it comes back to the page by itself) or enter your own keys, scan a QR code and type your 2FA
|
|
148
|
+
password. The agent only starts the command and waits: it never sees the invite, the QR code or the
|
|
149
|
+
password. The page answers only on a random secret path and closes when you're done.
|
|
150
|
+
|
|
133
151
|
**With your own API keys** (the default):
|
|
134
152
|
1. Open https://my.telegram.org/apps, create an application, and copy its `api_id` and `api_hash`.
|
|
135
153
|
2. Run `telegram auth --qr` and enter them. Then, on your phone, go to Settings → Devices → Link
|
|
@@ -137,7 +155,9 @@ npx skills add TheVilfer/better-tg-cli -g -a claude-code -a codex -y
|
|
|
137
155
|
`telegram auth` asks for your phone number and a login code instead. If the QR won't scan on a
|
|
138
156
|
light terminal theme, run with `TG_QR_INVERT=1`.
|
|
139
157
|
|
|
140
|
-
**With an invite.**
|
|
158
|
+
**With an invite.** You don't need your own keys with an invite token. Get one at
|
|
159
|
+
[better-tg-cli.com](https://better-tg-cli.com) (confirm your email with a code; the page is in Russian
|
|
160
|
+
and also has an install guide), or from the maintainer.
|
|
141
161
|
Run `telegram auth --invite --qr` and paste the token, or pass it as `TG_INVITE=…` or `--invite -`. The
|
|
142
162
|
invite service (`broker/`) hands out the app's keys once, for this login only. The `api_hash` is not
|
|
143
163
|
kept on your machine. Invites are personal, allow a limited number of logins, and can be revoked.
|
|
@@ -247,7 +267,7 @@ Only after you turn writes on. `telegram write-access on` asks you to confirm in
|
|
|
247
267
|
No. `read`, `inbox` and `search` leave chats unread. Only `telegram mark-read` marks them.
|
|
248
268
|
|
|
249
269
|
**Do I need my own API keys?**
|
|
250
|
-
Yes, from [my.telegram.org/apps](https://my.telegram.org/apps). They are free and take a minute to create.
|
|
270
|
+
Yes, from [my.telegram.org/apps](https://my.telegram.org/apps). They are free and take a minute to create. With an invite from [better-tg-cli.com](https://better-tg-cli.com), `telegram auth --invite --qr` logs you in without them.
|
|
251
271
|
|
|
252
272
|
**Where is my session stored, and who can see my messages?**
|
|
253
273
|
The session is in the macOS Keychain, the Linux Secret Service or 1Password. The CLI talks to Telegram directly and has no analytics. The only other hosts are npm for a daily version check and the invite service at login. See [PRIVACY.md](PRIVACY.md).
|
|
@@ -263,6 +283,7 @@ Cloud agents can't start a program on your computer, so run the MCP server over
|
|
|
263
283
|
|
|
264
284
|
**How do I update?**
|
|
265
285
|
Run `telegram update`. It uses the same channel you installed from: Homebrew, npm or a release binary.
|
|
286
|
+
If you installed the agent skill with `telegram skill install`, run that again to refresh it.
|
|
266
287
|
|
|
267
288
|
## Development
|
|
268
289
|
|
package/README.ru.md
CHANGED
|
@@ -90,6 +90,7 @@ npm install -g better-tg-cli # Node >= 20
|
|
|
90
90
|
| Расширение Gemini CLI | скилл и MCP-сервер | `gemini extensions install https://github.com/TheVilfer/better-tg-cli` |
|
|
91
91
|
| Cursor, VS Code | MCP-сервер | [кнопки в один клик](#mcp-сервер) |
|
|
92
92
|
| Grok Bot | MCP-сервер по HTTP с вашего Mac | [см. ниже](#grok-bot-удалённый-mcp-по-http) |
|
|
93
|
+
| Сам CLI | скилл для Claude Code, Codex, Cursor, Gemini CLI и ещё 7 агентов | `telegram skill install` |
|
|
93
94
|
| [skills.sh](https://skills.sh) | скилл для любого агента с шеллом | `npx skills add TheVilfer/better-tg-cli` |
|
|
94
95
|
| [MCP Registry](https://registry.modelcontextprotocol.io/v0/servers?search=better-tg-cli) | запись MCP-сервера `io.github.TheVilfer/better-tg-cli` | через ваш MCP-клиент |
|
|
95
96
|
|
|
@@ -120,7 +121,18 @@ grok plugin marketplace add TheVilfer/better-tg-cli && grok plugin install bette
|
|
|
120
121
|
Скилл ([`skills/better-tg-cli`](skills/better-tg-cli/SKILL.md)) учит любого агента с шеллом
|
|
121
122
|
(Claude Code, Codex, Cursor, Gemini CLI, OpenCode и других) безопасно работать с CLI. Он проверяет
|
|
122
123
|
установку, никогда не входит сам, держит запись под вашим подтверждением и обходит действия, за
|
|
123
|
-
которые банят.
|
|
124
|
+
которые банят. Скилл лежит внутри CLI, и CLI ставит его сам, поэтому версии всегда совпадают:
|
|
125
|
+
|
|
126
|
+
```bash
|
|
127
|
+
telegram skill install # во все поддерживаемые агенты на этой машине
|
|
128
|
+
telegram skill install -a claude-code codex
|
|
129
|
+
telegram skill status # по каждому агенту: стоит, устарел, симлинк или нет
|
|
130
|
+
```
|
|
131
|
+
|
|
132
|
+
Поддерживаются Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Grok Build, OpenCode,
|
|
133
|
+
Goose, Droid, Windsurf и Pi (папки показывает `telegram skill status`). После `telegram update`
|
|
134
|
+
запустите команду ещё раз, чтобы обновить скилл. Папку-симлинк команда не трогает без `--force`.
|
|
135
|
+
Для остальных агентов есть CLI [skills](https://skills.sh):
|
|
124
136
|
|
|
125
137
|
```bash
|
|
126
138
|
npx skills add TheVilfer/better-tg-cli # агенты выбираются интерактивно
|
|
@@ -129,6 +141,12 @@ npx skills add TheVilfer/better-tg-cli -g -a claude-code -a codex -y
|
|
|
129
141
|
|
|
130
142
|
## Вход
|
|
131
143
|
|
|
144
|
+
**Через агента** (проще всего): попросите его подключить Telegram или запустите `telegram onboard`
|
|
145
|
+
сами. Откроется страница на 127.0.0.1: там вы получаете инвайт на [better-tg-cli.com](https://better-tg-cli.com)
|
|
146
|
+
(он сам возвращается на страницу) или вводите свои ключи, сканируете QR и вводите пароль 2FA. Агент
|
|
147
|
+
только запускает команду и ждёт: ни инвайт, ни QR, ни пароль он не видит. Страница отвечает только
|
|
148
|
+
по случайному секретному адресу и закрывается после входа.
|
|
149
|
+
|
|
132
150
|
**Со своими API-ключами** (основной способ):
|
|
133
151
|
1. Откройте https://my.telegram.org/apps, создайте приложение и скопируйте `api_id` и `api_hash`.
|
|
134
152
|
2. Запустите `telegram auth --qr` и введите их. Затем на телефоне откройте Настройки → Устройства →
|
|
@@ -136,7 +154,9 @@ npx skills add TheVilfer/better-tg-cli -g -a claude-code -a codex -y
|
|
|
136
154
|
Обычный `telegram auth` вместо QR спрашивает номер телефона и код. Если в светлой теме
|
|
137
155
|
терминала QR не сканируется, запустите с `TG_QR_INVERT=1`.
|
|
138
156
|
|
|
139
|
-
**По инвайту.**
|
|
157
|
+
**По инвайту.** С инвайт-токеном свои ключи не нужны. Получите его на
|
|
158
|
+
[better-tg-cli.com](https://better-tg-cli.com) (почта подтверждается кодом, там же гайд по установке)
|
|
159
|
+
или у мейнтейнера. Запустите
|
|
140
160
|
`telegram auth --invite --qr` и вставьте токен. Его также можно передать через `TG_INVITE=…` или
|
|
141
161
|
`--invite -`. Сервис инвайтов (`broker/`) выдаёт ключи приложения один раз, только для этого входа.
|
|
142
162
|
`api_hash` на вашей машине не сохраняется. Инвайты персональные, число входов по ним ограничено, и
|
|
@@ -248,7 +268,7 @@ tailscale funnel --bg 8787 # или: cloudflared tunnel --url h
|
|
|
248
268
|
Нет. `read`, `inbox` и `search` оставляют чаты непрочитанными. Отмечает только `telegram mark-read`.
|
|
249
269
|
|
|
250
270
|
**Нужны ли свои API-ключи?**
|
|
251
|
-
Да, с [my.telegram.org/apps](https://my.telegram.org/apps). Они бесплатные, их создание занимает минуту.
|
|
271
|
+
Да, с [my.telegram.org/apps](https://my.telegram.org/apps). Они бесплатные, их создание занимает минуту. С инвайтом с [better-tg-cli.com](https://better-tg-cli.com) `telegram auth --invite --qr` войдёт без своих ключей.
|
|
252
272
|
|
|
253
273
|
**Где хранится сессия и кто видит мои сообщения?**
|
|
254
274
|
Сессия лежит в Keychain macOS, в Secret Service на Linux или в 1Password. CLI общается с Telegram напрямую, аналитики нет. Кроме Telegram, он ходит только в npm (раз в день за номером версии) и в сервис инвайтов при входе. Подробнее в [PRIVACY.md](PRIVACY.md).
|
|
@@ -264,6 +284,7 @@ tailscale funnel --bg 8787 # или: cloudflared tunnel --url h
|
|
|
264
284
|
|
|
265
285
|
**Как обновиться?**
|
|
266
286
|
`telegram update`. Команда обновляет тем же способом, каким CLI был установлен: Homebrew, npm или бинарник из релиза.
|
|
287
|
+
Если скилл для агентов ставили через `telegram skill install`, запустите её ещё раз, чтобы обновить скилл.
|
|
267
288
|
|
|
268
289
|
## Разработка
|
|
269
290
|
|