{"id":15967687,"url":"https://github.com/tinchodias/pharo-dotenv","last_synced_at":"2025-04-04T14:24:33.199Z","repository":{"id":84204097,"uuid":"159230825","full_name":"tinchodias/pharo-dotenv","owner":"tinchodias","description":"Pharo package that loads environment variables from a .env file into the process environment variables.","archived":false,"fork":false,"pushed_at":"2018-11-26T21:53:37.000Z","size":8,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-02-10T00:16:12.839Z","etag":null,"topics":["pharo"],"latest_commit_sha":null,"homepage":null,"language":"Smalltalk","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/tinchodias.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-11-26T20:49:01.000Z","updated_at":"2018-11-26T22:00:05.000Z","dependencies_parsed_at":"2023-05-23T22:45:24.814Z","dependency_job_id":null,"html_url":"https://github.com/tinchodias/pharo-dotenv","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tinchodias%2Fpharo-dotenv","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tinchodias%2Fpharo-dotenv/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tinchodias%2Fpharo-dotenv/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tinchodias%2Fpharo-dotenv/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tinchodias","download_url":"https://codeload.github.com/tinchodias/pharo-dotenv/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247191831,"owners_count":20898994,"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":["pharo"],"created_at":"2024-10-07T18:40:54.040Z","updated_at":"2025-04-04T14:24:33.172Z","avatar_url":"https://github.com/tinchodias.png","language":"Smalltalk","funding_links":[],"categories":[],"sub_categories":[],"readme":"# pharo-dotenv\nPharo package that loads environment variables from a .env file into the process environment variables.\n\nIt is a basic port of the [nodejs dotenv module](https://github.com/motdotla/dotenv).\n\n## Install\n\nIn Pharo 6.1 or 7.0, add this repository to Iceberg and load the only package. It has no Metacello baseline for the moment.\n\n## Use\n\n### Basic\n\nIf you have a `.env` file in the `FileSystem workingDirectory` with this content:\n~~~\nVAR1=var1\nVAR2=var2\n~~~\n\nThen, you can read values with:\n\n~~~\nDotenv new variablesDictionary.\n\u003e\u003e\u003e \"a Dictionary('VAR1'-\u003e'var1' 'VAR2'-\u003e'var2' )\"\n~~~\n\n### Apply to process environment variables\n\nThis is the scenario that the original dotenv project considers. \n\nFor example, if you run your web system in 2 different contexts:\n* production: the environment variables USERNAME and PASSWORD define some credentials.\n* development: the `.env` file defines both variables as in the Basic example shown above.\n\nYou can equally access the variables this way:\n\n~~~\nDotenv new config.\n\ncredentials := Credentials\n    username: (OSPlatform current environment at: 'USERNAME')\n    password: (OSPlatform current environment at: 'PASSWORD').\n~~~\n\n\n### Specify a custom path\n\nThis example works if you have the variables defined in `~/.credentials`:\n\n~~~\nDotenv new\n  path: (FileLocator home / '.credentials') asFileReference;\n  config.\n~~~\n\n\n### More\n\nBrowse `DotenvTest` class for more usage details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftinchodias%2Fpharo-dotenv","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftinchodias%2Fpharo-dotenv","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftinchodias%2Fpharo-dotenv/lists"}