Post tweets, replies, and quotes to X/Twitter using the official API v2. Use this instead of bird for posting. Uses API credits so only post when explicitly asked or scheduled.
Post to X/Twitter using the official API v2. This tool uses API credits (limited to 1,500 posts/month on the Free tier), so only use it when the user explicitly asks you to post, or during scheduled cron tasks. Do not speculatively draft and post tweets.
For reading tweets, searching, and browsing timelines, use bird instead (no credit cost).
npm install -g github:0xmythril/tweet-cli#v1.0.0
mkdir -p ~/.config/tweet-cli
touch ~/.config/tweet-cli/.env
chmod 600 ~/.config/tweet-cli/.env
cat > ~/.config/tweet-cli/.env << 'EOF'
X_API_KEY=your_consumer_key
X_API_SECRET=your_secret_key
X_ACCESS_TOKEN=your_access_token
X_ACCESS_TOKEN_SECRET=your_access_token_secret
EOF
tweet-cli whoami~/.config/tweet-cli/.env (read by dotenv at runtime). Set chmod 600 to restrict access.npm pack --dry-run or inspect package.json.api.x.com) when you run a command.twitter-api-v2 (official X API client), commander (CLI parsing), dotenv (env file loading). No transitive dependencies.tweet-cli whoami
tweet-cli post "Your tweet text here"
tweet-cli reply <tweet-id-or-url> "Your reply text"
tweet-cli reply https://x.com/user/status/123456 "Your reply text"
tweet-cli quote <tweet-id-or-url> "Your commentary"
tweet-cli quote https://x.com/user/status/123456 "Your commentary"
tweet-cli delete <tweet-id-or-url>
bird (not tweet-cli).