Convert TOML to ENV
Turn TOML files into Dotenv. Each top-level key becomes a KEY=value line, with characters a variable name cannot hold turned into underscores, and a top-level list numbers its entries from 0 under items, so the name of the first entry becomes items_0_name.
Converted in an isolated sandbox on our serversDeleted after 24 hours
Drop TOML files on the dialor turn it to pick what to do
TOML settings as KEY=value lines.Each top-level key becomes one line in a single ENV file.
What you get
One ENV file with a KEY=value line for each top-level key. Characters that a variable name cannot hold are turned into underscores in the key.
Text with spaces or symbols is double-quoted with escapes. A null value leaves the value empty.
Lists and nested tables
A top-level list numbers its entries from 0 under items. The name of the first entry becomes items_0_name.
Nested objects and lists become quoted JSON text on one line.
What it leaves behind
Comments are dropped. Dates and times become ISO 8601 text.
To go the other way, use ENV to TOML.
TOML and ENV.What each format is.
The formats
TOML
TOML configuration files, the format of Cargo and pyproject.
- Extensions
- .toml
- MIME type
- application
/toml - Kind
- Text and data
Dotenv
KEY=value lines that hold environment variables for an app.
- Extensions
- .env
- MIME type
- text
/x -env - Kind
- Text and data
In your code.The same TOML to ENV conversion through the API, for your app or your agent.
$ cv convert report.toml report.env$ cv convert report.toml report.envQuestions.What people ask about TOML to ENV.
Each top-level key becomes a KEY. Characters a variable name cannot hold are turned into underscores.
Nested objects and lists become quoted JSON text as the value of the line.
No. Comments in the TOML file are dropped.
It stops with input_corrupted when the TOML file could not be parsed.