Free software

fiu

Mastodon in the terminal, ready for scripts.

A command-line client for Mastodon and other servers with the same API: read, post and automate without leaving the terminal.

Install See the code on GitLab

Terminal on GNOME with the fiu home timeline: the four latest posts of a demo account, each with author, date and ID.

Post and schedule from one line

Posts with polls, content warnings, media and replies go out from a single command, and --scheduled-in schedules for later. The text can come from standard input or from your editor.

Two fiu post commands: one publishes a poll, the other schedules a reminder two hours ahead.

Filter JSON without installing jq

With --json you get the server's raw response, and --jq filters the result on the spot, with jq built in. You can list the ID and text of each post, one per line.

The fiu timelines home command with --json and a --jq filter that lists the ID and text of each post, one per line.

Rehearse before it runs in cron

--dry-run shows what the command would do without sending anything, --no-input never waits for a prompt and the idempotency key makes retrying a post safe. Each kind of failure has its own exit code.

The fiu post command with --dry-run and --idempotency-key showing the request that would be sent, followed by the exit code.

More features

Reading

Reads timelines (home, public, hashtag, list, account and more), conversations, notifications and favourites, and searches posts, accounts and hashtags.

Accounts and lists

Follows, mutes and blocks accounts, manages lists and hashtags, and switches between several signed-in accounts.

Live events

The fiu stream command follows events in real time, one line of JSON per event.

About the project

fiu is for people who use Mastodon from the terminal and also want to automate it: post from a script, take backups, build a bot. It is a Rust port of toot's command-line interface and uses the same login format, so toot accounts can be reused.

toot's interactive text interface (TUI) was not ported, nor were the commands toot had already marked as deprecated. Server-side filters, domain blocks and reports are not covered yet.

Technologies

Rust, with clap for the command line, reqwest for networking and jaq to filter JSON without needing jq installed.

License: GPL-3.0-only

Install fiu

To build, you need Rust 1.85 or newer.

From a release

A static Linux binary, also for ARM64 (swap amd64 for arm64), with a SHA256 sum to check it against.

curl -LO https://gitlab.com/alteronauta/fiu/-/releases/v1.1.0/downloads/fiu-v1.1.0-linux-amd64.tar.gz
curl -LO https://gitlab.com/alteronauta/fiu/-/releases/v1.1.0/downloads/SHA256SUMS
sha256sum --check --ignore-missing SHA256SUMS
tar xzf fiu-v1.1.0-linux-amd64.tar.gz
install -D fiu-v1.1.0-linux-amd64/fiu ~/.local/bin/fiu

From source

git clone https://gitlab.com/alteronauta/fiu.git && cd fiu
cargo install --path .

After installing, fiu login signs in your account. If you already use toot, you can reuse its accounts, because the login format is the same. The details are in the README.

Tell us what you need to solve.

adriano@ars.tec.br

@adriano@ars.tec.br