better-tg-cli 0.26.0 → 0.28.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 CHANGED
@@ -66,9 +66,18 @@ A fork of [skillhq/telegram](https://github.com/skillhq/telegram), reworked for
66
66
 
67
67
  ```bash
68
68
  brew install thevilfer/tap/better-tg-cli # standalone binary, macOS and Linux
69
- npm install -g better-tg-cli # Node >= 20
69
+ npm install -g better-tg-cli # Node >= 20, any OS
70
70
  ```
71
71
 
72
+ On Windows (experimental), with [Scoop](https://scoop.sh) or npm:
73
+
74
+ ```powershell
75
+ scoop bucket add thevilfer https://github.com/TheVilfer/scoop-bucket
76
+ scoop install better-tg-cli
77
+ ```
78
+
79
+ The Windows `telegram.exe` is not code-signed, so SmartScreen may warn about the release download.
80
+
72
81
  `telegram update` upgrades an existing install, whichever of these you used. On a terminal the CLI
73
82
  checks for new versions once a day. Agents and pipes never see that notice, and
74
83
  `TG_NO_UPDATE_CHECK=1` turns it off.
@@ -84,6 +93,7 @@ Every channel ships the same version from one release:
84
93
  |---|---|---|
85
94
  | [Homebrew](https://github.com/TheVilfer/homebrew-tap) | standalone binary | `brew install thevilfer/tap/better-tg-cli` |
86
95
  | [npm](https://www.npmjs.com/package/better-tg-cli) | CLI and MCP server (Node 20+) | `npm install -g better-tg-cli` |
96
+ | [Scoop](https://github.com/TheVilfer/scoop-bucket) (Windows, experimental) | standalone `telegram.exe` | `scoop bucket add thevilfer https://github.com/TheVilfer/scoop-bucket` then `scoop install better-tg-cli` |
87
97
  | [GitHub Releases](https://github.com/TheVilfer/better-tg-cli/releases) | binaries and SHA256SUMS | download by hand |
88
98
  | Claude Code plugin | skill and MCP server | [see below](#claude-code-plugin) |
89
99
  | Claude Desktop extension | MCP server, runs on Claude's built-in Node | [download `.mcpb`](https://github.com/TheVilfer/better-tg-cli/releases/latest/download/better-tg-cli.mcpb) and open it |
@@ -142,6 +152,12 @@ npx skills add TheVilfer/better-tg-cli -g -a claude-code -a codex -y
142
152
 
143
153
  ## Log in
144
154
 
155
+ **Through your agent** (easiest): ask it to set up Telegram, or run `telegram onboard` yourself. It
156
+ opens a page on 127.0.0.1 where you get an invite from [better-tg-cli.com](https://better-tg-cli.com)
157
+ (it comes back to the page by itself) or enter your own keys, scan a QR code and type your 2FA
158
+ password. The agent only starts the command and waits: it never sees the invite, the QR code or the
159
+ password. The page answers only on a random secret path and closes when you're done.
160
+
145
161
  **With your own API keys** (the default):
146
162
  1. Open https://my.telegram.org/apps, create an application, and copy its `api_id` and `api_hash`.
147
163
  2. Run `telegram auth --qr` and enter them. Then, on your phone, go to Settings → Devices → Link
@@ -161,7 +177,9 @@ The session is stored in the macOS Keychain (service `tg-cli`), or in 1Password
161
177
  Keyring, KWallet, KeePassXC) through `secret-tool`, which needs the `libsecret-tools` package. A
162
178
  session already saved in the config file moves there automatically. Without any secret store, the
163
179
  session is kept in `~/.config/tg/config.json5` (mode 0600) and write commands stay disabled.
164
- On Linux, `write-access on` is confirmed at a terminal prompt.
180
+ On Linux, `write-access on` is confirmed at a terminal prompt. On Windows the secrets live in
181
+ `%APPDATA%\tg\secrets.dpapi`, encrypted with DPAPI for your Windows user (only you on this machine
182
+ can decrypt it), and `write-access on` asks in a Yes/No window when there's no terminal.
165
183
 
166
184
  ## Usage
167
185
 
@@ -270,7 +288,9 @@ The session is in the macOS Keychain, the Linux Secret Service or 1Password. The
270
288
  Yes, with `TG_PROFILE`: each profile has its own login, config and Keychain items, for example `TG_PROFILE=work telegram auth --qr`. Switching accounts properly is tracked in [#5](https://github.com/TheVilfer/better-tg-cli/issues/5).
271
289
 
272
290
  **Does it work on Windows?**
273
- Not yet. It is built and tested on macOS and Linux, and relies on their secret stores.
291
+ Yes, experimentally: `scoop install better-tg-cli` or npm. Secrets are stored with Windows DPAPI
292
+ and CI runs the tests on Windows, but live use there is less tested than on macOS and Linux. Please
293
+ report problems in the issues.
274
294
 
275
295
  **Can I use it from Grok Bot, ChatGPT or another cloud agent?**
276
296
  Cloud agents can't start a program on your computer, so run the MCP server over HTTP and reach it through a tunnel. See [Grok Bot](#grok-bot-remote-mcp-over-http).
package/README.ru.md CHANGED
@@ -65,9 +65,18 @@ $ telegram inbox -n 3
65
65
 
66
66
  ```bash
67
67
  brew install thevilfer/tap/better-tg-cli # отдельный бинарник, macOS и Linux
68
- npm install -g better-tg-cli # Node >= 20
68
+ npm install -g better-tg-cli # Node >= 20, любая ОС
69
69
  ```
70
70
 
71
+ На Windows (экспериментально) через [Scoop](https://scoop.sh) или npm:
72
+
73
+ ```powershell
74
+ scoop bucket add thevilfer https://github.com/TheVilfer/scoop-bucket
75
+ scoop install better-tg-cli
76
+ ```
77
+
78
+ `telegram.exe` для Windows не подписан, поэтому SmartScreen может предупредить при скачивании из релиза.
79
+
71
80
  `telegram update` обновляет CLI тем же способом, каким он был установлен. В терминале CLI раз в
72
81
  сутки проверяет, не вышла ли новая версия. Агенты и пайпы этого уведомления не видят, а
73
82
  `TG_NO_UPDATE_CHECK=1` отключает его совсем.
@@ -83,6 +92,7 @@ npm install -g better-tg-cli # Node >= 20
83
92
  |---|---|---|
84
93
  | [Homebrew](https://github.com/TheVilfer/homebrew-tap) | отдельный бинарник | `brew install thevilfer/tap/better-tg-cli` |
85
94
  | [npm](https://www.npmjs.com/package/better-tg-cli) | CLI и MCP-сервер (Node 20+) | `npm install -g better-tg-cli` |
95
+ | [Scoop](https://github.com/TheVilfer/scoop-bucket) (Windows, экспериментально) | отдельный `telegram.exe` | `scoop bucket add thevilfer https://github.com/TheVilfer/scoop-bucket`, затем `scoop install better-tg-cli` |
86
96
  | [GitHub Releases](https://github.com/TheVilfer/better-tg-cli/releases) | бинарники и SHA256SUMS | скачать вручную |
87
97
  | Плагин Claude Code | скилл и MCP-сервер | [см. ниже](#плагин-для-claude-code) |
88
98
  | Расширение Claude Desktop | MCP-сервер на встроенном Node из Claude | [скачать `.mcpb`](https://github.com/TheVilfer/better-tg-cli/releases/latest/download/better-tg-cli.mcpb) и открыть |
@@ -141,6 +151,12 @@ npx skills add TheVilfer/better-tg-cli -g -a claude-code -a codex -y
141
151
 
142
152
  ## Вход
143
153
 
154
+ **Через агента** (проще всего): попросите его подключить Telegram или запустите `telegram onboard`
155
+ сами. Откроется страница на 127.0.0.1: там вы получаете инвайт на [better-tg-cli.com](https://better-tg-cli.com)
156
+ (он сам возвращается на страницу) или вводите свои ключи, сканируете QR и вводите пароль 2FA. Агент
157
+ только запускает команду и ждёт: ни инвайт, ни QR, ни пароль он не видит. Страница отвечает только
158
+ по случайному секретному адресу и закрывается после входа.
159
+
144
160
  **Со своими API-ключами** (основной способ):
145
161
  1. Откройте https://my.telegram.org/apps, создайте приложение и скопируйте `api_id` и `api_hash`.
146
162
  2. Запустите `telegram auth --qr` и введите их. Затем на телефоне откройте Настройки → Устройства →
@@ -161,7 +177,9 @@ npx skills add TheVilfer/better-tg-cli -g -a claude-code -a codex -y
161
177
  KeePassXC) через `secret-tool`, для этого нужен пакет `libsecret-tools`. Сессия, которая уже лежит
162
178
  в конфиге, переедет туда сама. Если хранилища секретов нет, сессия лежит в
163
179
  `~/.config/tg/config.json5` (права 0600), а запись остаётся выключенной. На Linux
164
- `write-access on` подтверждается в терминале.
180
+ `write-access on` подтверждается в терминале. На Windows секреты лежат в
181
+ `%APPDATA%\tg\secrets.dpapi`, зашифрованные DPAPI для вашего пользователя Windows (расшифровать их
182
+ можете только вы на этой машине), а `write-access on` без терминала спрашивает в окне «Да/Нет».
165
183
 
166
184
  ## Использование
167
185
 
@@ -271,7 +289,9 @@ tailscale funnel --bg 8787 # или: cloudflared tunnel --url h
271
289
  Да, через `TG_PROFILE`: у каждого профиля свой вход, конфиг и записи в Keychain, например `TG_PROFILE=work telegram auth --qr`. Удобное переключение аккаунтов — в [#5](https://github.com/TheVilfer/better-tg-cli/issues/5).
272
290
 
273
291
  **Работает ли на Windows?**
274
- Пока нет. CLI собирается и проверяется на macOS и Linux и опирается на их хранилища секретов.
292
+ Да, экспериментально: `scoop install better-tg-cli` или npm. Секреты хранятся через Windows DPAPI,
293
+ тесты гоняются на Windows в CI, но вживую там проверено меньше, чем на macOS и Linux. О проблемах
294
+ пишите в issues.
275
295
 
276
296
  **Можно ли пользоваться из Grok Bot, ChatGPT или другого облачного агента?**
277
297
  Облачный агент не может запустить программу на вашем компьютере, поэтому поднимите MCP-сервер по HTTP и откройте к нему туннель. См. [Grok Bot](#grok-bot-удалённый-mcp-по-http).