Before typescript and node > about 16 I’d reach for Python or more organized bash for these things. Now it’s Typescript from the client down to my system scripts.
The ability to use the same language all the way up and down my stack, to import code I use in my program from my script, and get Type-checking means more often than not I’ve got a hash bang with npx ts-node.
Especially useful for testing server code while skipping the HTTP nonsense.