Command Line – Mastodon CLI Client » Linux Magazine

0
11


If you are looking for a Twitter alternative, toot lets you interact with Mastodon from the command line.

An open source, decentralized version of Twitter, Mastodon has been in development since 2016. With Elon Musk’s erratic decisions since purchasing Twitter in late 2022, many users predicting Twitter’s doom have been searching desperately for alternatives. The result has been a new surge in interest in Mastodon – even if many newcomers remain puzzled by its open source organization. The interest is so great that Mastodon’s founder Eugen Rochko reports that he has received offers of “hundreds of thousands of dollars” from five investors – offers he refused so as not to endanger Mastodon’s nonprofit status [1]. As I write, the exodus from Twitter appears to have slowed, but along with the renewed interest in Mastodon has come a renewed interest among Linux users in toot [2], an open source command-line client for Mastodon.

Toot takes its name from Mastodon’s equivalent of Twitter’s tweets, the microblog messages posted by users. Officially, the term is obsolete, with Mastodon’s latest release replacing toot with a simple Publish button [3], but the term remains widely used. Toot compares favorably with Twitter clients for Linux such as Twidge, Oyster, and Rainbow Stream, many of which are not up-to-date, and have an alarming tendency to come and go without warning. By contrast, although current users must still use the web interface to create a Mastodon account for everyday use, toot is a complete replacement for the web version of Mastodon (Figure 1), providing functionality that is both thoroughly documented and up-to-date with Mastodon through a series of commands and options that keeps users’ hands firmly on the keyboard.

Getting Started

You will find toot in the package repositories of many distributions and you can also install toot using Homebrew, although some sources are more current than others. However you choose to install, to use toot, you must create an account in a Mastodon instance from a web browser before logging in with the command toot login_cli (Figure 2). Upon launching, toot creates a configuration file in your home directory at .config/toot/config.json. You must then specify a Mastodon instance to log in to – but note that its name must be entered in lowercase characters with periods rather than spaces between the words, regardless of how the instance name is presented in the web interface. After toot locates the instance, enter your email and password to log in. For later access, toot stores your email and a temporary access token in the configuration file so that your password is never stored unencrypted. Once you are connected to an instance, you can enter user whoami to display user details and toot whois to display account details. To switch accounts, use toot activate. To see a list of active accounts, enter toot auth.

[…]

Use Express-Checkout link below to read the full article (PDF).



Source link

LEAVE A REPLY

Please enter your comment!
Please enter your name here