nmcli - NetworkManager command line tool

# list all connections
nmcli con

# show connection details
nmcli con show 'MY_CONNECTION_1'

# start vpn from command line (ubuntu)
nmcli con up id VPN_NAME

nmcli dev wifi list

nmcli con add con-name MY-WIFI ifname wlan0 type wifi ssid MY-WIFI
nmcli con modify MY-WIFI wifi-sec.key-mgmt wpa-psk
nmcli con modify MY-WIFI wifi-sec.psk 'pass1234'

Autostart delayed VPN connection
# /home/foo/.config/autostart/vpn.desktop
[Desktop Entry]
Type=Application
Exec=nmcli con up VPN1
Hidden=false
NoDisplay=false
X-GNOME-Autostart-Delay=3
X-GNOME-Autostart-enabled=true
Name=Auto connect to VPN1

Links
https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/7/html/Networking_Guide/sec-Using_the_NetworkManager_Command_Line_Tool_nmcli.html
https://www.mankier.com/7/nmcli-examples