xp

Post to X (Twitter) from your terminal. Single binary, zero dependencies.

$ xp "Hello, world!"
tweet_id: 1893684025138438386
url: https://x.com/i/status/1893684025138438386

Install

Homebrew
curl
Deno
Source
brew install tawachan/tap/xp
macOS and Linux. Update with brew upgrade xp.
# macOS (Apple Silicon)
curl -fsSL -L https://github.com/tawachan/xp/releases/latest/download/xp-darwin-arm64 -o /usr/local/bin/xp && chmod +x /usr/local/bin/xp

# macOS (Intel)
curl -fsSL -L https://github.com/tawachan/xp/releases/latest/download/xp-darwin-x64 -o /usr/local/bin/xp && chmod +x /usr/local/bin/xp

# Linux (x64)
curl -fsSL -L https://github.com/tawachan/xp/releases/latest/download/xp-linux-x64 -o /usr/local/bin/xp && chmod +x /usr/local/bin/xp

# Linux (arm64)
curl -fsSL -L https://github.com/tawachan/xp/releases/latest/download/xp-linux-arm64 -o /usr/local/bin/xp && chmod +x /usr/local/bin/xp
Update with xp upgrade.
deno install -g --allow-net --allow-read --allow-write --allow-env --allow-run -n xp https://raw.githubusercontent.com/tawachan/xp/main/main.ts
Requires Deno 2.x.
git clone https://github.com/tawachan/xp.git && cd xp && deno task compile && sudo mv xp /usr/local/bin/
Requires Deno 2.x.

Setup

$ xp auth login
# 1. Enter your API Key & Secret from the Developer Portal
# 2. Authorize in browser
# 3. Enter the PIN
# Done!

Get your API keys from the X Developer Portal. Pay-Per-Use pricing recommended.

Usage

xp "Hello from xp!"
Post a tweet. Or use xp tweet "text".
xp thread "First" "Second" "Third"
Post a thread. Each tweet auto-replies to the previous one.
xp reply 1234567890 "Nice!"
Reply to a specific tweet.
xp get 1234567890
Fetch a tweet by ID. Requires paid API plan.
xp me --json | jq '.[0].text'
List your recent tweets. --json works on any command.
xp delete 1234567890
Delete a tweet by ID.

Features

Simple

Just xp "text". No API paths, no JSON payloads.

Threads

xp thread "1" "2" "3" — auto reply chain.

Read & Reply

xp get, xp me, xp reply for full workflow.

JSON output

--json flag on any command. Pipe to jq.

Agent-friendly

Machine-readable output, non-interactive flags, exit codes.

Zero deps

Single binary. OAuth 1.0a via WebCrypto. xp upgrade to update.