A simple command-line utility that allows you to post a "toot" (equivalent of a Tweet) on the Mastodon social network.
npm install -g toot
When you first run
toot you will be asked some questions in order for toot to authenticate with your Mastondon service
> toot Before you start using toot, you need to authenticate with your Mastodon server. ...
You will be asked for:
You will then be asked to visit a long URL in your browser and be prompted for one further piece of information:
This is a once-only operation. Then your configuration is saved (in
After the inital setup, sending a toot is a breeze:
> toot "I'm sending a Toot from the command-line!"
You can also pipe data from other processes into toot:
> cat longfile.txt | grep 'message' | toot
> toot --visibility private "secret" > toot --config ~/myconfig.json --visibility unlisted "hello there"
Perhaps you want to set up a Mastodon account for servers you are looking after. They can then be easily configured to send status updates:
> > toot "$HOSTNAME is going down for maintenance. Farewell dear friends" > toot "$HOSTNAME is up. I'm back!"