{"id":18800118,"url":"https://github.com/heinthanth/parsenv-node","last_synced_at":"2026-01-03T10:30:15.191Z","repository":{"id":57319665,"uuid":"302922171","full_name":"heinthanth/parsenv-node","owner":"heinthanth","description":"Edit, Save or Load variables from .env ( For Nodejs )","archived":false,"fork":false,"pushed_at":"2020-10-11T07:53:03.000Z","size":6,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2024-12-29T18:56:06.472Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"JavaScript","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/heinthanth.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":"2020-10-10T14:40:03.000Z","updated_at":"2020-10-11T07:54:07.000Z","dependencies_parsed_at":"2022-08-26T01:10:13.627Z","dependency_job_id":null,"html_url":"https://github.com/heinthanth/parsenv-node","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/heinthanth%2Fparsenv-node","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/heinthanth%2Fparsenv-node/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/heinthanth%2Fparsenv-node/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/heinthanth%2Fparsenv-node/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/heinthanth","download_url":"https://codeload.github.com/heinthanth/parsenv-node/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239729044,"owners_count":19687448,"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":[],"created_at":"2024-11-07T22:17:42.411Z","updated_at":"2026-01-03T10:30:15.144Z","avatar_url":"https://github.com/heinthanth.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ParsEnv\n\n[![License: MIT](https://img.shields.io/badge/License-MIT-green.svg)](LICENSE)\n\nEdit, Save or Load variables from .env ( For Nodejs )\n\n## WHY I CREATE THIS\n\nSince [motdotla/dotenv](https://github.com/motdotla/dotenv) can load variables from .env but can't save modified variables into .env, I just want to create this stuff.\n\n\n## USAGE\n\n### Load variables\n\n```javascript\nconst dotenv = require(\"parsenv\");\n```\n\n### Edit variables\n\n```javascript\nconst dotenv = require(\"parsenv\");\n\ndotenv.edit({ VARIABLE: \"value\", ANOTHER: \"another\" });\n```\n\n### Save variables\n\n```javascript\nconst dotenv = require(\"parsenv\");\n\ndotenv.write();\n```\n\n\n## EXAMPLE\n\n```javascript\nconst parsenv = require(\"../src\");\nconst p = require(\"path\");\n\nparsenv.config();\n\nparsenv.edit({ NAME: \"NAME CHANGED\", ANOTHER_VARIABLE: \"BAZ\" });\n\nparsenv.write({ path: p.join(__dirname, \"../.env.modified\") });\n```\n\n\n## CONFIGURATION\n\n```javascript\nconst dotenv = require(\"parsenv\");\n\nconst config = {\n    path: require('path').resolve(process.cwd(), \".env\") // default\n    encoding: 'utf8' // default\n    debug: false // default\n};\n\n// config can apply to dotenv.config function\ndotenv.config(config);\n\n// also pass it to dotenv.write function\ndotenv.write(config);\n```\n\nThese settings and variables can be modified through `global.parsenv.setting` and `global.parsenv.env`. But recommend `edit` method to change variable\n\n\n## LICENSE\n\n`ParsEnv` is licensed under the MIT license. See [License](LICENSE) for more information.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fheinthanth%2Fparsenv-node","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fheinthanth%2Fparsenv-node","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fheinthanth%2Fparsenv-node/lists"}