Control your OpenTweet.io account from the terminal. Schedule tweets, check analytics, manage your evergreen queue and more without touching the browser.
Install
npm install -g @opentweet/cli
Requires Node 18 or later.
Getting started
Grab your API key from the OpenTweet dashboard under Settings > API Keys, then run:
opentweet auth
It will prompt you for the key, validate it, and save it. You are good to go.
Commands
Account
opentweet me
opentweet accounts
opentweet tweet
opentweet tweet "just shipped something cool"
opentweet tweet "hot take" --now
opentweet tweet "monday motivation" --schedule "2026-05-12 09:00"
opentweet tweet "thread drop soon" --account <account-id>
Managing posts
opentweet list
opentweet list --status scheduled
opentweet list --status draft
opentweet list --limit 50 --page 2
opentweet publish <id>
opentweet schedule <id> --time "2026-05-13 10:00"
opentweet delete <id>
opentweet delete <id> --x
IDs in the list output are shortened. Pass the short 8-character suffix or the full ID.
Analytics
opentweet analytics
opentweet analytics --tweets
opentweet analytics --top
opentweet analytics --account <id>
Evergreen queue
The evergreen queue automatically reposts your best content on a rotation.
opentweet evergreen list
opentweet evergreen add <post-id>
opentweet evergreen remove <id>
opentweet evergreen settings
opentweet evergreen toggle
Inspiration search
opentweet search "indie hacking"
opentweet search "solopreneur" --limit 20
Config
The API key is stored in ~/.config/opentweet/config.json. You can also set it via environment variable if you prefer not to store it on disk:
export OPENTWEET_API_KEY=ot_your_key_here
To point the CLI at a different API base (useful for local dev):
export OPENTWEET_API_URL=http://localhost:3000
To see your saved key or clear it:
opentweet auth --show
opentweet auth --clear
Publishing to multiple accounts
If you are on the Advanced or Agency plan you can connect multiple X accounts. Use opentweet accounts to list them and pass --account <id> to any command that creates or fetches posts.
Plans and limits
Some commands require a paid subscription. The CLI will tell you when you hit a limit. Run opentweet me to see your current plan and how many posts you have left today.
Issues
Report bugs and feature requests at github.com/opentweet/cli.