Key value store and forge variable list difference

Hello,
I m trying to learn the good way to develop in forge and I discovered what I see as 2 ways to store env variables : Key value store and forge variable list.
KVS is available in the developer console and forge variable list is set in CLI.
I am wondering what is the difference between these concepts and what is the proper way to store env variables in Forge?

Have a good day,
Matys

Hi @MatysCHAMPEYROL

The most significant difference is that KVS is localized to a site installation, while Forge variables are localized to a Forge environment.

For example, suppose the Staging version of your Forge app is installed in two test sites: my-test-site1.atlassian.net and my-test-site2.atlassian.net. The two sites will share the same Forge variable values, but they will have different KVS values. The Forge variable values are associated with the entire Staging environment, while the KVS values are unique to each site.

Use Forge variables. That is explicitly recommended in the documentation:

The forge variables set command allows you to set app-specific environment variables for each environment in which the app is run.

In addition to what AaronMorris1 said.
The KVS can be written from your code. So they can, for example be used to store settings the user set in your app.