A webhook server
You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Go to file
trivernis 52b5598c97
chore: Release multihook version 0.4.2
4 months ago
.idea Add server implementation 2 years ago
src Fix check for successful command runs 4 months ago
.gitignore Update dependencies 4 months ago
Cargo.lock chore: Release multihook version 0.4.2 4 months ago
Cargo.toml chore: Release multihook version 0.4.2 4 months ago
LICENSE Add README and LICENSE 2 years ago
README.md Fix secret validation (hopefully) 4 months ago



Multihook is an easy to configure webhook server.


With cargo:

cargo install multihook


Just run it via systemd or smth.



The config allows you to configure actions for each endpoint. The config is most likely stored in ~/.config/multihook and on Windows maybe in the APPDATA directory (?). After running the program for the first time the config directory and config file should be created.

address = ''

# executed before all endpoint actions
pre_action = "echo 'pre action'"
# executed after all endpoint actions
post_action = "echo 'post action'"
# executed when an action fails
err_action = "echo \"Hook $HOOK_NAME failed with error: $HOOK_ERROR\""

# the name needs to be unique
# the path needs to be unique
path = "path/on/the/server"
# a command or a path to the script
action = "ls {{$.filepath}}"
# allows multiple instances of this action to run concurrently
allow_parallel = true
# additional hooks on endpoint-level
hooks = {pre_action = "echo 'before something bad happens'"}

path = "error"
action = "echo '{{$.books.*.title}}'"
# Validate secrets according to different parsing rules
# Currently only HMac based secrets with sha256 are supported
secret = { value = "my secret", format = "HMac"}

path = "script"
action = "/home/trivernis/.local/share/multihook/test-script.sh"
allow_parallel = false
# doesn't wait for the command to finish and returns a http response directly
# This setting can be useful if your action takes a very long time to run and would
# cause a timeout
run_detached = true

The configured action is either a script file or a command. In both cases placeholders with the syntax {{query}} can be used. The query is the path to required values in the json body of the request. The request body will also be provided in the environment variable HOOK_BODY.