# joho/godotenv

A Go port of Ruby's dotenv library (Loads environment variables from .env files)

Repository: https://github.com/joho/godotenv
Canonical: https://ross.abutalabs.com/products/godotenv
Homepage: http://godoc.org/github.com/joho/godotenv
Language: Go
License: MIT
License Family: permissive
Topics: dotenv, environment-variables, go, golang
Last push: 2026-08-04T09:43:36+00:00

## Health v2 (maintenance only)
Score: 84/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 96, release rhythm 60, longevity 100
- inputs: {"age_days": 4782, "days_push": 29, "days_rel": 101, "gap_med": 45, "n_releases_24m": 4}
- flags: prerelease_only
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 10601, forks 462 (observed 2026-08-28T04:10:42.519492+00:00)

## What it is
A Go port of Ruby's dotenv library that loads environment variables from .env files into the process environment. It can be used as a Go library or as a standalone CLI command.

## Use cases
- load environment variables from a .env file in a Go app
- manage local development configuration for a twelve-factor app
- parse .env files into a map in Go
- run a Go binary with env vars from a file
- autoload .env configuration on import

## When to choose
- you write Go apps and want dotenv-style .env loading
- you need a simple, battle-tested env file parser with wide adoption
- you want both a library and a CLI for loading env files

## When to avoid
- you need advanced config management with validation or schema support
- your platform is not Go
- you need secrets encryption or a full secrets manager

## Facets
- artifact type: library
- maturity: stable
- function: configuration-management, developer-tools, cli
- domain: developer-tools, backend
- platform: go, cross-platform, cli
- tags: dotenv, environment-variables, env-files, twelve-factor, golang, devops

## Member repositories
- joho/godotenv (main) score 84

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:10:42.519492+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-29T17:18:29.314939+00:00, confidence not recorded.
  - readme: https://github.com/joho/godotenv (fetched 2026-08-28T04:10:42.519492+00:00, sha b715e2b8422f)
  - homepage: http://godoc.org/github.com/joho/godotenv (fetched 2026-08-29T08:17:39.611846+00:00, sha cbb22eb2b7b6)
  - site_page: https://pkg.go.dev/about (fetched 2026-08-29T08:17:39.616602+00:00, sha 757852027879)
  - site_page: https://pkg.go.dev/github.com/joho/godotenv (fetched 2026-08-29T08:17:39.614647+00:00, sha fd9e19470dd6)
  - site_page: https://go.dev/project (fetched 2026-08-29T08:17:39.618377+00:00, sha d5ca00bb378b)
- Data as of 2026-08-30T08:39:29.467469+00:00.
