When multiple applications and environments are available, you can switch from the current application or environment to another application or environment.

$ wpctl env:list
1) Web3-env
2) Web2-env

Run the wpctl env:use + Environment name or ID command, for example, wpctl env:use Webxfile3-env, to switch from the current environment to the specified environment.

$ wpctl env:use Web***
$ wpctl env:info
EnvName:  Web***
EnvId:    we-***
AppId:    wa-***
AppName:  Webxfile2
Status:   RUNNING
Stack:    Alibaba Cloud Linux 2.1903 running Tomcat 8.5 Java 8
CreateUser:   ***
CreateTime:   2019-04-20 03:34:21 PM
UpdateUser:   ***
UpdateTime:   2019-04-20 03:34:21 PM

Run the wpctl app:use + Application name or ID command to switch from the current application to the specified application.

$ wpctl app:list
1) app2
2) app1
$ webxctl app:use app2
Application app2 setted, no environment chosen

Alternatively, when running the env:use command, you can specify the --app flag to switch to the specified application and environment.

$ wpctl env:use Webxfile3-env --app Webxfile2