From 41d8ad676efd86ece2da7820c77935d40ca23c06 Mon Sep 17 00:00:00 2001 From: jackwener Date: Fri, 13 Mar 2026 02:03:03 +0800 Subject: [PATCH] docs: update README and SKILL.md with image upload support MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Add image upload to Features lists (EN + CN) - Add --image/-i usage examples to Usage sections - Add 'Post with images' agent workflow in SKILL.md - Update Limitations: 'text only' → 'images only (no video yet)' --- README.md | 14 ++++++++++++-- SKILL.md | 22 +++++++++++++++++++++- 2 files changed, 33 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 74fc500..3da4991 100644 --- a/README.md +++ b/README.md @@ -35,7 +35,8 @@ A terminal-first CLI for Twitter/X: read timelines, bookmarks, and user profiles > **AI Agent Tip:** Prefer `--yaml` for structured output unless a strict JSON parser is required. Non-TTY stdout defaults to YAML automatically. Use `--max` to limit results. **Write:** -- Post: create new tweets and replies +- Post: create new tweets and replies, with optional image attachments (up to 4) +- Quote: quote-tweet with optional images - Delete: remove your own tweets - Like / Unlike: manage tweet likes - Retweet / Unretweet: manage retweets @@ -144,7 +145,11 @@ twitter following elonmusk --max 50 # Write operations twitter post "Hello from twitter-cli!" +twitter post "Hello!" --image photo.jpg # Post with image +twitter post "Gallery" -i a.png -i b.jpg -i c.webp # Up to 4 images twitter post "reply text" --reply-to 1234567890 +twitter reply 1234567890 "Nice!" -i screenshot.png # Reply with image +twitter quote 1234567890 "Look" -i chart.png # Quote with image twitter post "Hello from twitter-cli!" --json twitter delete 1234567890 twitter like 1234567890 @@ -363,7 +368,8 @@ After installation, OpenClaw can call `twitter-cli` commands directly. > **AI Agent 提示:** 需要结构化输出时优先使用 `--yaml`,除非下游必须是 JSON。stdout 不是 TTY 时默认输出 YAML。用 `--max` 控制返回数量。 **写入:** -- 发推:发布新推文和回复 +- 发推:发布新推文和回复,支持附带图片(最多 4 张,支持 JPEG/PNG/GIF/WebP) +- 引用推文:带评论的转发,也支持附带图片 - 删除:删除自己的推文 - 点赞 / 取消点赞 - 转推 / 取消转推 @@ -442,7 +448,11 @@ twitter following elonmusk # 写操作 twitter post "你好,世界!" +twitter post "发图" --image photo.jpg # 带图发推 +twitter post "多图" -i a.png -i b.jpg -i c.webp # 最多 4 张图片 twitter post "回复内容" --reply-to 1234567890 +twitter reply 1234567890 "回复" -i screenshot.png # 带图回复 +twitter quote 1234567890 "评论" -i chart.png # 带图引用 twitter post "你好,世界!" --json twitter delete 1234567890 twitter like 1234567890 diff --git a/SKILL.md b/SKILL.md index 0678370..181260b 100644 --- a/SKILL.md +++ b/SKILL.md @@ -179,9 +179,13 @@ twitter following elonmusk --max 50 # Following ```bash twitter post "Hello from twitter-cli!" # Post tweet +twitter post "Hello!" --image photo.jpg # Post with image +twitter post "Gallery" -i a.png -i b.jpg # Up to 4 images twitter reply 1234567890 "Great tweet!" # Reply (standalone) +twitter reply 1234567890 "Nice!" -i pic.png # Reply with image twitter post "reply text" --reply-to 1234567890 # Reply (via post) twitter quote 1234567890 "Interesting take" # Quote-tweet +twitter quote 1234567890 "Look" -i chart.png # Quote with image twitter delete 1234567890 # Delete tweet twitter like 1234567890 # Like twitter unlike 1234567890 # Unlike @@ -193,6 +197,12 @@ twitter follow elonmusk # Follow user twitter unfollow elonmusk # Unfollow user ``` +**Image upload notes:** +- Supported formats: JPEG, PNG, GIF, WebP +- Max file size: 5 MB per image +- Max 4 images per tweet +- Use `--image` / `-i` (repeatable) + ## Agent Workflows ### Post and verify @@ -202,6 +212,16 @@ twitter post "My tweet text" 2>/dev/null # Output includes tweet URL: 🔗 https://x.com/i/status/ ``` +### Post with images + +```bash +# Single image +twitter post "Check this out!" --image /path/to/photo.jpg + +# Multiple images +twitter post "Photo gallery" -i img1.png -i img2.jpg -i img3.webp +``` + ### Reply to someone's latest tweet ```bash @@ -306,7 +326,7 @@ twitter bookmarks --filter ## Limitations -- **Text only** — no media/image upload +- **Images only** — video/GIF animation upload not yet supported (image upload supports JPEG/PNG/GIF/WebP) - **No DMs** — no direct messaging - **No notifications** — can't read notifications - **No polls** — can't create polls