Convert ENV to YAML
Turn ENV files into YAML. Each KEY=value line becomes a key in file order; export prefixes, quotes, escapes and trailing comments are handled, and unquoted numbers and booleans are typed.
Converted in an isolated sandbox on our serversDeleted after 24 hours
Drop ENV files on the dialor turn it to pick what to do
Your .env file as YAML keys.Each KEY=value line becomes a key, in the same order as the file.
What you get
One YAML file. Every KEY=value line becomes a key, and the keys stay in the order they have in the ENV file.
Export prefixes, quotes, escapes and trailing comments are handled. Unquoted numbers and booleans are typed, so they are written as numbers and booleans in YAML, not as text.
How special cases are written
A key with no value becomes null. A key that appears more than once becomes a list of its values.
References such as ${VAR} stay as written. They are not looked up or filled in, so the YAML holds the same text the ENV file held.
Going the other way
To turn YAML back into KEY=value lines, use YAML to ENV. The conversion has no options to set.
ENV and YAML.What each format is.
The formats
Dotenv
KEY=value lines that hold environment variables for an app.
- Extensions
- .env
- MIME type
- text
/x -env - Kind
- Text and data
YAML
YAML configuration and data files.
- Extensions
- .yaml .yml
- MIME type
- application
/yaml - Kind
- Text and data
In your code.The same ENV to YAML conversion through the API, for your app or your agent.
$ cv convert report.env report.yaml$ cv convert report.env report.yamlQuestions.What people ask about ENV to YAML.
Yes. Keys appear in the YAML in the same order as the lines in the ENV file.
Yes, when they are unquoted. Those values are typed as numbers and booleans in the YAML.
A repeated key becomes a list. The list holds the values given for that key.
No. They stay as written in the YAML.