https://github.com/eagletmt/denv-rust
https://github.com/eagletmt/denv-rust
Last synced: 4 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/eagletmt/denv-rust
- Owner: eagletmt
- License: mit
- Created: 2017-01-02T16:15:25.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2021-09-10T15:09:53.000Z (almost 4 years ago)
- Last Synced: 2025-03-24T09:50:56.344Z (4 months ago)
- Language: Rust
- Size: 26.4 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# denv-rust
[](https://github.com/eagletmt/denv-rust/actions/workflows/ci.yml)
[](https://crates.io/crates/denv)Load environment variables from .env file.
## CLI usage
```
Usage: denv [OPTIONS] COMMAND...Options:
-f, --filename FILENAME
Path to .env file
-h, --help Print help
``````
% cat .env
FOO=bar
% denv printenv FOO
bar
% cat hoge.env
HOGE=fuga
% denv -f printenv HOGE
fuga
```## Library usage
```rust
denv::load("/path/to/.env").expect("Unable to load .env file");
```## Acknowledgment
Original implementation is written by taiki45.
https://github.com/taiki45/denv