Convert ENV to BSON
Turn ENV files into BSON. One BSON document with the same keys in order; a top-level list is wrapped under the key items and any other value under value.
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 dotenv settings as one BSON document.Each key keeps its place and its type in a single binary file.
What you get
One BSON file that holds one document. The keys appear in the same order as in the ENV file.
Integers, floats, booleans, null and text keep their types. Nested objects and lists keep their types too.
How the data is arranged
If the top level is a list, it is wrapped under the key items. Any other top-level value is wrapped under the key value. Either way, the result is a single document.
What changes
Dates stay text. They are not turned into BSON date values.
Integers beyond the signed 64-bit range become floats, so they are stored as floating-point numbers instead of whole numbers.
Going back
To turn a BSON document into KEY=value lines again, use BSON to ENV. To see the other conversions for this format, open every BSON conversion.
ENV and BSON.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
BSON
MongoDB's binary document encoding, JSON with dates and binary fields.
- Extensions
- .bson
- MIME type
- application
/bson - Kind
- Text and data
In your code.The same ENV to BSON conversion through the API, for your app or your agent.
$ cv convert report.env report.bson$ cv convert report.env report.bsonQuestions.What people ask about ENV to BSON.
No. The document has the same keys in the same order as the input.
No. Dates stay text.
It is wrapped under the key items, so the output is still one document.
Integers beyond the signed 64-bit range become floats.