Manages your project's environment variables on Wix's servers.
If you don't specify a subcommand, wix env runs the pull subcommand.
The following table lists the subcommands available for the wix env command:
| Subcommand | Description |
|---|---|
pull | Pulls all your environment variables from Wix's servers and merges them into the .env.local file. |
set | Sets an environment variable on Wix's servers. |
remove | Removes an environment variable from Wix's servers. |
Pulls all your environment variables from Wix's servers and merges them into the .env.local file.
The pulled variables include any shared by your project's collaborators. In Wix-managed headless projects, they also include secrets added to the project's Secrets Manager. For more information, see Share Environment Variables with Collaborators.
Sets an environment variable on Wix's servers.
Variables you set are stored on Wix servers and shared with your project's collaborators, who retrieve them by running wix env pull. In Wix-managed headless projects, these variables aren't shown in the Secrets Manager, which displays only secrets added through the dashboard.
The following flags are available for the set subcommand:
| Flag | Description |
|---|---|
--key <key> | (Required) Name of the variable. |
--value <value> | (Required) Value of the variable. |
Removes an environment variable from Wix's servers.
Removing a variable removes it for all collaborators on your project. It doesn't delete the variable from your local .env.local file.
The following flag is available for the remove subcommand:
| Flag | Description |
|---|---|
--key <key> | (Required) Name of the variable. |
Last updated: 10 November 2026