@avemeva/agent-telegram 0.1.11 → 0.1.12

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.
Files changed (2) hide show
  1. package/README.md +160 -0
  2. package/package.json +11 -9
package/README.md ADDED
@@ -0,0 +1,160 @@
1
+ # agent-telegram
2
+
3
+ Telegram CLI for AI agents. Read messages, send messages, search, download media, manage chats — all from the terminal. JSON output, designed for automation.
4
+
5
+ ## Installation
6
+
7
+ ### npm (all platforms)
8
+
9
+ ```bash
10
+ npm install -g @avemeva/agent-telegram
11
+ ```
12
+
13
+ ### Homebrew (macOS)
14
+
15
+ ```bash
16
+ brew install avemeva/tap/agent-telegram
17
+ ```
18
+
19
+ ### curl (macOS/Linux)
20
+
21
+ ```bash
22
+ curl -fsSL https://raw.githubusercontent.com/avemeva/kurier/main/install | bash
23
+ ```
24
+
25
+ ### Verify
26
+
27
+ ```bash
28
+ agent-telegram --version
29
+ agent-telegram doctor
30
+ ```
31
+
32
+ ## Authentication
33
+
34
+ agent-telegram connects to your **real Telegram account** — it reads and sends actual messages, not a sandbox. Authenticate before first use:
35
+
36
+ ```bash
37
+ agent-telegram auth phone +1234567890 # Your phone number
38
+ agent-telegram auth code 12345 # Code from Telegram
39
+ agent-telegram auth password <pass> # 2FA password (if enabled)
40
+ agent-telegram me # Verify connection
41
+ ```
42
+
43
+
44
+ ## How It Works
45
+
46
+ A background daemon manages the TDLib connection and auto-starts on first command. TDLib caches your chats, messages, and user data locally, so most reads are instant (~0.2s) without hitting Telegram's servers. The daemon shuts down after 10 minutes of inactivity.
47
+
48
+ ## Quick Start
49
+
50
+ ```bash
51
+ agent-telegram me # Current user info
52
+ agent-telegram chats list --limit 10 # Recent chats
53
+ agent-telegram msg list @username --limit 5 # Message history
54
+ agent-telegram action send @username "hello" # Send a message
55
+ agent-telegram msg search "keyword" # Search across all chats
56
+ ```
57
+
58
+ ## Commands
59
+
60
+ ### Identity
61
+
62
+ ```bash
63
+ agent-telegram me # Current user info
64
+ agent-telegram info <id|username|phone|link> # Detailed entity info
65
+ ```
66
+
67
+ ### Chats
68
+
69
+ ```bash
70
+ agent-telegram chats list [--limit N] [--unread] [--type user|group|channel]
71
+ agent-telegram chats search "query" [--type chat|bot|group|channel] [--global]
72
+ agent-telegram chats members <chat> [--limit N] [--type bot|admin|recent]
73
+ ```
74
+
75
+ ### Messages
76
+
77
+ ```bash
78
+ agent-telegram msg list <chat> [--limit N] [--filter photo|video|document|voice]
79
+ agent-telegram msg get <chat> <msgId>
80
+ agent-telegram msg search "query" [--chat <id>] [--type private|group|channel]
81
+ ```
82
+
83
+ ### Actions
84
+
85
+ ```bash
86
+ agent-telegram action send <chat> "text" [--html] [--md] [--reply-to N] [--silent]
87
+ agent-telegram action edit <chat> <msgId> "text" [--html]
88
+ agent-telegram action delete <chat> <msgId...> [--revoke]
89
+ agent-telegram action forward <from> <to> <msgId...>
90
+ agent-telegram action pin <chat> <msgId>
91
+ agent-telegram action react <chat> <msgId> <emoji>
92
+ agent-telegram action click <chat> <msgId> <button>
93
+ ```
94
+
95
+ ### Media
96
+
97
+ ```bash
98
+ agent-telegram media download <chat> <msgId> [--output path]
99
+ agent-telegram media transcribe <chat> <msgId>
100
+ ```
101
+
102
+ ### Real-time Streaming
103
+
104
+ ```bash
105
+ agent-telegram listen --type user # Stream events as NDJSON
106
+ agent-telegram listen --chat 12345 # Stream specific chat
107
+ ```
108
+
109
+ ### Daemon
110
+
111
+ ```bash
112
+ agent-telegram daemon start | stop | status | log
113
+ ```
114
+
115
+ ### Auth
116
+
117
+ ```bash
118
+ agent-telegram auth # Check auth state
119
+ agent-telegram auth phone <number> # Submit phone number
120
+ agent-telegram auth code <code> # Submit verification code
121
+ agent-telegram auth password <password> # Submit 2FA password
122
+ ```
123
+
124
+ ### Advanced
125
+
126
+ ```bash
127
+ agent-telegram eval '<javascript>' # Run JS with connected TDLib client
128
+ agent-telegram doctor # Verify installation health
129
+ ```
130
+
131
+ ## Entity Arguments
132
+
133
+ All commands accepting `<chat>` support:
134
+ - Numeric ID: `12345678`, `-1001234567890`
135
+ - Username: `@username` or `username`
136
+ - Phone: `+1234567890`
137
+ - Link: `t.me/username`
138
+ - Special: `me` or `self`
139
+
140
+ ## Output
141
+
142
+ All output is JSON to stdout. Errors and warnings go to stderr. Pipe through `jq` for processing:
143
+
144
+ ```bash
145
+ agent-telegram chats list --unread | jq '.[].title'
146
+ agent-telegram msg search "meeting" | jq '.messages[].content'
147
+ ```
148
+
149
+ ## Pagination
150
+
151
+ List commands return `hasMore` and `nextOffset`. Pass the offset back to paginate:
152
+
153
+ ```bash
154
+ agent-telegram msg list <chat> --limit 50
155
+ agent-telegram msg list <chat> --limit 50 --offset-id <nextOffset>
156
+ ```
157
+
158
+ ## License
159
+
160
+ MIT
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@avemeva/agent-telegram",
3
- "version": "0.1.11",
4
- "description": "AI-powered Telegram CLI",
3
+ "version": "0.1.12",
4
+ "description": "Telegram CLI for AI agents",
5
5
  "bin": {
6
6
  "agent-telegram": "./bin/agent-telegram.js"
7
7
  },
@@ -9,15 +9,17 @@
9
9
  "postinstall": "node ./postinstall.mjs"
10
10
  },
11
11
  "optionalDependencies": {
12
- "@avemeva/agent-telegram-win32-x64": "0.1.11",
13
- "@avemeva/agent-telegram-darwin-x64": "0.1.11",
14
- "@avemeva/agent-telegram-linux-arm64": "0.1.11",
15
- "@avemeva/agent-telegram-darwin-arm64": "0.1.11",
16
- "@avemeva/agent-telegram-linux-x64": "0.1.11"
12
+ "@avemeva/agent-telegram-win32-x64": "0.1.12",
13
+ "@avemeva/agent-telegram-darwin-x64": "0.1.12",
14
+ "@avemeva/agent-telegram-linux-arm64": "0.1.12",
15
+ "@avemeva/agent-telegram-darwin-arm64": "0.1.12",
16
+ "@avemeva/agent-telegram-linux-x64": "0.1.12"
17
17
  },
18
18
  "license": "MIT",
19
19
  "repository": {
20
20
  "type": "git",
21
- "url": "https://github.com/avemeva/kurier"
22
- }
21
+ "url": "https://github.com/avemeva/kurier",
22
+ "directory": "apps/cli"
23
+ },
24
+ "homepage": "https://github.com/avemeva/kurier/tree/main/apps/cli#readme"
23
25
  }