WPEXEC(1)
π wpexec(1) β the WirePlumber manual, but make it make sense
okay so real talk, this is the wpexec page from the WirePlumber manual set, and honestly? she's a little icon. let's get into it π«Ά
β¨ NAME β¨
wpexec β the WirePlumber Script Interpreter. yes that's her whole job and she ate π
π SYNOPSIS π
wpexec SCRIPT [ARGUMENTS]
π¦ DESCRIPTION π¦
okay so wpexec is literally the WirePlumber script interpreter. what it does is run one single Lua script against a PipeWire daemon that's already running β and it does not spin up a whole full session manager to do it. no cap. β¨
which is exactly why she's the tool of choice for:
- developing and testing scripts
- one-off queries
- small standalone policy scripts that run alongside the main WirePlumber instance
when you invoke it, here's the whole vibe: wpexec connects to PipeWire, activates the plugins that the script requires through Core.require_api(), and then runs the script. that's the pipeline. π§
and she keeps running until one of these happens:
- the script calls
Core.quit() - the connection to PipeWire is lost
- it gets interrupted with
SIGINT,SIGTERMorSIGHUP
the scripts that run under wpexec have access to the same Lua API as scripts loaded by the daemon β with the exception of a few functions that only make sense inside the daemon. iykyk π
π ARGUMENTS π
SCRIPTβ the path to the Lua script you wanna execute. that's the one. πARGUMENTSβ an optional SPA-JSON object that gets passed to the script as its argument (...). heads up bestie: passing anything that is not a JSON object is an error. not a vibe. π
π₯ EXAMPLES π₯
run a script, simple as:
$ wpexec ./get-default-sink-volume.lua
run a script with arguments (look at her go):
$ wpexec ./interactive.lua '{ option1 = "value1", option2 = "value2" }'
run a script straight from a build tree, without installing anything:
$ ./wp-uninstalled.sh wpexec tests/examples/interactive.lua
and ok this part is genuinely iconic β a script can also be made directly executable by giving it the appropriate shebang line, exactly like the examples in tests/examples do:
#!/usr/bin/wpexec
main character energy fr fr π
πΈ ENVIRONMENT πΈ
wpexec honours the same environment variables as wireplumber(1) β and most usefully WIREPLUMBER_DEBUG. see Debug Logging for the deets. π
β EXIT STATUS β
exit codes follow the conventions of sysexits.h(3head):
0(EX_OK) β success. slay. β64(EX_USAGE) β command line usage error, including a malformedARGUMENTSobject. π69(EX_UNAVAILABLE) β could not connect to PipeWire. π70(EX_SOFTWARE) β internal software error, including an error raised by the script. π
π SEE ALSO π
wireplumber(1), wpctl(1), pipewire(1), sysexits.h(3head)
WirePlumber Documentation: <https://pipewire.pages.freedesktop.org/wireplumber/>
π Author
The WirePlumber Developers
π Copyright
2020-2025, Collabora & contributors
and that's the whole page bestie π
mwah! this was WirePlumber wpexec(1), version 0.5.18, dated Sep 30, 2026 β go forth and run exactly one script π¦β¨
π¦ where this page comes from
- arch rolling: wireplumber 0.5.18-1 Β· MIT
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms