Command-line tool for twitter https://github.com/vmchale/command-line-tweeter#readme
|Latest on Hackage:||188.8.131.52|
This package is not currently in any snapshots. If you're interested in using it, we recommend adding it to Stackage Nightly. Doing so will make builds more reliable, and allow stackage.org to host generated Haddocks.
Command Line Interface Tweeter
tweet-hs is a command-line tool for twitter. It has more features than
its rust counterpart and it’s a bit
Reasons to use tweeth-hs:
- Faster than other tools (t, oysttyer)
- Support for colored output.
- Can be used in scripts
- You know haskell and like being able to extend your tools.
- You want something that can be called from vim
- You want a twitter library for haskell.
- BSD3 licensed
Reasons not to use tweet-hs:
- You want “twitter in a terminal” that rainbowtools or oysttyer provides.
- You want to be able to easily tweet emoji
Comparison to other command-line clients
|Tool||Language||Color output||Interactive||Vim plugin support||Scriptable||Send emoji|
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
~/.cred.toml, as in the
api-key = "API_KEY_HERE" api-sec = "API_SECRET_HERE" tok = "OAUTH_TOKEN_HERE" tok-sec = "TOKEN_SECRET_HERE"
If you’re on Linux/Windows the best way is probably to download the binaries from the releases page here.
To build from source, install haskell stack; on unix systems this is as simple as
wget -qO- https://get.haskellstack.org/ | sh
stack install tweet-hs it will put an executable called
tweet on your path.
View Profiles and timelines
To get your timeline, simply type:
To view a user’s profile, type e.g.
tweet user NateSilver538 --color
To send a tweet:
tweet send "This is my tweet"
Input from stdin
To tweet from stderr, run a command that pipes stderr to stdin, i.e.
stack build &>/dev/null | tweet input
tweet executable reads from stdin only, but you can view the options (replies, number of tweets to thread, etc.) with
This script powers the twitter account @my_build_errors for instance. There’s an example bash script for in
Viewing your timeline
You can also use
tweet view --color
to view your own timeline.
You can define the following in your
:def tweet (\str -> pure $ ":! tweet send \"" ++ str ++ "\"")
bash/ has a
mkCompletions script to allow command completions for your convenience.
A haskell package is included. It’s fairly easy to use once you have the credentials set up, with two main functions:
basicTweet: the first for threading your own tweets or replying to someone else’s and the second for just tweeting.
- Update for new