Documentation ¶
Index ¶
Constants ¶
View Source
const AppName = "madonctl"
AppName is the CLI application name
View Source
const AppWebsite = "https://github.com/McKael/madonctl"
AppWebsite is the application website URL
Variables ¶
View Source
var RootCmd = &cobra.Command{ Use: AppName, Short: "A CLI utility for Mastodon API", PersistentPreRunE: checkOutputFormat, Long: `madonctl is a CLI tool for the Mastodon REST API. You can use a configuration file to store common options. For example, create ` + defaultConfigFile + ` with the following contents: --- instance: "INSTANCE" login: "USERNAME" password: "USERPASSWORD" ... The simplest way to generate a configuration file is to use the 'config dump' command. (Configuration files in JSON are also accepted.) If you want shell auto-completion (for bash or zsh), you can generate the completion scripts with "madonctl completion $SHELL". For example if you use bash: madonctl completion bash > _bash_madonctl source _bash_madonctl Now you should have tab completion for subcommands and flags. Note: Most examples assume the user's credentials are set in the configuration file. `, Example: ` madonctl instance madonctl toot "Hello, World" madonctl toot --visibility direct "@McKael Hello, You" madonctl toot --visibility private --spoiler CW "The answer was 42" madonctl post --file image.jpg Selfie madonctl --instance INSTANCE --login USERNAME --password PASS timeline madonctl account notifications --list --clear madonctl account blocked madonctl account search Gargron madonctl search --resolve https://mastodon.social/@Gargron madonctl account follow 37 madonctl account follow Gargron@mastodon.social madonctl account follow https://mastodon.social/@Gargron madonctl account --account-id 399 statuses madonctl status --status-id 416671 show madonctl status --status-id 416671 favourite madonctl status --status-id 416671 boost madonctl account show madonctl account show Gargron@mastodon.social madonctl account show -o yaml madonctl account --account-id 1 followers --template '{{.acct}}{{"\n"}}' madonctl config whoami madonctl timeline :mastodon`, BashCompletionFunction: shellComplFunc, }
RootCmd represents the base command when called without any subcommands
View Source
var VERSION = "2.3.1"
VERSION of the madonctl application
Functions ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.