{"id":"horsenuggets/dotenv-luau","name":"dotenv-luau","scope":"horsenuggets","platform":"roblox","description":"A dotenv parser implemented in Luau.","version":"0.1.5","latest":"0.1.5","versions":["0.0.1","0.0.2","0.1.1","0.1.2","0.1.3","0.1.4","0.1.5"],"license":"MIT","licenseRating":"safe","licenseCaveats":[],"licenseVerified":true,"dependencies":{"horsenuggets/t":{"version":"^3.1.1-horse.0.4","alias":"t"}},"integrity":"8ad369fe59ab036f2ea91793e6fa8c5186bc12313f1fa0e18e16d8f9c75a537e","likes":0,"downloads":0,"install":"forest install horsenuggets/dotenv-luau","url":"https://forest.dev/p/roblox/horsenuggets/dotenv-luau","files":"https://api.forest.dev/ai/package/roblox/horsenuggets/dotenv-luau/files","readme":"# dotenv-luau\n\nA dotenv parser implemented in Luau.\n\n## Installation\n\nAdd to your `wally.toml`:\n\n```toml\n[dependencies]\nDotenv = \"horsenuggets/dotenv-luau@0.1.5\"\n```\n\nThen run:\n\n```sh\nwally install\n```\n\n## Usage\n\n### Parsing a string\n\n```luau\nlocal Dotenv = require(\"@packages/Dotenv\")\n\nlocal env = Dotenv.parse([[\nDATABASE_URL=postgres://localhost:5432/mydb\nAPI_KEY=\"my-secret-key\"\nDEBUG=true\n]])\n\nprint(env.DATABASE_URL) -- postgres://localhost:5432/mydb\nprint(env.API_KEY)      -- my-secret-key\nprint(env.DEBUG)        -- true\n```\n\n### Loading from a file (Lune only)\n\n```luau\nlocal Dotenv = require(\"@packages/Dotenv\")\n\n-- Load from .env file and set environment variables\nDotenv.load()\n\n-- Load from a custom path\nDotenv.load(\".env.local\")\n```\n\n## Features\n\n- Parses standard `.env` file format\n- Supports double-quoted and single-quoted values\n- Supports multiline values with double quotes\n- Handles values containing `=` characters\n- Normalizes line endings (CRLF to LF)\n- `Dotenv.load()` function for Lune to read files and set `process.env`\n\n## API\n\n### `Dotenv.parse(str: string): { [string]: string }`\n\nParses a dotenv-formatted string and returns a table of key-value pairs.\n\n### `Dotenv.load(path: string?)`\n\nReads a `.env` file and sets the values in `process.env`. Only available when running in Lune.\n\n- `path` - Path to the env file (default: `\".env\"`)\n","readmeTruncated":false}