CLI client for the Mastodon social network API
This release is based on Madon v2.3.0 and should support the complete Mastodon 2.3.x API.
This is a quick list of the main changes:
--notification-types
flag to filter streams & notifications--exclude-types
to accounts notifications --list--keep N
to keep the N last items--locked
flag to account update subcommand--following
to restrict account search--only-media
to madonctl timelines (Mastodon 2.3.0+)--description
and --focus
flags for media attachmentsmedia --update
option--show-reblogs
flagHere are a few command line examples:
% madonctl account follow [email protected]
% madonctl account follow https://mastodon.social/@Gargron
% madonctl account follow 666
% madonctl account statuses 399
% madonctl lists create --title Friends
% madonctl lists show
% madonctl lists show --list-id 23
Please use the online help or check the manpages for more details.
This is a snapshot of madonctl 2.0.0 development version.
This version is compatible with Mastodon 2.0.0 API but NOT with Mastodon < 2.
Changes included in this release:
--notifications-only
domain-blocks
command to list and update blocked domains (Mastodon 1.4)mute-conversation
, unmute-conversation
(Mastodon 1.4)default_output
, default_theme
Examples with the new commands:
% madonctl domain-blocks --block example.com
% madonctl domain-blocks --show
- Domain Name: example.com
% madonctl domain-blocks --unblock example.com
% madonctl status -s 7123456 mute-conversation
% madonctl status -s 7123456 show --template '{{ .muted }}' # (should display "true")
% madonctl status -s 7123456 unmute-conversation
Changes in madonctl 1.1.0:
--add-mentions
to automatically add mentions when replying to a toottolocal
(converts dates to local timezone)Thanks for the feedback and suggestions on previous releases.
Note: The version bump simply means that most of the features I wanted are in...
This release adds support for OAuth2 (and 2-factor authentication) with a new oauth2
command.
This command can be used interactively or non-interactively (if you want to use it from a wrapper), and its output can be customized with the usual options.
Examples:
% madonctl oauth2 # Interactive OAuth2 login
% madonctl oauth2 > config.yaml # Same, creating config file
% madonctl oauth2 get-url # Only get link to auth server
% madonctl oauth2 code OAUTH2_CODE # Login with server OAuth2 code
% madonctl oauth2 code OAUTH2_CODE > config.yaml # Same, creating config file
This version also adds a --command
flag to the stream command. You can specify an external command that will be run for each event received on a stream.
The event will be sent to the standard input of the command; the output modifiers (json/yaml/template/theme) will be applied.
Examples:
% madonctl stream --command radio.sh :pouetradio,tootradio # Listen to hashtags
% madonctl stream --theme=gateway --command gateway.zsh # User timeline and notifications
% madonctl stream -o json --command json.zsh local # Local timeline
% madonctl stream --command cmd --theme=ansi --color=off # Using ansi theme w/o colors
Please note that currently madonctl will wait synchronously for the external command to complete (this behaviour might be changed in the future).
This version uses the madon library, version 1.5.0. Don't forget to upgrade it if you build madonctl from source.
Example:
% madonctl accounts --user-id https://mastodon.social/@Gargron show
Note: Using themes requires the 'template_directory' setting to be set.
Examples:
% madonctl --theme=ansi timeline # Display timeline with ansi theme
% madonctl search gargron --theme=ansi # Use ansi theme to display search results
% echo "Hello from #madonctl" | madonctl toot --stdin # Read toot content from stdin
% madonctl stream ":mastodon,golang" --theme ansi # Listen to multiple hashtag streams
--output
, --visibility
and --color
examples
directory)Examples of instance statistics:
% madonctl instance --stats
- Instance: mamot.fr
Users: 5889
Statuses: 129630
Open Registrations: true
Up: true
Date: 2017-04-30 23:57:45 +0200 CEST
% madonctl instance --stats --server mastodon.social \
--template '{{printf "%v users\n" .users}}'
51547 users
You can check the examples/instance_statistics.sh script for a usage with a time range.