Crates.io | clit-rs |
lib.rs | clit-rs |
version | 0.1.11 |
source | src |
created_at | 2017-03-20 08:22:29.784319 |
updated_at | 2017-03-22 02:47:39.712983 |
description | Command line tool allow you to access twitter |
homepage | https://github.com/vmchale/clit-rs |
repository | https://github.com/vmchale/clit-rs |
max_upload_size | |
id | 9063 |
size | 131,215 |
Screenshot in alacritty:
The rust version of this tool is somewhat faster than its haskell counterpart, but the haskell one has a few more features.
Reasons to use clit-rs:
Reasons not to use clit-rs:
Generate a token to authorize access to your twitter account by following the guide here
Then place your API keys and OAuth tokens in a file (default is $HOME/.cred
), separated by a line break:
api-key: API_KEY_HERE
api-sec: API_SECRET_HERE
tok: OAUTH_TOKEN_HERE
tok-sec: TOKEN_SECRET_HERE
Note that the labels must in the correct order, and separated from the keys with whitespace.
If you're on Linux/Windows the best way is probably to download the binaries from the releases page here.
Otherwise, you'll have to build from source. To build from source, install cargo via rustup; on unix systems this is as simple as
curl https://sh.rustup.rs -sSf | sh
Then type cargo install clit-rs
.
To get your profile, simply type:
$ tw user
To view a user's profile, type e.g.
$ tw user pinepapplesmear
If you have any problems along the way:
$ tw help
$ tw send "YOUR_TWEET_TEXT"
You can also use
$ tw view
to view your own timeline.
clit-rs respects the CLICOLOR behavior defined here. If you wish to disable colorization,
$ export CLICOLOR=0
A library is included. It's fairly easy to use once you have the credentials set up, with three functions: one to post a status, one to get your timeline, and one to get a user profile.
There is a haskell version of this, with a binary and a library, available here. The haskell library is more complete.