I was recently looking at using Nushell to do the same thing. Nushell can natively do almost all you need for this.