| name | x-cli |
| description | Full-featured X/Twitter toolkit — read, search, post, interact, DMs, lists, polls, trends. Cookie auth, proxy support, no API keys needed. |
| homepage | https://github.com/ignsoftwarellc/x-cli |
| metadata | {"clawdbot":{"emoji":"𝕏","requires":{"python":">=3.10","pip":["twikit"]}}} |
x-cli
Full-featured X/Twitter toolkit for OpenClaw agents. Powered by twikit — no API keys required, cookie-based auth.
Setup
pip install -r scripts/requirements.txt
cp config.example.json config.json
Commands
Read (x_read.py)
python scripts/x_read.py tweet <url-or-id>
python scripts/x_read.py user <username> --count 5
python scripts/x_read.py timeline --count 20
python scripts/x_read.py foryou --count 20
python scripts/x_read.py thread <url-or-id>
python scripts/x_read.py replies <url-or-id> --count 20
python scripts/x_read.py mentions --count 10
python scripts/x_read.py highlights <username>
python scripts/x_read.py search-user "query" --count 10
Search (x_search.py)
python scripts/x_search.py "query" --count 10
python scripts/x_search.py "from:zerohedge gold" --count 5
Post (x_post.py) — confirm with user first!
python scripts/x_post.py tweet "text"
python scripts/x_post.py tweet "text" --media ID1 ID2
python scripts/x_post.py tweet "text" --dry-run
python scripts/x_post.py reply <id> "text"
python scripts/x_post.py quote <id> "text"
Interact (x_interact.py)
python scripts/x_interact.py like <tweet>
python scripts/x_interact.py unlike <tweet>
python scripts/x_interact.py retweet <tweet>
python scripts/x_interact.py unretweet <tweet>
python scripts/x_interact.py bookmark <tweet>
python scripts/x_interact.py unbookmark <tweet>
python scripts/x_interact.py follow <username>
python scripts/x_interact.py unfollow <username>
python scripts/x_interact.py delete <tweet>
python scripts/x_interact.py mute <username>
python scripts/x_interact.py unmute <username>
python scripts/x_interact.py block <username>
python scripts/x_interact.py unblock <username>
DMs (x_dm.py)
python scripts/x_dm.py send <username> "message"
python scripts/x_dm.py inbox --count 10
Extra (x_extra.py)
python scripts/x_extra.py trends
python scripts/x_extra.py trends --category news
python scripts/x_extra.py bookmarks --count 10
python scripts/x_extra.py notifications --count 10
python scripts/x_extra.py user-info <username>
python scripts/x_extra.py followers <username> --count 20
python scripts/x_extra.py following <username> --count 20
python scripts/x_extra.py upload <filepath>
python scripts/x_extra.py schedule <timestamp> "text"
python scripts/x_extra.py poll "A" "B" "C" --duration 1440
python scripts/x_extra.py list-create "name" --private
python scripts/x_extra.py list-add <list-id> <username>
python scripts/x_extra.py list-remove <list-id> <username>
python scripts/x_extra.py list-tweets <list-id> --count 20
Auth (x_auth.py)
python scripts/x_auth.py check
python scripts/x_auth.py whoami
python scripts/x_auth.py login
Output
All commands: plain text by default, --json for structured JSON.
Media & Reply Context
- Tweets with images/videos include media URLs in output (
🖼️ / 🎥)
- Replies include
↩️ Reply to: link to the original tweet
- Agent can fetch media URLs with
web_fetch and analyze with vision
Proxy (optional)
Set "proxy": "http://user:pass@host:port" in config.json.