tweet-hs: Command-line tool for twitter

[ bsd3, library, web ] [ Propose Tags ]

a Command Line Interface Tweeter

[Skip to Readme]
Versions [faq],,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
Dependencies aeson, ansi-wl-pprint, authenticate-oauth, base (>=4.8 && <5), bytestring, composition-prelude, containers, data-default, directory, extra, htoml, http-client, http-client-tls, http-types, lens, megaparsec (>=6.0 && <7.0), optparse-applicative, split, text, tweet-hs, unordered-containers [details]
License BSD-3-Clause
Copyright 2016, 2017 Vanessa McHale
Author Vanessa McHale
Revised Revision 1 made by vmchale at Tue Sep 4 23:22:54 UTC 2018
Category Web
Home page
Source repo head: git clone
Uploaded by vmchale at Wed Aug 30 16:30:32 UTC 2017
Distributions NixOS:
Executables tweet
Downloads 17278 total (1467 in the last 30 days)
Rating (no votes yet) [estimated by Bayesian average]
Your Rating
  • λ
  • λ
  • λ
Status Hackage Matrix CI
Docs available [build log]
Last success reported on 2017-08-30 [all 1 reports]





Enable build with llvm backend


Don't build an executable


Use the gold linker


Use parallel garbage collector


Use -f <flag> to enable a flag, or -f -<flag> to disable that flag. More info


Note: This package has metadata revisions in the cabal description newer than included in the tarball. To unpack the package including the revisions, use 'cabal get'.

Maintainer's Corner

For package maintainers and hackage trustees

Readme for tweet-hs-

[back to package description]

Command Line Interface Tweeter

Build Status

Displaying a user timeline in a terminal.

tweet-hs is a command-line tool for twitter. It has more features than its rust counterpart and it's a bit slower.

Reasons to use tweeth-s:

  • 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 | | ---- | -------- | ------------ | ----------- | ------------------ | ---------- | ---------- | | tw | Rust | x | | x | x | | | rainbowstream | Python | x | x | | | x | | oysttyer | Perl | | x | | ½ | | | tweet-hs | Haskell | x | | x | x | | | t | Ruby | ½ | | | x | |


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 following example:

api-key = "API_KEY_HERE"
api-sec = "API_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- | sh

Then type stack install tweet-hs it will put an executable called tweet on your path.


View Profiles and timelines

To get your timeline, simply type:

tweet view

To view a user's profile, type e.g.

tweet user NateSilver538 --color

Sending tweets

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

The tweet executable reads from stdin only, but you can view the options (replies, number of tweets to thread, etc.) with

tweet --help

This script powers the twitter account @my_build_errors for instance. There's an example bash script for in bash/example

Viewing your timeline

You can also use

tweet view


tweet view --color

to view your own timeline.


The directory 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: thread and basicTweet: the first for threading your own tweets or replying to someone else's and the second for just tweeting.