better-tg-cli 0.22.2 → 0.23.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
@@ -15,7 +15,7 @@
15
15
  [![license](https://img.shields.io/badge/license-MIT-000000?style=flat&colorA=000000&colorB=000000)](LICENSE)
16
16
 
17
17
  <p>
18
- <a href="#install">Install</a> · <a href="reference.md">Reference</a> · <a href="SECURITY.md">Security</a> · <a href="https://github.com/TheVilfer/better-tg-cli/issues">Issues</a> · <a href="README.ru.md">Русский</a>
18
+ <a href="#install">Install</a> · <a href="skills/better-tg-cli/reference.md">Reference</a> · <a href="SECURITY.md">Security</a> · <a href="https://github.com/TheVilfer/better-tg-cli/issues">Issues</a> · <a href="README.ru.md">Русский</a>
19
19
  </p>
20
20
  </div>
21
21
 
@@ -76,13 +76,28 @@ quarantine flag once: `xattr -d com.apple.quarantine ./telegram`. Homebrew handl
76
76
 
77
77
  Do **not** install `@skillhq/telegram`. It is the old upstream build on GramJS (layer 198).
78
78
 
79
+ ### Claude Code plugin
80
+
81
+ The skill and the MCP server together, in one install:
82
+
83
+ ```
84
+ /plugin marketplace add TheVilfer/better-tg-cli
85
+ /plugin install better-tg-cli@better-tg-cli
86
+ ```
87
+
88
+ It runs the MCP server through `npx`, so Node 20+ is enough. Log in once with `telegram auth --qr`
89
+ (or `npx better-tg-cli auth --qr`) in a terminal.
90
+
79
91
  ### As an agent skill
80
92
 
81
- The repo itself is the skill (`SKILL.md` + `reference.md`):
93
+ The skill ([`skills/better-tg-cli`](skills/better-tg-cli/SKILL.md)) teaches any agent with a shell
94
+ (Claude Code, Codex, Cursor, Gemini CLI, OpenCode and others) to use the CLI safely. It checks the
95
+ setup, never logs in on its own, keeps writes behind your approval, and avoids ban-prone patterns.
96
+ Install it with the [skills](https://skills.sh) CLI:
82
97
 
83
98
  ```bash
84
- git clone https://github.com/TheVilfer/better-tg-cli.git ~/.agents/skills/telegram
85
- ln -s ~/.agents/skills/telegram ~/.claude/skills/telegram
99
+ npx skills add TheVilfer/better-tg-cli # pick agents interactively
100
+ npx skills add TheVilfer/better-tg-cli -g -a claude-code -a codex -y
86
101
  ```
87
102
 
88
103
  ## Log in
@@ -124,7 +139,7 @@ telegram click @SomeBot 4410 "Settings" # press an inline button
124
139
  ```
125
140
 
126
141
  Read commands take `--json`, and some also take `--markdown`. See all commands with
127
- `telegram help-all`. [reference.md](reference.md) covers the behaviour that the flag list can't
142
+ `telegram help-all`. [reference.md](skills/better-tg-cli/reference.md) covers the behaviour that the flag list can't
128
143
  explain: output shapes, threads, bot buttons, admin commands and troubleshooting.
129
144
 
130
145
  ## MCP server
@@ -138,14 +153,15 @@ tools over stdio:
138
153
  Log in with `telegram auth` in a terminal first.
139
154
 
140
155
  ```bash
141
- claude mcp add telegram -- telegram mcp # Claude Code
156
+ claude mcp add telegram -- telegram mcp # Claude Code (or use the plugin above)
142
157
  ```
143
158
 
144
159
  ```json
145
160
  { "mcpServers": { "telegram": { "command": "/opt/homebrew/bin/telegram", "args": ["mcp"] } } }
146
161
  ```
147
162
 
148
- Use the second form for Claude Desktop (`claude_desktop_config.json`) or Cursor (`.cursor/mcp.json`).
163
+ The server is also listed in the [MCP Registry](https://registry.modelcontextprotocol.io) as
164
+ `io.github.TheVilfer/better-tg-cli`. Use the second form for Claude Desktop (`claude_desktop_config.json`) or Cursor (`.cursor/mcp.json`).
149
165
  GUI apps may not see your shell PATH, so give the full path from `which telegram`. To keep the MCP
150
166
  client off your main session, add `"env": {"TG_PROFILE": "work"}`.
151
167
 
package/README.ru.md CHANGED
@@ -15,7 +15,7 @@
15
15
  [![license](https://img.shields.io/badge/license-MIT-000000?style=flat&colorA=000000&colorB=000000)](LICENSE)
16
16
 
17
17
  <p>
18
- <a href="#установка">Установка</a> · <a href="reference.md">Справка</a> · <a href="SECURITY.md">Безопасность</a> · <a href="https://github.com/TheVilfer/better-tg-cli/issues">Issues</a> · <a href="README.md">English</a>
18
+ <a href="#установка">Установка</a> · <a href="skills/better-tg-cli/reference.md">Справка</a> · <a href="SECURITY.md">Безопасность</a> · <a href="https://github.com/TheVilfer/better-tg-cli/issues">Issues</a> · <a href="README.md">English</a>
19
19
  </p>
20
20
  </div>
21
21
 
@@ -75,13 +75,28 @@ npm install -g better-tg-cli # Node >= 20
75
75
 
76
76
  Не ставьте `@skillhq/telegram`. Это старая сборка апстрима на GramJS (layer 198).
77
77
 
78
+ ### Плагин для Claude Code
79
+
80
+ Скилл и MCP-сервер ставятся вместе:
81
+
82
+ ```
83
+ /plugin marketplace add TheVilfer/better-tg-cli
84
+ /plugin install better-tg-cli@better-tg-cli
85
+ ```
86
+
87
+ MCP-сервер запускается через `npx`, так что хватит Node 20+. Один раз войдите в терминале:
88
+ `telegram auth --qr` (или `npx better-tg-cli auth --qr`).
89
+
78
90
  ### Как скилл для агента
79
91
 
80
- Сам репозиторий и есть скилл (`SKILL.md` + `reference.md`):
92
+ Скилл ([`skills/better-tg-cli`](skills/better-tg-cli/SKILL.md)) учит любого агента с шеллом
93
+ (Claude Code, Codex, Cursor, Gemini CLI, OpenCode и других) безопасно работать с CLI. Он проверяет
94
+ установку, никогда не входит сам, держит запись под вашим подтверждением и обходит действия, за
95
+ которые банят. Ставится через CLI [skills](https://skills.sh):
81
96
 
82
97
  ```bash
83
- git clone https://github.com/TheVilfer/better-tg-cli.git ~/.agents/skills/telegram
84
- ln -s ~/.agents/skills/telegram ~/.claude/skills/telegram
98
+ npx skills add TheVilfer/better-tg-cli # агенты выбираются интерактивно
99
+ npx skills add TheVilfer/better-tg-cli -g -a claude-code -a codex -y
85
100
  ```
86
101
 
87
102
  ## Вход
@@ -124,7 +139,7 @@ telegram click @SomeBot 4410 "Настройки" # нажать инлай
124
139
  ```
125
140
 
126
141
  Команды чтения принимают `--json`, а некоторые и `--markdown`. Все команды выводит
127
- `telegram help-all`. В [reference.md](reference.md) описано то, чего не видно по списку флагов:
142
+ `telegram help-all`. В [reference.md](skills/better-tg-cli/reference.md) описано то, чего не видно по списку флагов:
128
143
  форматы вывода, треды, кнопки ботов, админские команды, решение проблем.
129
144
 
130
145
  ## MCP-сервер
@@ -138,14 +153,15 @@ stdio три инструмента:
138
153
  Сначала войдите через `telegram auth` в терминале.
139
154
 
140
155
  ```bash
141
- claude mcp add telegram -- telegram mcp # Claude Code
156
+ claude mcp add telegram -- telegram mcp # Claude Code (или плагин выше)
142
157
  ```
143
158
 
144
159
  ```json
145
160
  { "mcpServers": { "telegram": { "command": "/opt/homebrew/bin/telegram", "args": ["mcp"] } } }
146
161
  ```
147
162
 
148
- Второй вариант подходит для Claude Desktop (`claude_desktop_config.json`) и Cursor
163
+ Сервер также есть в [MCP Registry](https://registry.modelcontextprotocol.io) под именем
164
+ `io.github.TheVilfer/better-tg-cli`. Второй вариант подходит для Claude Desktop (`claude_desktop_config.json`) и Cursor
149
165
  (`.cursor/mcp.json`). GUI-приложения могут не видеть ваш PATH, поэтому укажите полный путь из
150
166
  `which telegram`. Чтобы MCP-клиент не трогал основную сессию, добавьте
151
167
  `"env": {"TG_PROFILE": "work"}`.