@csepp This is meant as a handy interface to inspect packages.
Doing the same in a script is ~10 lines of code:
https://git.savannah.gnu.org/cgit/guix.git/tree/guix/monad-repl.scm#n174
But it’s not so useful: in a script, you’d rather call ‘package-arguments’ and preserve gexps as is instead of lowering them, or you’d lower the whole package.