man(1)
π¦ execute-json-from-fifo β the man page, but make it cute
okay bestie, so this is from the execute-json-from-fifo manual, section man(1). it's short, it's sweet, and it's lowkey one of the most powerful little scripts you'll ever meet. let's get into it π
β¨ NAME β¨
execute-json-from-fifo β reads a fifo stream of POSIX commands that have been serialized as JSON, and runs them. that's it. that's the whole job. and she does it flawlessly. π
πΈ SYNOPSIS πΈ
execute-json-from-fifo FIFO
one argument, one pipe, infinite main character energy. periodt. π
π DESCRIPTION π
so this is a very simple script β and when i say simple, i mean she's not doing anything fancy, she's just doing exactly one thing extremely well. she takes commands that arrive as JSON on a given named pipe and executes them. iconic behavior, honestly.
and why would you even want that?? okay so listen:
- it's useful when you need to create a super-privileged container that's able to run commands on the host system. like, container says jump, host says how high. π«Ά
- it's also useful when you need to give a container the ability to launch commands as a non-privileged user on the host. very demure, very mindful, very least-privilege of it. π
to launch this script, you run:
$ execute-json-from-fifo PATH_TO_NAMED_PIPE
and then boom, you can start sending commands to the pipe. the protocol goes like this:
{"command":["echo", "some", "command"], "stdin":"path", "stdout":"path", "stderr":"path", "cwd":"path", "env":{"ENVVAR":"value"}}
β οΈ note: the protocol is newline delimited. so never include new-lines in the command objects. not even one. not even a little one. i am begging you. π one sneaky \n in there and the whole vibe check fails.
and for the optional lil' extras β stdin, stdout, stderr, cwd and env are all optional. leave 'em out if you don't need 'em, no pressure, no judgment, she's chill like that. π
last thing bestie, and this one matters: passing ["exit"] to command stops the script. that's the off switch. the girl is done, she's clocking out, she's going home. πͺβ¨
π AUTHOR π
Timothy Hobbs (timothy.hobbs.cz) β the genius behind the fifo. we stan. π
and that's a wrap on this execute-json-from-fifo man page, dated 09 April 2016 β so yeah, she's been serving since 2016 and she's still eating. ngl, timeless. mwah, bye bestie ππΈπ¦
π¦ where this page comes from
- debian bookworm: subuser 0.6.2-3 Β· LGPL-3.0-or-later
- debian trixie: subuser 0.6.2-3 Β· LGPL-3.0-or-later
- ubuntu jammy: subuser 0.6.2-3 Β· LGPL-3.0-or-later
- ubuntu noble: subuser 0.6.2-3 Β· LGPL-3.0-or-later
- ubuntu resolute: subuser 0.6.2-3.1 Β· LGPL-3.0-or-later
- ubuntu stonking: subuser 0.6.2-3.1 Β· LGPL-3.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms