Have you considered PowerShell? It's open-source, and typed, and definitely usable from the command line with lots of resources for.
#!/usr/bin/dotnet run
https://devblogs.microsoft.com/dotnet/announcing-dotnet-run-...https://andrewlock.net/exploring-dotnet-10-preview-features-...