Power Apps Portals can be handled using Portals CLI that became available this winter.
ALM Best practise
Working this way is best practise for Application Lifecycle Management (ALM) and makes it possible to deploy portals to dev, test and production in a painful and fluent way.
Powershell with Portals CLI
We use PowerShell to handle Portals commands to authenticate, create auth profiles, download and upload portal content. This enables us to use Visual Studio Code when working with Portals code.