better-tg-cli 0.18.0 → 0.20.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "better-tg-cli",
3
- "version": "0.18.0",
3
+ "version": "0.20.0",
4
4
  "description": "Unofficial agent-friendly Telegram client for the command line (MTProto, layer 229)",
5
5
  "type": "module",
6
6
  "main": "dist/telegram.mjs",
@@ -10,10 +10,15 @@
10
10
  "scripts": {
11
11
  "build": "node scripts/gen-version.mjs && tsc --noEmit && rm -rf dist && bun scripts/bundle.mjs node",
12
12
  "prepublishOnly": "npm run build",
13
+ "dev": "scripts/tg-dev",
14
+ "dev:node": "TG_PROFILE=${TG_PROFILE-dev} TG_NO_UPDATE_CHECK=1 tsx src/index.ts",
15
+ "dev:debug": "TG_PROFILE=${TG_PROFILE-dev} TG_NO_UPDATE_CHECK=1 tsx --inspect-brk src/index.ts",
16
+ "dev:dist": "npm run build && TG_PROFILE=${TG_PROFILE-dev} TG_NO_UPDATE_CHECK=1 node dist/telegram.mjs",
13
17
  "test": "vitest run",
14
18
  "test:watch": "vitest",
15
19
  "pretest": "node scripts/gen-version.mjs",
16
- "typecheck": "tsc --noEmit"
20
+ "typecheck": "tsc --noEmit",
21
+ "typecheck:watch": "tsc --noEmit --watch --preserveWatchOutput"
17
22
  },
18
23
  "keywords": [
19
24
  "telegram",
@@ -35,11 +40,13 @@
35
40
  "url": "https://github.com/TheVilfer/better-tg-cli/issues"
36
41
  },
37
42
  "devDependencies": {
38
- "@types/node": "^22.0.0",
43
+ "@types/node": "^26.6.2",
44
+ "@typescript/native": "npm:typescript@^7.0.2",
39
45
  "big-integer": "^1.6.52",
40
- "commander": "^14.0.0",
46
+ "commander": "^15.0.0",
41
47
  "teleproto": "^1.229.0",
42
- "typescript": "^5.7.0",
48
+ "tsx": "^4.23.15",
49
+ "typescript": "npm:@typescript/typescript6@^6.0.2",
43
50
  "vitest": "^5.0.2"
44
51
  },
45
52
  "engines": {
package/reference.md CHANGED
@@ -106,7 +106,12 @@ Buttons that need 2FA take `--password`. `--no-wait` skips waiting for the bot's
106
106
 
107
107
  `me` / `self` / `saved` / `Saved Messages` / `Избранное` → your Saved Messages. A numeric ID must
108
108
  exactly match a dialog ID (the `id` from `chats`). `@username` resolves exactly. Anything else
109
- matches titles: exact first, then substring. For writes, prefer an ID or @username.
109
+ matches titles.
110
+
111
+ - **Reads:** an exact title first, then a substring.
112
+ - **Writes** (every command gated by write access) accept only an exact, unique title. A substring
113
+ or a title shared by several chats is refused with up to 5 candidates (`id type title @username`).
114
+ Retry with the ID.
110
115
 
111
116
  ## Troubleshooting
112
117