dotenv
Version, currently 1.0.09 versions
github.com/gdotdesign/cr-dotenv
Loads ".env" files
99 stars
11 dependents
License: MIT
Installation
# Add this to your shard.yml
dependencies:
dotenv:
github: gdotdesign/cr-dotenv
version: ~> 1.0.0Then run:
shards installshard.yml
- Crystal
>= 0.34.0, < 2.0.0- License
- MIT
- Author
- Gusztáv Szikszai <guszti5@hotmail.com>
Dependencies
This version declares no dependencies.
README
# Dotenv

Loads `.env` file.
## Installation
Add this to your application's `shard.yml`:
```yaml
dependencies:
dotenv:
github: gdotdesign/cr-dotenv
```
## Usage
### Dotenv file example
```
# Comments can be included for context
#
MY_VARIABLE=my-value
# Empty Lines are also ignored
#
ANOTHER_VAR=awesome-value
```
### Basic example
To load a file named `.env-file`:
```crystal
require "dotenv"
# The default file is ".env"
Dotenv.load ".env-file"
```
See the API docs for more examples.
## Contributing
1. Fork it ( https://github.com/gdotdesign/cr-dotenv/fork )
2. Create your feature branch (git checkout -b my-new-feature)
3. Commit your changes (git commit -am 'Add some feature')
4. Push to the branch (git push origin my-new-feature)
5. Create a new Pull Request
## Contributors
- [[gdotdesign]](https://github.com/[gdotdesign]) Gusztáv Szikszai - creator, maintainer
- [[bonyiii]](https://github.com/[bonyiii])
- [[kriskova]](https://github.com/kriskova)
- [[neovintage]](https://github.com/[neovintage]) Rimas Silkaitis
- [[rodrigopinto]](https://github.com/[rodrigopinto]) Rodrigo Pinto
Documentation
Built from the current release. The first visit to a release nobody has asked for starts its build.
Links
This release
- Version
1.0.0- Tagged
- Mar 24, 2021
- Commit
cb70a7111043- Crystal
>= 0.34.0, < 2.0.0- Indexed
- yes
Dependents
Repository
github.com/gdotdesign/cr-dotenv
Metadata
- Created
- Aug 12, 2026
- Updated
- Aug 12, 2026
- Synced
- Aug 12, 2026
- Versions
- 9