# bkeepers/dotenv

A Ruby gem to load environment variables from `.env`.

Repository: https://github.com/bkeepers/dotenv
Canonical: https://ross.abutalabs.com/products/bkeepers-dotenv
Language: Ruby
License: MIT
License Family: permissive
Topics: dotenv, ruby
Last push: 2026-06-22T16:42:21+00:00

## Health v2 (maintenance only)
Score: 76/100 (v2, computed 2026-09-02T17:46:02.011165+00:00)
- activity 88, release rhythm 47, longevity 100
- inputs: {"age_days": 5153, "days_push": 72, "days_rel": 273, "gap_med": 44.5, "n_releases_24m": 7}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 6762, forks 514 (observed 2026-08-28T04:09:48.380879+00:00)

## What it is
A Ruby gem that loads environment variables from a `.env` file into `ENV` at application bootstrap, primarily for development and test environments. It integrates automatically with Rails and supports multiple env files, overwriting control, and ENV restore in tests.

## Use cases
- load environment variables from a .env file in ruby
- manage app secrets in development without setting them manually
- keep configuration out of source code following twelve-factor
- load .env automatically in a rails app
- restore ENV state between tests
- use multiple env files with precedence

## When to choose
- you're building a Ruby, Rails, or Sinatra app and want .env support
- you need dev/test environment configuration without overwriting real env vars
- you want automatic ENV restoration in test suites

## When to avoid
- you're not using Ruby
- you need secrets management in production rather than a dev convenience
- you need encrypted or cloud-based secret storage

## Facets
- artifact type: library
- maturity: stable
- function: configuration-management, developer-tools
- domain: developer-tools, web-development, backend
- platform: ruby, cli
- tags: dotenv, environment-variables, twelve-factor, rails, env-file

## Member repositories
- bkeepers/dotenv (main) score 76

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:09:48.380879+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:42:34.004390+00:00, confidence not recorded.
  - readme: https://github.com/bkeepers/dotenv (fetched 2026-08-28T04:09:48.380879+00:00, sha 67a7e34fcf3c)
- Data as of 2026-08-30T08:39:29.467469+00:00.
