dotenv
Version, currently 1.0.09 versions
github.com/gdotdesign/cr-dotenv
Loads ".env" files
99 stars
123 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
Dependencies
This version declares no dependencies.
README
Dotenv
Loads .env file.
Installation
Add this to your application's shard.yml:
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:
require "dotenv"
# The default file is ".env"
Dotenv.load ".env-file"
See the API docs for more examples.
Contributing
- Fork it ( https://github.com/gdotdesign/cr-dotenv/fork )
- Create your feature branch (git checkout -b my-new-feature)
- Commit your changes (git commit -am 'Add some feature')
- Push to the branch (git push origin my-new-feature)
- Create a new Pull Request
Contributors
- [gdotdesign] Gusztáv Szikszai - creator, maintainer
- [bonyiii]
- [kriskova]
- [neovintage] Rimas Silkaitis
- [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
- detransport_lviv_telegram
- website
- hace
- wax
- dotenv
- bit
- interro
- shards-info
- broken_crystals
- mint
- twbot
- crystal-community
and 111 more
Repository
github.com/gdotdesign/cr-dotenv
Metadata
- Created
- Aug 12, 2026
- Updated
- Sep 3, 2026
- Synced
- Sep 3, 2026
- Versions
- 9