{"id":15059614,"url":"https://github.com/tsfoster/elm-envfile","last_synced_at":"2026-01-02T16:11:56.874Z","repository":{"id":57674716,"uuid":"160386137","full_name":"TSFoster/elm-envfile","owner":"TSFoster","description":"Parser and encoder for envfiles in Elm","archived":false,"fork":false,"pushed_at":"2019-07-09T22:07:30.000Z","size":40,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-15T04:12:32.079Z","etag":null,"topics":["elm","elm-lang","elmlang","envfile","environment-variables"],"latest_commit_sha":null,"homepage":"https://package.elm-lang.org/packages/TSFoster/elm-envfile/latest/","language":"Elm","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/TSFoster.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-12-04T16:22:04.000Z","updated_at":"2020-04-06T10:31:15.000Z","dependencies_parsed_at":"2022-09-02T14:23:16.447Z","dependency_job_id":null,"html_url":"https://github.com/TSFoster/elm-envfile","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TSFoster%2Felm-envfile","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TSFoster%2Felm-envfile/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TSFoster%2Felm-envfile/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TSFoster%2Felm-envfile/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/TSFoster","download_url":"https://codeload.github.com/TSFoster/elm-envfile/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243681083,"owners_count":20330155,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["elm","elm-lang","elmlang","envfile","environment-variables"],"created_at":"2024-09-24T22:45:59.613Z","updated_at":"2026-01-02T16:11:56.846Z","avatar_url":"https://github.com/TSFoster.png","language":"Elm","funding_links":[],"categories":[],"sub_categories":[],"readme":"# elm-envfile\n\nParser and encoder for envfile file format, following simple definition provided\nby [Docker](https://docs.docker.com/compose/env-file/).\n\n## Examples\n\n### Parsing\n\n\n```elm\nimport Dict\nimport Envfile\nimport Parser\n\n\n[ \"linesInThisFile=7\"\n, \"numberOfDefinitions=5\"\n, \"containsBlankLines=TRUE\"\n, \"\"\n, \"# Commented line\"\n, \"ENV=development\"\n, \"Thing=\"\n]\n    |\u003e String.join \"\\n\"\n    |\u003e Parser.run Envfile.parser\n--\u003e Ok \u003c| Dict.fromList\n--\u003e     [ (\"linesInThisFile\", \"7\")\n--\u003e     , (\"numberOfDefinitions\", \"5\")\n--\u003e     , (\"containsBlankLines\", \"TRUE\")\n--\u003e     , (\"ENV\", \"development\")\n--\u003e     , (\"Thing\", \"\")\n--\u003e     ]\n```\n\n```elm\nimport Envfile\nimport Parser\n\n\n[ \"containsInvalidLine=TRUE\"\n, \"\"\n, \"here\"\n, \"\"\n, \"# Commented line\"\n, \"ENV=development\"\n]\n    |\u003e String.join \"\\n\"\n    |\u003e Parser.run Envfile.parser\n--\u003e Err [ { col = 5, row = 4, problem = Parser.ExpectingSymbol \"=\" } ]\n-- (No idea why row = 4, not 3!)\n```\n\n\n### Encoding\n\n```elm\nimport Dict\nimport Envfile\n\n\n[ (\"this is not a valid variable name!\", \"so it won’t be included\")\n, (\"thisIsThough\", \"So it will, and the newline will be escaped too\\n!\")\n]\n    |\u003e Dict.fromList\n    |\u003e Envfile.encode\n--\u003e \"thisIsThough=So it will, and the newline will be escaped too\\\\n!\"\n\n```\n\n```elm\nimport Dict\nimport Envfile\n\n\n[ (\"MAGIC_NUMBER\", \"346\")\n, (\"GREETING\", \"Hello world\")\n, (\"API_KEY\", \"239847dflkjw34o87fjsdfkuy3dj\")\n]\n    |\u003e Dict.fromList\n    |\u003e Envfile.encode\n    |\u003e String.lines\n    |\u003e List.sort\n--\u003e [ \"API_KEY=239847dflkjw34o87fjsdfkuy3dj\"\n--\u003e , \"GREETING=Hello world\"\n--\u003e , \"MAGIC_NUMBER=346\"\n--\u003e ]\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftsfoster%2Felm-envfile","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftsfoster%2Felm-envfile","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftsfoster%2Felm-envfile/lists"}