CLI tool for authenticated X (Twitter) API access — post, reply, search, manage followers, send DMs, upload media, and hit any v2 endpoint.
npx clawhub@latest install xurlRequirements
xurl is a CLI tool for interacting with the X (Twitter) API v2. It provides human- and agent-friendly shortcut commands for the most common actions — posting, replying, searching, liking, following, sending DMs, and uploading media — as well as raw curl-style access to any X API v2 endpoint. All commands return structured JSON to stdout, making it straightforward to pipe results into other tools or agent workflows.
npx clawhub@latest install xurlClick the Install button at the top of this page for one-click setup
xurl targets v2 only.~/.xurl is not safe or feasible.Ready-made one-liners cover posting, replying, quoting, deleting, searching, liking, reposting, bookmarking, following, blocking, muting, sending DMs, and uploading media. No need to construct raw API payloads for everyday tasks.
Beyond shortcuts, xurl works as a general-purpose X API client. Use xurl /2/some/endpoint with -X, -d, and -H flags to reach any v2 endpoint, just like curl but with authentication handled automatically.
Register multiple X apps and authenticate multiple OAuth 2.0 accounts per app. Switch between them with xurl auth default or override per-request with --app and --username flags.
Upload images or videos with xurl media upload, then attach the returned media_id directly to a post or reply. Video processing status can be polled with xurl media status --wait.
Known streaming endpoints (e.g. /2/tweets/search/stream, /2/tweets/sample/stream) are auto-detected and handled correctly. Any endpoint can be forced into streaming mode with the -s flag.
Credentials are stored locally in ~/.xurl and never need to be passed inline. The tool enforces a strict no-inline-secrets policy, making it safer to use inside AI agent or LLM workflows where prompt/context leakage is a risk.
An agent can search for posts on a topic with xurl search, read context with xurl read, then reply or like the most relevant results — all in a single chained workflow with structured JSON at every step.
Upload a prepared image with xurl media upload, capture the media_id from the JSON response, and immediately attach it to a new post — enabling fully automated media-rich publishing pipelines.
Periodically check mentions, home timeline, new followers, and DMs using xurl mentions, xurl timeline, xurl followers, and xurl dms to power monitoring dashboards or notification bots.
Register separate dev and prod apps, authenticate each independently, and switch between them with xurl auth default or per-request --app overrides — without ever mixing credentials.
~/.xurl. Supports OAuth 2.0 (recommended), OAuth 1.0a, and app-only auth. Obtain credentials at developer.x.com.npx clawhub@latest install xurlRequirements
Log in to write a review
No reviews yet. Be the first to share your experience!