twitter-cli
Skill by public-clis
Use twitter-cli to read, post, reply, quote, like, retweet, follow and search on Twitter/X from an AI agent or terminal. It suits developers and agents that need to automate Twitter/X tasks through a command line tool.
Install twitter-cli
Built from the published package, never by AI.
git clone --depth 1 https://github.com/public-clis/twitter-cli /tmp/twitter-cli && mkdir -p ~/.claude/skills && cp -r /tmp/twitter-cli ~/.claude/skills/twitter-cliRun in your terminal. Claude Code loads skills from ~/.claude/skills automatically.
git clone --depth 1 https://github.com/public-clis/twitter-cli /tmp/twitter-cli && mkdir -p ~/.gemini/antigravity-cli/skills && cp -r /tmp/twitter-cli ~/.gemini/antigravity-cli/skills/twitter-cliAntigravity CLI loads skills from ~/.gemini/antigravity-cli/skills, or .agents/skills for one project.
Skills can run scripts on your machine. Some need an API key: check the README.
About
twitter-cli is a command line tool for Twitter/X, installed with uv or pipx and run with the twitter command. It covers reading the home timeline, following timelines, bookmarks, search results, user profiles, user posts and follower lists. It also handles write actions such as posting, replying, quoting, liking, retweeting, following and bookmarking. Output can be a rich table, YAML, JSON, or a compact format meant to save tokens for LLM context.
Authentication uses browser cookies that the tool extracts automatically from supported browsers, or auth_token and ct0 environment variables. The source notes that write operations need full browser cookies, since env vars alone may trigger error 226. The skill is written for AI agents, which are told to check authentication first and guide the user through setup. It suits agents and developers who want to automate Twitter/X tasks from a terminal.
Written from the project's SKILL.md and checked against it.
What it can do
- Read timelinesReads the home feed, following timeline, bookmarks and list timelines.
- Search tweetsSearches tweets by keyword with optional Latest sorting and a result limit.
- User lookupsShows user profiles, user posts, likes, followers and following lists.
- Post and replyPosts tweets, replies to tweets and creates quote-tweets, with optional images.
- Engagement actionsLikes, retweets and bookmarks tweets, and can undo each of these actions.
- Follow managementFollows and unfollows users by handle.
- Structured outputReturns rich tables, YAML, JSON or compact output for LLM context.
What you need
- Python 3.8 or newer
- uv or pipx to install the tool
- A logged-in x.com session in Arc, Chrome, Edge, Firefox or Brave, or auth_token and ct0 values
Try asking
- Search Twitter for recent posts about AI agents and show the top 20.
- Post a tweet with this photo and the text 'Launch day'.
- Show me the latest posts from @elonmusk in compact format.
Good to know
- Video and GIF animation upload is not supported. Images only.
- No direct messages, notifications or poll creation.
- Works with one account at a time.
- Likes are private on X, so the likes command only works for your own account.
Security check
ANo download-and-run commands, hidden instructions or signs of sending keys out were found.
Checked automatically: SKILL.md. This looks for known risky patterns and is not a full audit. How grades work
Inside the skill
-
.gitignore110 B -
AGENTS.md2 KB -
LICENSE11 KB -
README.md29 KB -
SCHEMA.md2 KB
Show all 9 files
-
SKILL.md14 KB -
config.yaml597 B -
pyproject.toml2 KB -
uv.lock135 KB
Alternatives to twitter-cli
All alternatives →Explains how to set up and verify Zoom webhooks for event-driven workflows. Covers signature checks, event subscriptions, delivery handling, retries and event-type selection for developers.
Posts text, images and videos to Weibo, and publishes headline articles from Markdown files. It works through a real Chrome browser over CDP. The scripts only fill in the content, and the user reviews and publishes manually.
Adds another phone number to an existing Dial channel in NanoClaw, so one install can answer SMS and AI voice calls on several numbers. Intended for operators who already run Dial and want a second or third line.
Explains how to set up and use Zoom WebSockets for persistent, low-latency Zoom event streams. Intended for workflows where WebSockets are preferred over webhooks.
Adds personal WeChat support to NanoClaw through Tencent's official iLink Bot API. It uses long-polling and QR code login, so no public webhook URL is needed. It is for NanoClaw users who want a personal WeChat bot channel.
Guides AI assistants through the bundled Zoom MCP connectors for meetings, recordings, meeting assets and transcripts. Intended for planning or troubleshooting tool-based Zoom access after routing to an MCP workflow.
Compare with setup-zoom-webhooks, baoyu-post-to-weibo or add-dial-number
twitter-cli: common questions
Why does posting fail with error 226?
The source says env vars with only auth_token and ct0 may trigger error 226 for write operations. Using browser cookie extraction is recommended instead.
What image formats can I post?
The source lists JPEG, PNG, GIF and WebP, with a 5 MB limit per image and up to 4 images per tweet.
Can I see another user's likes?
No. The source says Twitter/X made all likes private in June 2024, so the likes command only works for your own account.
How do I install twitter-cli?
Run the command above to copy the skill into ~/.claude/skills/. Claude Code picks it up automatically.
Is twitter-cli free?
The code is published under the Apache-2.0 licence. The service it connects to may have its own pricing.
Is twitter-cli safe to use?
It scores 89 of 100. Grades: maintenance A, licence A, quality A. Security check: grade A, no risky patterns found in the files checked. Review the code before you install. How grades work.
What are alternatives to twitter-cli?
Similar skills: setup-zoom-webhooks, baoyu-post-to-weibo, add-dial-number, setup-zoom-websockets.
