The Twitter CLI nobody asked for
- Features
- Comparison with twurl
- Quick start
- API
- Building from source
- Releasing
- Troubleshooting
- Acknowledgements
- Footnotes
- 🚀 Fastest Twitter client on the market1
- 🤑 Absolutely free to use for live tweeting, doom scrolling, and more!
- Written in a programming language nobody cares about
- 😈 Supports multiple profiles so you can use your alts to troll with ease!
- 🤓 Allows you to dick around at work while looking like you're doing some hard-code nerd work in the terminal!
- 🥳 It kind of sucks to use Twitter via CLI so it will make you reduce your Twitter time -- less social, happier you!
- 🧠 Name is a portmanteau of "wittier" and "Twitter"
twurl is a Twitter CLI developed and released by Twitter
twurl | Twittier | |
---|---|---|
Is Next-Gen | ❌ | ✅ |
Blazing fast1 | ❌ | ✅ |
Shorter command name to save you valuable keystrokes | ❌ | ✅ |
NFTs2 | ❌ | ✅ |
Organic & Fair Trade | ❌ | ✅ |
Massive sex appeal | ❌ | ✅ |
Language name matches regex ru[a-z]{2} |
✅ | ✅ |
Officially supported | ✅ | ❌ |
Supports a fuller range of the Twitter API | ✅ | ❌ |
- Download executable from the releases page
- Initialize your credentials file:
tw init
- If you are on Mac, your computer will try to keep you safe by saying the program is malwaare. After it prompts you to move it to the trash, click "cancel" and immediately open System Preferences > Security & Privacy. Click the button that says "Allow" next to the program name to allow your computer to run it.
- Create a developer account. Then create an app. Then grant it write permissions. Then generate an access token and secret. (This is a better guide than I would write)
- Copy/paste your API key, API secret, Access token, and Access token secret into your
~/.twitter_credentials.toml
file - See what's new:
tw feed
- Add to the conversation
tw post "new phone who dis"
Or as shell commands:
curl -L https://github.com/ericyd/twittier/releases/download/1.0.0/twittier-1.0.0-linux.zip > twittier-1.0.0-linux.zip
unzip twittier-1.0.0-linux.zip
ln -s "$(pwd)/twittier-1.0.0-linux/tw" /usr/local/bin/tw
tw init
vi ~/.twitter_credentials.toml
# insert credentials ^
tw feed
Initializes the credentials file. Generally you want to run this first and then create a Twitter developer account and populate the credentials
Arguments
-c
,--credentials
(Optional)
Examples
# Defaults to ~/.twitter_credentials.toml
tw init
# Custom file
tw init -c ~/my-custom-credentials-file
Alerts the world that you are still alive.
Aliases
tweet
p
Arguments
message
(Required)replies
(Optional)-p
,--profile
(Optional). Allows you to specify an alt account to use
Examples
tw post "I might have poor grammar but so are you"
tw tweet "Calamine lotion tastes funny"
tw p 'Who took the cookies from the cookie jar? Twas me, bitches'
Twittier has first-class threading support. Simply include multiple messages when calling tw post
and it will automatically thread!
Examples
tw post "i have OPINIONS" "you will LISTEN TO ME" "if you don't there will be DIRE CONSEQUENCES"
Sometimes you want some whitespace in your thread, like extra lines and stuff. Well too bad, asshole! It isn't supported yet.
If you want to use with multiple profiles, you'll need to set up your credentials file as follows
[default]
api_key = ""
api_key_secret = ""
access_token = ""
access_token_secret = ""
[alt1]
api_key = ""
api_key_secret = ""
access_token = ""
access_token_secret = ""
Running commands without a -p
or --profile
argument will use the default
credentials, whereas specifying a profile will use those credentials. For example
tw post "can confirm: @ericydauenhauer is def a human" --profile alt1
Delete a prior lapse in judgment
Arguments
id
(Required)
Examples
tw delete 123456
Like a tweet
Arguments
tweet_id
(Required)
Examples
tw like 123456
Unlike a tweet
Arguments
tweet_id
(Required)
Examples
tw unlike 123456
Read your recently posted tweets (good for the ego)
Arguments
count
(Optional)- Must be between 5 and 100
Options
next-token
(Optional) next pagination tokendump
(Optional) writes the raw JSON response to a file
Examples
tw home
tw home 42
tw home 42 --dump
Get some info about yourself
Examples
tw me
See what people are saying about you
Arguments
count
(Optional)dump
(Optional) writes the raw JSON response to a file
Examples
# Defaults to 10 or something
tw feed
# Get an exact number (less than 100 plz)
tw feed 42
# Write to a file
tw feed 42 --dump
Print useful information that you will need when you're filing bug reports for this software
Examples
tw -v
tw version
tw --version
Help me, Obi-Wan Kenobi; you're my only hope.
Examples
tw -h
tw help
tw --help
--debug
: Prints a bunch of extra infohelp
,--help
,-h
: Include with another argument to get specific help message for that command.-c
,--credentials
: If you prefer for some bizarre reason to customize the location of your credentials file, you'll have to specify this flag every time
tw post "fuck fuck fuck fuck fuck fuck fuck fuck fuck fuck fuck fuck donald trump" --debug
tw post -h
tw feed --help
tw init help
tw init -c /path/to/custom/file.toml
- Install Rust and Cargo
Note: If you are using Rust < 1.58, you need to install the nightly toolchain for the
strip
feature. You'll also need to addcargo-features = ["strip"]
to the top ofCargo.toml
- Clone and build
# Clone repo as needed
git clone https://github.com/ericyd/twittier && cd twittier
# Build
cargo build --release
# Or, if cargo wasn't installed with Rustup, invoke directly
rustup run cargo build --release
# create link
ln -s "$(pwd)/target/release/tw" /usr/local/bin/tw
# Use it
tw -h
Turns out cross-compiling is quite hard locally so just use GitHub Actions - its free!
Oh but be sure to bump the version first
# cut tag
git tag 1.0.0 -s
# you're done, GH Actions does the rest 🙌
git push --tags
Be sure to generate an access token and secret after you update your app to have Read & Write permissions. The default is Read-only which will not work.
- Fonts in logo: Procrastinating Pixie and Lemon Milk
- 1This has never been, and will never be, measured
- 2Non-functional Tweets
Follow me @ericydauenhauer for good times