Mastodon + toot: Post from the command line
You can also toot from the terminal - and that's not just fun for scripts!

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
The tool toot does too ... oh, too cheap ;) toot doesn't have too many functions: you can set toots, build in content warnings and determine the visibility. First of all you have to go through the program npm Install the package manager for the JavaScript runtime environment Node.js:
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
toot
on. Since there is no configuration yet, the setup wizard starts. First he asks for the mastodon host, here in the example:
social.anoxinon.de
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:

post posts
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.
More on Mastodon. Or more at Mastodon.