kimotter

A Ruby client for posting tweets from the command line. Instead of using the Twitter API directly, it posts by driving the mala API (a web posting form that lived at http://api.ma.la/twitter/) with Mechanize. It was published as a gem.

Usage

Requires Ruby 1.9 plus nokogiri and mechanize (per the README).

gem install kimotter
kimotter "your tweet text"

Before posting, you are asked to agree to a confirmation message extracted from the page. Example run from the README, kept in the original Japanese because it is the actual console output — the tweet reads "Didn't know about EventSource, looks genuinely useful", and the prompt is "I swear, truthfully, that I am kimoto [y/N]".

> kimotter "EventSource知らんかった、普通に便利そう"
嘘偽りなく自分がキモトであると誓います[y/N] y
hi kimoto. try to tweet your cool message
done!

There are two options: -d, --debug (debug mode) and -f, --force (run without the pre-flight API limit check). The limit itself is enforced by the endpoint; --force only skips this client's own check.

Internals

Component layout. It's a small gem of roughly 170 lines total, built as two layers: the Kimotter class that drives the form, and KimotterCLI which handles the interactive side.

Component diagram of kimotter

The flow of a single post looks like this.

Sequence diagram of kimotter's tweet flow

Exit codes: 0 on success, 1 when stopped by the API limit, 2 when the confirmation prompt got EOF, and 3 when declined with anything other than y.

🤖 This English version is machine-translated by AI.