major vars manages the environment variables of the app in the current directory. Run these commands from inside the app’s folder.
Variables are scoped per environment (for example development, staging, production). Every subcommand targets your current environment unless you pass --env. To change your current environment, use major resource env.
major vars list
List all variables for the environment. Values are masked by default.major vars get
Print one variable’s raw value to stdout, with no prefix. Exits non-zero if the key does not exist or has no value in the environment.major vars set
Create or update one variable in the environment. Values in other environments are kept. Only the first= separates the key from the value, so values can contain =.
major vars unset
Remove a variable. By default only the value in the target environment is removed. Asks for confirmation unless you pass--yes.
major vars pull
Download all variables for the environment into a local dotenv file. The file includes your own variables and the platform-managedMAJOR_* system variables needed for local development. The target file is overwritten. If it is inside a git repository and not already ignored, it is added to the repository’s .gitignore.