twitter-cli 0.4.4__tar.gz → 0.4.5__tar.gz
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.
- {twitter_cli-0.4.4 → twitter_cli-0.4.5}/PKG-INFO +13 -3
- {twitter_cli-0.4.4 → twitter_cli-0.4.5}/README.md +12 -2
- {twitter_cli-0.4.4 → twitter_cli-0.4.5}/SKILL.md +9 -1
- {twitter_cli-0.4.4 → twitter_cli-0.4.5}/pyproject.toml +1 -1
- {twitter_cli-0.4.4 → twitter_cli-0.4.5}/twitter_cli/cli.py +2 -2
- {twitter_cli-0.4.4 → twitter_cli-0.4.5}/uv.lock +1 -1
- {twitter_cli-0.4.4 → twitter_cli-0.4.5}/.github/workflows/ci.yml +0 -0
- {twitter_cli-0.4.4 → twitter_cli-0.4.5}/.github/workflows/publish-clawhub.yml +0 -0
- {twitter_cli-0.4.4 → twitter_cli-0.4.5}/.github/workflows/publish.yml +0 -0
- {twitter_cli-0.4.4 → twitter_cli-0.4.5}/.gitignore +0 -0
- {twitter_cli-0.4.4 → twitter_cli-0.4.5}/LICENSE +0 -0
- {twitter_cli-0.4.4 → twitter_cli-0.4.5}/config.yaml +0 -0
- {twitter_cli-0.4.4 → twitter_cli-0.4.5}/tests/conftest.py +0 -0
- {twitter_cli-0.4.4 → twitter_cli-0.4.5}/tests/test_cli.py +0 -0
- {twitter_cli-0.4.4 → twitter_cli-0.4.5}/tests/test_client.py +0 -0
- {twitter_cli-0.4.4 → twitter_cli-0.4.5}/tests/test_config.py +0 -0
- {twitter_cli-0.4.4 → twitter_cli-0.4.5}/tests/test_config_normalization.py +0 -0
- {twitter_cli-0.4.4 → twitter_cli-0.4.5}/tests/test_filter.py +0 -0
- {twitter_cli-0.4.4 → twitter_cli-0.4.5}/tests/test_serialization.py +0 -0
- {twitter_cli-0.4.4 → twitter_cli-0.4.5}/twitter_cli/__init__.py +0 -0
- {twitter_cli-0.4.4 → twitter_cli-0.4.5}/twitter_cli/auth.py +0 -0
- {twitter_cli-0.4.4 → twitter_cli-0.4.5}/twitter_cli/client.py +0 -0
- {twitter_cli-0.4.4 → twitter_cli-0.4.5}/twitter_cli/config.py +0 -0
- {twitter_cli-0.4.4 → twitter_cli-0.4.5}/twitter_cli/constants.py +0 -0
- {twitter_cli-0.4.4 → twitter_cli-0.4.5}/twitter_cli/filter.py +0 -0
- {twitter_cli-0.4.4 → twitter_cli-0.4.5}/twitter_cli/formatter.py +0 -0
- {twitter_cli-0.4.4 → twitter_cli-0.4.5}/twitter_cli/models.py +0 -0
- {twitter_cli-0.4.4 → twitter_cli-0.4.5}/twitter_cli/serialization.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: twitter-cli
|
|
3
|
-
Version: 0.4.
|
|
3
|
+
Version: 0.4.5
|
|
4
4
|
Summary: A CLI for Twitter/X — feed, bookmarks, and user timeline in terminal
|
|
5
5
|
Project-URL: Homepage, https://github.com/jackwener/twitter-cli
|
|
6
6
|
Project-URL: Repository, https://github.com/jackwener/twitter-cli
|
|
@@ -73,9 +73,10 @@ A terminal-first CLI for Twitter/X: read timelines, bookmarks, and user profiles
|
|
|
73
73
|
**Auth & Anti-Detection:**
|
|
74
74
|
- Cookie auth: use browser cookies or environment variables
|
|
75
75
|
- Full cookie forwarding: extracts ALL browser cookies for true browser fingerprint
|
|
76
|
-
- TLS fingerprint impersonation: `curl_cffi` with Chrome
|
|
76
|
+
- TLS fingerprint impersonation: `curl_cffi` with dynamic Chrome version matching
|
|
77
77
|
- `x-client-transaction-id` header generation
|
|
78
78
|
- Request timing jitter to avoid pattern detection
|
|
79
|
+
- Write operation delays (1.5–4s random) to mitigate rate limits
|
|
79
80
|
- Proxy support via `TWITTER_PROXY` environment variable
|
|
80
81
|
|
|
81
82
|
### Installation
|
|
@@ -125,6 +126,8 @@ twitter favorites --max 30 --json
|
|
|
125
126
|
twitter search "Claude Code"
|
|
126
127
|
twitter search "AI agent" -t Latest --max 50
|
|
127
128
|
twitter search "机器学习" --json
|
|
129
|
+
twitter search "topic" -o results.json # Save to file
|
|
130
|
+
twitter search "trending" --filter # Apply ranking filter
|
|
128
131
|
|
|
129
132
|
# Tweet detail (view tweet + replies)
|
|
130
133
|
twitter tweet 1234567890
|
|
@@ -136,7 +139,9 @@ twitter list 1539453138322673664
|
|
|
136
139
|
# User
|
|
137
140
|
twitter user elonmusk
|
|
138
141
|
twitter user-posts elonmusk --max 20
|
|
142
|
+
twitter user-posts elonmusk -o tweets.json
|
|
139
143
|
twitter likes elonmusk --max 30
|
|
144
|
+
twitter likes elonmusk -o likes.json
|
|
140
145
|
twitter followers elonmusk --max 50
|
|
141
146
|
twitter following elonmusk --max 50
|
|
142
147
|
|
|
@@ -326,9 +331,10 @@ After installation, OpenClaw can call `twitter-cli` commands directly.
|
|
|
326
331
|
**认证与反风控:**
|
|
327
332
|
- Cookie 认证:支持环境变量和浏览器自动提取
|
|
328
333
|
- 完整 Cookie 转发:提取浏览器中所有 Twitter Cookie
|
|
329
|
-
- TLS 指纹伪装:`curl_cffi` Chrome
|
|
334
|
+
- TLS 指纹伪装:`curl_cffi` 动态匹配 Chrome 版本
|
|
330
335
|
- `x-client-transaction-id` 请求头生成
|
|
331
336
|
- 请求时序随机化(jitter)
|
|
337
|
+
- 写操作随机延迟(1.5–4 秒),降低频率风控
|
|
332
338
|
- 代理支持:`TWITTER_PROXY` 环境变量
|
|
333
339
|
|
|
334
340
|
### 安装
|
|
@@ -352,6 +358,8 @@ twitter favorites
|
|
|
352
358
|
# 搜索
|
|
353
359
|
twitter search "Claude Code"
|
|
354
360
|
twitter search "AI agent" -t Latest --max 50
|
|
361
|
+
twitter search "topic" -o results.json # 保存到文件
|
|
362
|
+
twitter search "trending" --filter # 启用排序筛选
|
|
355
363
|
|
|
356
364
|
# 推文详情
|
|
357
365
|
twitter tweet 1234567890
|
|
@@ -362,7 +370,9 @@ twitter list 1539453138322673664
|
|
|
362
370
|
# 用户
|
|
363
371
|
twitter user elonmusk
|
|
364
372
|
twitter user-posts elonmusk --max 20
|
|
373
|
+
twitter user-posts elonmusk -o tweets.json
|
|
365
374
|
twitter likes elonmusk --max 30
|
|
375
|
+
twitter likes elonmusk -o likes.json
|
|
366
376
|
twitter followers elonmusk
|
|
367
377
|
twitter following elonmusk
|
|
368
378
|
|
|
@@ -37,9 +37,10 @@ A terminal-first CLI for Twitter/X: read timelines, bookmarks, and user profiles
|
|
|
37
37
|
**Auth & Anti-Detection:**
|
|
38
38
|
- Cookie auth: use browser cookies or environment variables
|
|
39
39
|
- Full cookie forwarding: extracts ALL browser cookies for true browser fingerprint
|
|
40
|
-
- TLS fingerprint impersonation: `curl_cffi` with Chrome
|
|
40
|
+
- TLS fingerprint impersonation: `curl_cffi` with dynamic Chrome version matching
|
|
41
41
|
- `x-client-transaction-id` header generation
|
|
42
42
|
- Request timing jitter to avoid pattern detection
|
|
43
|
+
- Write operation delays (1.5–4s random) to mitigate rate limits
|
|
43
44
|
- Proxy support via `TWITTER_PROXY` environment variable
|
|
44
45
|
|
|
45
46
|
### Installation
|
|
@@ -89,6 +90,8 @@ twitter favorites --max 30 --json
|
|
|
89
90
|
twitter search "Claude Code"
|
|
90
91
|
twitter search "AI agent" -t Latest --max 50
|
|
91
92
|
twitter search "机器学习" --json
|
|
93
|
+
twitter search "topic" -o results.json # Save to file
|
|
94
|
+
twitter search "trending" --filter # Apply ranking filter
|
|
92
95
|
|
|
93
96
|
# Tweet detail (view tweet + replies)
|
|
94
97
|
twitter tweet 1234567890
|
|
@@ -100,7 +103,9 @@ twitter list 1539453138322673664
|
|
|
100
103
|
# User
|
|
101
104
|
twitter user elonmusk
|
|
102
105
|
twitter user-posts elonmusk --max 20
|
|
106
|
+
twitter user-posts elonmusk -o tweets.json
|
|
103
107
|
twitter likes elonmusk --max 30
|
|
108
|
+
twitter likes elonmusk -o likes.json
|
|
104
109
|
twitter followers elonmusk --max 50
|
|
105
110
|
twitter following elonmusk --max 50
|
|
106
111
|
|
|
@@ -290,9 +295,10 @@ After installation, OpenClaw can call `twitter-cli` commands directly.
|
|
|
290
295
|
**认证与反风控:**
|
|
291
296
|
- Cookie 认证:支持环境变量和浏览器自动提取
|
|
292
297
|
- 完整 Cookie 转发:提取浏览器中所有 Twitter Cookie
|
|
293
|
-
- TLS 指纹伪装:`curl_cffi` Chrome
|
|
298
|
+
- TLS 指纹伪装:`curl_cffi` 动态匹配 Chrome 版本
|
|
294
299
|
- `x-client-transaction-id` 请求头生成
|
|
295
300
|
- 请求时序随机化(jitter)
|
|
301
|
+
- 写操作随机延迟(1.5–4 秒),降低频率风控
|
|
296
302
|
- 代理支持:`TWITTER_PROXY` 环境变量
|
|
297
303
|
|
|
298
304
|
### 安装
|
|
@@ -316,6 +322,8 @@ twitter favorites
|
|
|
316
322
|
# 搜索
|
|
317
323
|
twitter search "Claude Code"
|
|
318
324
|
twitter search "AI agent" -t Latest --max 50
|
|
325
|
+
twitter search "topic" -o results.json # 保存到文件
|
|
326
|
+
twitter search "trending" --filter # 启用排序筛选
|
|
319
327
|
|
|
320
328
|
# 推文详情
|
|
321
329
|
twitter tweet 1234567890
|
|
@@ -326,7 +334,9 @@ twitter list 1539453138322673664
|
|
|
326
334
|
# 用户
|
|
327
335
|
twitter user elonmusk
|
|
328
336
|
twitter user-posts elonmusk --max 20
|
|
337
|
+
twitter user-posts elonmusk -o tweets.json
|
|
329
338
|
twitter likes elonmusk --max 30
|
|
339
|
+
twitter likes elonmusk -o likes.json
|
|
330
340
|
twitter followers elonmusk
|
|
331
341
|
twitter following elonmusk
|
|
332
342
|
|
|
@@ -18,7 +18,7 @@ Use this skill when the user wants to read or interact with Twitter/X content fr
|
|
|
18
18
|
## Prerequisites
|
|
19
19
|
|
|
20
20
|
```bash
|
|
21
|
-
# Install (requires Python 3.
|
|
21
|
+
# Install (requires Python 3.8+)
|
|
22
22
|
uv tool install twitter-cli
|
|
23
23
|
# Or: pipx install twitter-cli
|
|
24
24
|
```
|
|
@@ -55,6 +55,8 @@ twitter favorites --filter # Apply ranking filter
|
|
|
55
55
|
twitter search "keyword"
|
|
56
56
|
twitter search "AI agent" -t Latest --max 50
|
|
57
57
|
twitter search "机器学习" --json
|
|
58
|
+
twitter search "topic" -o results.json # Save to file
|
|
59
|
+
twitter search "trending" --filter # Apply ranking filter
|
|
58
60
|
```
|
|
59
61
|
|
|
60
62
|
### Tweet Detail
|
|
@@ -75,7 +77,9 @@ twitter list 1539453138322673664 # Fetch tweets from a Twitter List
|
|
|
75
77
|
```bash
|
|
76
78
|
twitter user elonmusk # User profile
|
|
77
79
|
twitter user-posts elonmusk --max 20 # User's tweets
|
|
80
|
+
twitter user-posts elonmusk -o tweets.json # Save to file
|
|
78
81
|
twitter likes elonmusk --max 30 # User's likes
|
|
82
|
+
twitter likes elonmusk -o likes.json # Save to file
|
|
79
83
|
twitter followers elonmusk --max 50 # User's followers
|
|
80
84
|
twitter following elonmusk --max 50 # User's following
|
|
81
85
|
```
|
|
@@ -101,6 +105,8 @@ twitter feed --json > tweets.json
|
|
|
101
105
|
twitter feed --input tweets.json
|
|
102
106
|
twitter user-posts elonmusk --json | jq '.[0].text'
|
|
103
107
|
twitter search "keyword" --json | jq 'length'
|
|
108
|
+
twitter search "topic" -o results.json
|
|
109
|
+
twitter likes elonmusk -o likes.json
|
|
104
110
|
```
|
|
105
111
|
|
|
106
112
|
## Ranking Filter
|
|
@@ -149,6 +155,8 @@ twitter favorites --filter
|
|
|
149
155
|
|
|
150
156
|
## Safety Notes
|
|
151
157
|
|
|
158
|
+
- Write operations have built-in random delays (1.5–4s) to avoid rate limits.
|
|
159
|
+
- TLS fingerprint and User-Agent are automatically matched to the Chrome version used.
|
|
152
160
|
- Do not ask users to share raw cookie values in chat logs.
|
|
153
161
|
- Prefer local browser cookie extraction over manual secret copy/paste.
|
|
154
162
|
- If auth fails with 401/403, ask the user to re-login to `x.com`.
|
|
@@ -486,7 +486,7 @@ def unlike(tweet_id):
|
|
|
486
486
|
|
|
487
487
|
@cli.command()
|
|
488
488
|
@click.argument("tweet_id")
|
|
489
|
-
def
|
|
489
|
+
def retweet(tweet_id):
|
|
490
490
|
# type: (str,) -> None
|
|
491
491
|
"""Retweet a tweet. TWEET_ID is the numeric tweet ID."""
|
|
492
492
|
_write_action("🔄", "Retweeting", "retweet", tweet_id)
|
|
@@ -494,7 +494,7 @@ def rt(tweet_id):
|
|
|
494
494
|
|
|
495
495
|
@cli.command()
|
|
496
496
|
@click.argument("tweet_id")
|
|
497
|
-
def
|
|
497
|
+
def unretweet(tweet_id):
|
|
498
498
|
# type: (str,) -> None
|
|
499
499
|
"""Undo a retweet. TWEET_ID is the numeric tweet ID."""
|
|
500
500
|
_write_action("🔄", "Undoing retweet", "unretweet", tweet_id)
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|