caarlos0/env

A simple, zero-dependencies library to parse environment variables into structs

View on GitHub ↗Jump to charts ↓

Summary Information

Updated 3 minutes ago
Added to GitGenius on September 10th, 2026
Created on July 28th, 2015
Open Issues & Pull Requests: 31 (+0)
GitHub issues: Enabled
Number of forks: 284
Total Stargazers: 6,308 (+0)
Total Subscribers: 24 (+0)

Repository Insights (GitGenius)

Median issue/PR response: 2.0 days
Mean response time: 45.5 days
90th percentile: 64.7 days
Tracked items: 20

Charts & Analytics

Fetching additional details & charts...

Issue Activity (beta)

Open issues: 15
New in 7 days: 0
Closed in 7 days: 0
Avg open age: 332 days
Stale 30+ days: 14
Stale 90+ days: 11

Recent activity

Opened in 7 days: 0
Closed in 7 days: 0
Comments in 7 days: 0
Events in 7 days: 0

Top labels

  • question (1)

Most active issues this week

No issue events were indexed in the last 7 days.

Detailed Description

env is a Go library that parses environment variables into structs.

The library solves the problem of mapping environment variables to application configuration by using struct tags to declare which fields should be populated from the environment. Rather than manually reading and converting individual environment variables throughout an application, developers define a struct with tagged fields and pass it to the library, which handles type conversion and population automatically. This approach centralizes configuration schema in a single place and reduces boilerplate code.

The tool suits Go applications that rely on environment-based configuration, particularly those deployed in containerized or cloud environments where environment variables are the standard configuration mechanism. It works well for projects of any size that want to avoid manual environment variable parsing and type conversion. The zero-dependency design means adding it to a project introduces no additional transitive dependencies, which is valuable for applications with strict dependency constraints or those concerned with supply chain security.

The project maintains a steady stream of contributions addressing edge cases and feature requests, with pull requests being reviewed and merged regularly. The maintainer actively responds to issues and incorporates user feedback into the codebase. The project has demonstrated longevity and stability through multiple major versions while maintaining backward compatibility where possible. Development activity shows consistent attention to both bug fixes and enhancements that expand the library's capabilities for handling complex configuration scenarios.