clit-rs

Crates.ioclit-rs
lib.rsclit-rs
version0.1.11
sourcesrc
created_at2017-03-20 08:22:29.784319
updated_at2017-03-22 02:47:39.712983
descriptionCommand line tool allow you to access twitter
homepagehttps://github.com/vmchale/clit-rs
repositoryhttps://github.com/vmchale/clit-rs
max_upload_size
id9063
size131,215
Vanessa McHale (vmchale)

documentation

https://github.com/vmchale/clit-rs#README

README

Command Line Interface Tweeter (rust version)

Screenshot in alacritty:

Displaying a user's timeline in a terminal.

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:

  • Faster than other tools (t, rainbowstream ,clit ,oysttyer)
  • Lightweight (5MB, low CPU/memory usage)
  • Unobtrusive
  • Support for colored output.
  • Can be used in scripts
  • You know rust and like being able to extend your tools.
  • You want something that can be called from vim
  • You want a twitter library for rust.
  • BSD3 licensed

Reasons not to use clit-rs:

Config

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.

Installation

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.

Use

View Profiles

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

Sending tweets

$ tw send "YOUR_TWEET_TEXT"

Viewing your timeline

You can also use

$ tw view

to view your own timeline.

Features

  • tweet
  • view timeline
  • view user profiles
  • output with id of tweet
  • delete tweet
  • retweet
  • reply to tweet
  • display quoted tweets alongside

Coloring

clit-rs respects the CLICOLOR behavior defined here. If you wish to disable colorization,

 $ export CLICOLOR=0

Library

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.

Haskell

There is a haskell version of this, with a binary and a library, available here. The haskell library is more complete.

Commit count: 183

cargo fmt