A Crystal shard for loading environment variables from .env files into your application.
Dotenv is a Crystal shard that loads environment variables from `.env` files into your application's runtime environment. It solves the problem of hardcoding configuration values by externalizing them into files that can be easily managed and kept out of version control. This is especially useful for keeping secrets like API keys and database credentials secure.
Crystal developers building applications that require environment-specific configuration, such as web servers, CLI tools, or microservices.
Developers choose Dotenv because it provides a simple, idiomatic way to handle environment configuration in Crystal, aligning with best practices from the Twelve-Factor App methodology. It's lightweight, easy to integrate, and helps maintain clean, secure codebases.
Loads ".env" files
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Integration is straightforward—just add the shard and call Dotenv.load, as shown in the installation and usage examples, making it easy to adopt in any Crystal project.
Handles comments starting with '#' and skips empty lines, improving .env file readability and organization, as demonstrated in the example file in the README.
Allows loading from files other than the default '.env' via the load method, providing flexibility for different environments or setups, per the basic example.
Promotes the Twelve-Factor App methodology by externalizing configuration, enhancing security and portability, which is emphasized in the project philosophy.
Only loads variables without built-in validation, type conversion, or error handling for malformed files, requiring developers to implement additional checks manually.
The README is brief and lacks detailed API examples or troubleshooting guides, relying on users to explore the source code or external docs for advanced use cases.
Primarily maintained by a single contributor (Gusztáv Szikszai), which could lead to slower updates or project abandonment if not actively supported over time.