Install
openclaw skills install @tobewin/x-helperFull-featured X (Twitter) assistant — search, post with media, thread, DM, Lists, bookmarks, trends, articles, block/mute, and more. Pure Python stdlib.
openclaw skills install @tobewin/x-helper通过自然语言操作 X(Twitter)。纯 Python stdlib,覆盖 X API v2 完整能力。
搜帖子 · 查用户 · 发推(带图/视频/GIF) · 发线程 · 管书签 · 看趋势 · 发文章 · DM · Lists · 屏蔽/静音 · 关注/取关
http://localhost:8080/callbackpython3 scripts/x_client.py auth authorize --client-id YOUR_CLIENT_ID
会自动弹浏览器授权。Token 缓存到 ~/.x-helper/auth.json,自动 refresh。
python3 scripts/x_client.py auth status
search postssearch posts --archivesearch userssearch newsuser getuser meuser timelineuser mentionsuser followers / followinguser likedtweet post(带 --media 可发图片)tweet deletetweet gettweet like / unliketweet retweetthread post --text1 "" --text2 ""trendstrends listbookmark listbookmark addbookmark removearticle draft --title "" --text ""article draft --title "" --text "" --richarticle publishdm listdm conversation [conversation-id]dm send username textdm deletelist createlist mylist memberslist add-memberlist remove-memberlist followlist postsblockunblockblockedmuteunmutemutedfollowunfollow search posts <query> [--max N] [--archive] 搜帖子(--archive 全量归档)
search users <query> [--max N] 搜用户
search news <query> [--max N] 搜新闻
user get <username> 用户信息
user me 当前用户
user timeline <username> [--max N] 最近推文
user mentions <username> [--max N] 提及
user followers <username> [--max N] 关注者
user following <username> [--max N] 正在关注
user liked <username> [--max N] 赞过的推文
tweet post <text> [--reply-to ID] [--media path]...
tweet get <id>
tweet delete <id>
tweet like <id>
tweet unlike <id>
tweet retweet <id>
tweet unretweet <id>
tweet likers <id> [--max N]
tweet retweeters <id> [--max N]
tweet quote-tweets <id> [--max N]
thread post --text1 "第一段" --text2 "第二段" [--text3 "第三段" ...] [--media path]
trends [--woeid N]
trends list
bookmark list [--max N]
bookmark add <tweet-id>
bookmark remove <tweet-id>
article draft --title "标题" --text "内容" [--rich]
article publish <article-id>
dm list [--max N]
dm conversation <id> [--max N]
dm send <username> <text>
dm delete <event-id>
list create <name> [--description <desc>]
list get <id>
list delete <id>
list members <id> [--max N]
list posts <id> [--max N]
list followers <id> [--max N]
list add-member <list-id> <username>
list remove-member <list-id> <username>
list follow <list-id>
list unfollow <list-id>
list my [--max N]
block <username>
unblock <username>
blocked [--max N]
mute <username>
unmute <username>
muted [--max N]
follow <username>
unfollow <username>
--rich 支持 # 标题、加粗、斜体、列表--archive 走 /tweets/search/all(需对应 API tier)图片发推: python3 scripts/x_client.py tweet post "内容" --media photo.jpg --media photo2.png
发线程: python3 scripts/x_client.py thread post --text1 "第一段" --text2 "第二段"
看趋势指定地点: python3 scripts/x_client.py trends --woeid 23424856(WOEID 23424856 = 日本)
全量搜索: python3 scripts/x_client.py search posts "from:user since:2020-01-01" --archive