Command Line Interface
Ce contenu n’est pas encore disponible dans votre langue.
The Apprise CLI (apprise) is a lightweight command-line tool that allows you to send notifications to virtually any service directly from your terminal. It is ideal for system administrators, DevOps engineers, and automation scripts.
Installing the CLI
Section titled “Installing the CLI”The apprise command is included with the Apprise core installation.
Most users install it via pip install apprise.
Docker images primarily target the Apprise API, though the CLI is available inside the container for operational use.
For full installation options, see Installation.
Basic Usage
Section titled “Basic Usage”The syntax is designed to be intuitive. You simply provide the notification details and the destination URLs.
# General Syntaxapprise -t "Title" -b "Body" "service-url://..."Sending a Simple Notification
Section titled “Sending a Simple Notification”To send a notification, provide a title (-t) and a body (-b), followed by one or more Apprise URLs.
# Send a notification to Discordapprise -t "Task Complete" -b " The backup finished successfully." \ "discord://webhook_id/webhook_token"Chaining Multiple Services
Section titled “Chaining Multiple Services”You can notify multiple services at once by listing them sequentially. By default, Apprise sends notifications asynchronously for better performance.
Use --disable-async to send notifications synchronously, processing each service
one at a time in the order they are loaded.
# Notify Discord and Email simultaneouslyapprise -vv -t "Server Alert" -b "High CPU usage detected." \ -n "warning" \ "discord://webhook_id/webhook_token" \ "mailto://user:pass@gmail.com"Piping Input (stdin)
Section titled “Piping Input (stdin)”The CLI works seamlessly with standard input (stdin). If you do not specify a body (-b), Apprise listens for input from the pipe. This makes it perfect for monitoring logs or capturing command output.
# Send the contents of a filecat /proc/cpuinfo | apprise -t "CPU Info" \ "mailto://user:pass@gmail.com"
# Send the result of a commanduptime | apprise "discord://webhook_id/webhook_token"Loading Configuration
Section titled “Loading Configuration”While you can pass URLs directly to the command, it is often cleaner to use a configuration file. This keeps secrets out of your command history and allows you to manage complex notification groups.
# Load configuration from a file and send a messageapprise --config "/etc/apprise/config.yml" \ --body "System is going down for maintenance"For more details on how to structure your configuration files, see the Configuration guide.