Convert INI to ENV
Turn INI 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 INI files on the dialor turn it to pick what to do
INI settings as environment variables.Each top-level key becomes a KEY=value line in one 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.
Text with spaces or symbols is double-quoted with escapes. A null value leaves the value empty.
Lists and nested values
Nested objects and lists become quoted JSON text. The value holds the whole structure as JSON.
A top-level list numbers its entries from 0 under items. The name of the first entry becomes items_0_name.
Going the other way
To turn KEY=value lines back into sections, use ENV to INI.
INI and ENV.What each format is.
The formats
INI
Sections of key and value pairs, the settings format of Windows and many tools.
- Extensions
- .ini .cfg
- MIME type
- text
/x -ini - 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 INI to ENV conversion through the API, for your app or your agent.
$ cv convert report.ini report.env$ cv convert report.ini report.envQuestions.What people ask about INI to ENV.
They are turned into underscores, so the name is a valid variable name.
Text with spaces or symbols is double-quoted with escapes.
They become quoted JSON text in the value.
A top-level list numbers its entries from 0 under items. The name of the first entry becomes items_0_name.