I've done plenty of internal web apps with Python's old cgi module and it's really about the simplest approach. Too bad the cgi module has recently been removed from Python due to some weird neurosis about underused modules. It's still possible to side-load it from someplace though.
This is something that irritates me about some languages. I get the intention of keeping a clean language, but for something as foundational and basic as CGI... what's the real problem in keeping it there? It's not like CGI itself has changed much in the past 20 years...
I've written some stuff in Python but it seems like keeping up with Python and its near-infinite PEPs is half the job. They still can't get on the same page about how to package and share things on PyPI, or which tooling a developer should use to test integration or build packages, etc. I'm somewhat realizing what I enjoy about Python is more its dynamism and lack of verbose syntax. Or, cool stuff like list comprehensions and decorators.
The community is insufferable. I wish I could find a programming language that was high level, effective, but boring in the sense that it isn't being changed every other year. Something that I can build on for five years or more.
It's a strange thought but I've heard of people using PHP, of all things, to write general purpose CLI programs and whatnot. It had never occurred to me to try that even though I knew it was possible. It just felt... dirty.
Not strange at all! Leave those assumptions behind, take a look at symfony/console and minicli. PHP is not shiny or snarky as Python, but resilient and "boring". The "dirtness" that you are feeling is just a way to keep those insufferable people that you mentioned out.
I mean, to some degree I see where you're coming from. PHP extensions can be written in C, so you can drop down to lower level as needed. Hardly different than Python in that regard. PHP is just something I've always just used in a Web serving context, so pre-populated $_GET, $_POST, etc.
I would hope argv and argc at least are passed by default in PHP programs on the command line. New experiment unlocked I guess.