Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/eagletmt/denv-rust
https://github.com/eagletmt/denv-rust
Last synced: 22 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/eagletmt/denv-rust
- Owner: eagletmt
- License: mit
- Created: 2017-01-02T16:15:25.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2021-09-10T15:09:53.000Z (over 3 years ago)
- Last Synced: 2024-12-01T07:41:00.136Z (25 days ago)
- Language: Rust
- Size: 26.4 KB
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# denv-rust
[![Build Status](https://github.com/eagletmt/denv-rust/actions/workflows/ci.yml/badge.svg?branch=master)](https://github.com/eagletmt/denv-rust/actions/workflows/ci.yml)
[![crates.io](https://img.shields.io/crates/v/denv.svg)](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