Mullvad is a VPN that allows it to be connected on the command line. To set it up simply install Mullvad and close and reopen any terminal sessions.
Set your account
mullvad account login <account number>
Show account info
mullvad account get
List device names in the account
mullvad account list-devices
List server locations
mullvad relay list
Select a location
mullvad relay set location se mma
Connect
mullvad connect
Disconnect
mullvad disconnect
Reconnect
mullvad reconnect
Force an update of the server location list
mullvad relay update
Check your connection status
mullvad status -v
Use OpenVPN over TCP
mullvad relay set tunnel-protocol openvpn
mullvad relay set tunnel openvpn --protocol tcp
Auto-connect on start-up
mullvad auto-connect set on
mullvad auto-connect set off
Enable LAN access
mullvad lan set allow