[feat] Render to dotenv-style formats #95

Open
opened 2025-12-30 01:20:43 +01:00 by adam · 3 comments
Owner

Originally created by @linux-china on GitHub (Mar 1, 2024).

.env accepted by lots of frameworks, and easy to be converted to environment variables.

For example, pkl as following:

name="joe"
server {
   host = "localhost"
  port =8080
}

and the pkl could be rendered to dotenv-style:

NAME="joe"
SERVER_HOST="localhost"
SERVER_PORT=8080
Originally created by @linux-china on GitHub (Mar 1, 2024). `.env` accepted by lots of frameworks, and easy to be converted to environment variables. For example, pkl as following: ``` name="joe" server { host = "localhost" port =8080 } ``` and the pkl could be rendered to dotenv-style: ``` NAME="joe" SERVER_HOST="localhost" SERVER_PORT=8080 ```
Author
Owner

@LloydNA commented on GitHub (Mar 2, 2024):

I'll work on this issue

@LloydNA commented on GitHub (Mar 2, 2024): I'll work on this issue
Author
Owner

@bioball commented on GitHub (Mar 2, 2024):

FYI--it's possible to define an in-language renderer; a renderer doesn't need to be part of the standard library.

For an example of an in-language renderer, see pkl.toml

@bioball commented on GitHub (Mar 2, 2024): FYI--it's possible to define an in-language renderer; a renderer doesn't need to be part of the standard library. For an example of an in-language renderer, see [pkl.toml](https://github.com/apple/pkl-pantry/blob/main/packages/pkl.toml/toml.pkl)
Author
Owner

@jtagrgh commented on GitHub (Mar 18, 2024):

@LloydNA Is this currently a WIP?

@jtagrgh commented on GitHub (Mar 18, 2024): @LloydNA Is this currently a WIP?
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/pkl#95