{"id":29569965,"url":"https://github.com/followtheprocess/dotenv","last_synced_at":"2025-07-19T02:07:39.648Z","repository":{"id":304866965,"uuid":"1020188435","full_name":"FollowTheProcess/dotenv","owner":"FollowTheProcess","description":"Load environment variables from a .env file","archived":false,"fork":false,"pushed_at":"2025-07-16T14:18:17.000Z","size":117,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-07-16T14:18:40.377Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/FollowTheProcess.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,"zenodo":null}},"created_at":"2025-07-15T13:28:38.000Z","updated_at":"2025-07-16T14:18:20.000Z","dependencies_parsed_at":"2025-07-16T20:16:15.774Z","dependency_job_id":"1ba30551-c5ec-4f92-9a84-75664e34b0e5","html_url":"https://github.com/FollowTheProcess/dotenv","commit_stats":null,"previous_names":["followtheprocess/dotenv"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/FollowTheProcess/dotenv","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FollowTheProcess%2Fdotenv","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FollowTheProcess%2Fdotenv/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FollowTheProcess%2Fdotenv/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FollowTheProcess%2Fdotenv/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/FollowTheProcess","download_url":"https://codeload.github.com/FollowTheProcess/dotenv/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FollowTheProcess%2Fdotenv/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265872778,"owners_count":23842250,"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":"2025-07-19T02:07:39.114Z","updated_at":"2025-07-19T02:07:39.640Z","avatar_url":"https://github.com/FollowTheProcess.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# dotenv\n\n[![License](https://img.shields.io/github/license/FollowTheProcess/dotenv)](https://github.com/FollowTheProcess/dotenv)\n[![Go Reference](https://pkg.go.dev/badge/go.followtheprocess.codes/dotenv.svg)](https://pkg.go.dev/go.followtheprocess.codes/dotenv)\n[![Go Report Card](https://goreportcard.com/badge/github.com/FollowTheProcess/dotenv)](https://goreportcard.com/report/github.com/FollowTheProcess/dotenv)\n[![GitHub](https://img.shields.io/github/v/release/FollowTheProcess/dotenv?logo=github\u0026sort=semver)](https://github.com/FollowTheProcess/dotenv)\n[![CI](https://github.com/FollowTheProcess/dotenv/workflows/CI/badge.svg)](https://github.com/FollowTheProcess/dotenv/actions?query=workflow%3ACI)\n[![codecov](https://codecov.io/gh/FollowTheProcess/dotenv/branch/main/graph/badge.svg)](https://codecov.io/gh/FollowTheProcess/dotenv)\n\nLoad environment variables from a `.env` file\n\n\u003e [!WARNING]\n\u003e **dotenv is in early development and is not yet ready for use**\n\n![caution](./docs/img/caution.png)\n\n## Installation\n\n```shell\ngo get go.followtheprocess.codes/dotenv@latest\n```\n\n## Quickstart\n\nGiven `.env` file like this:\n\n```bash\n# This is a comment and is ignored by the parser completely\nNUMBER_OF_THINGS=123 # Comments can also go on lines\nUSERNAME=mysuperuser\n\n# Command substitution\nAPI_KEY=$(op read op://MyVault/SomeService/api_key)\n\n# Variable interpolation\nEMAIL=${USER}@email.com # We added $USER above\nCACHE_DIR=${HOME}/.cache # Can also reference existing system env vars\nDATABASE_URL=\"postgres://${USER}@localhost/my_database\"\n\n# Single quotes force the string to be treated as literal\n# no interpolation or command substitution will happen here\nLITERAL='${USER} should show up literally'\n\n# Multiline strings can be declared with \"\"\". Leading and trailing\n# whitespace will be trimmed allowing for nicer formatting.\nMANY_LINES=\"\"\"\nThis is a lot of text with multiple lines\n\nYou could use this to store the contents of a file or\nan X509 cert, an SSH key etc.\n\"\"\"\n\n# Escape sequences work as you'd expect\nESCAPE_ME=\"Newline\\n and a tab\\t etc.\"\n\n# You can even use the export keyword to retain compatibility with e.g. bash\nexport SOMETHING=yes\n```\n\nYou can parse and load it from Go code like this:\n\n```go\npackage main\n\nimport (\n\t\"fmt\"\n\t\"os\"\n\n\t\"go.followtheprocess.codes/dotenv\"\n)\n\nfunc main() {\n\t// You can also pass in a bunch of options to Load to configure\n\t// its behaviour like load a specific file, overwrite existing system\n\t// environment variables or not etc.\n\tif err := dotenv.Load(); err != nil {\n\t\tfmt.Fprintf(\"uh oh: %v\\n\", err)\n\t\tos.Exit(1)\n\t}\n\n\tfmt.Printf(\"Success! os.Environ is now: %v\\n\", os.Environ)\n}\n```\n\n### Credits\n\nThis package was created with [copier] and the [FollowTheProcess/go-template] project template.\n\n[copier]: https://copier.readthedocs.io/en/stable/\n[FollowTheProcess/go-template]: https://github.com/FollowTheProcess/go-template\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffollowtheprocess%2Fdotenv","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffollowtheprocess%2Fdotenv","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffollowtheprocess%2Fdotenv/lists"}