x-twitter
X (Twitter) API v2 skill using the authenticated user's own developer credentials (OAuth 1.0a, pay-per-use). All commands go through a single entry point: node <base_directory>/x.ts <command> [flags], which Node.js 22.18 or later runs directly, with nothing to install or build. Each command has its own doc file with the full reference for flags and behavior.
[!OUTPUT] Every command prints one JSON object: X's response with includes folded into data, plus our hints, as { data, meta?, errors?, hints? }. meta and errors are exactly as X sent them: meta.next_token is the value for --next-token, and errors says why something is missing, including partial errors next to good data. hints is an array of strings from the CLI. data is absent only when X sent none. Field names are X's own.
[!POSTS] Every command that returns posts (get, search, thread, replies, quotes, mentions, timeline, bookmarks, reposts-of-me, me --pinned-tweet) shows them as x.com does, in one shape: author (id, name, username) in place of author_id; text is the full text a human reads, long posts included, with t.co links expanded and the links to the post's own media and to the quoted post removed; media holds the attached photos and videos as X describes them (type, url, preview_image_url, duration_ms, variants, alt_text); referenced_tweets embeds quoted and retweeted posts in full, while a replied-to post stays { type: "replied_to", id } and the replied-to user is in in_reply_to_user; article holds an X Article's title and full plain_text. A referenced post X did not return stays as its { type, id }, and errors says why. The posts an embedded post references are not requested: they stay { type, id } with no error, a quoted one's link is still removed from the embedded post's text, and get <id> reads them.
[!COMMANDS]
Core:
a) me — authenticated user's own account data (profile, metrics, verification). @docs/me.md.
b) search — search posts by query. IMPORTANT: by default searches only the last 7 days; use --all for the full archive. Do NOT use search with conversation_id: to read threads or replies — use thread or replies instead. @docs/search.md.
c) get — retrieve one or more posts by ID; data is always an array. @docs/get.md.
d) post — create a tweet, reply, or quote tweet. @docs/post.md.
e) delete — delete a post owned by the authenticated user. @docs/delete.md.
f) thread — the conversation author's thread containing a post: the first post plus the author's replies to it or to another post in the thread, oldest first. Other people's replies, and the author's replies under them, are left out. Use --all for threads older than 7 days. @docs/thread.md.
g) replies — the direct replies to a post, newest first, one page at a time. IMPORTANT: by default searches only the last 7 days, so for a post older than that the replies come back partial with no warning; use --all. @docs/replies.md.
h) transcript — the transcript of a post's video(s), from the subtitle track X generates; a video X published no subtitles for has none. @docs/transcript.md.