Since maybe not sooo well arrived in the everyday vocabulary: Tooten = twitter. And of course you can also issue Toots via a command line client – as quickly and easily as rarely. That it is the tool toot Open source software is almost self-evident.
set up toot
npm install -g toot
The "-g" stands for global, so toot is available system-wide. In the article to Checkmk notifications in Mastodon However, you can see that it is not that easy with the global in some scenarios.
Then your toot simply calls over
on. Since there is no configuration yet, the setup wizard starts. First he asks for the mastodon host, here in the example:
Then toot generates one Link, you visit in the browser - where you approve the authorization.
You will then receive a code to copy:
Toot is already waiting in the terminal with a request for this code – insert, confirm, done. Here is the whole terminal session again:
On Mastodon itself you can now find under Settings/Account/Approved Apps the new toot app. You can also revoke the authorization here.
A simple is enough to toot
toot "Testing cli client."
Which then unsurprisingly looks like this on Mastodon:
With options it could look like this:
toot --visibility unlisted --cw "Vorsicht: Der folgende Text ist irritierend." "Peter kaut Hunde."
The visibility shows the toot when setting unlisted public, but not in timelines or search. cw stands for Content Warning, shows the first text immediately and the second only after a click.
With toot, not only can you quickly toot a little text, but you can also set up automation very quickly. The one mentioned above shows an example of this Checkmk article.