loadenv
load .env variables
Summary
| Latest Version | Unknown |
|---|---|
| License | MIT |
| CI Status | Passing |
| Downloads | 0 |
| Last Indexed | 2026-07-24 13:02 |
Tags
Installation
nimble install loadenv
choosenim install loadenv
git clone https://github.com/xmonader/nim-loadenv
OS Compatibility
| Platform | Linux | macOS | Windows | FreeBSD | OpenBSD | NetBSD | Android | iOS | WASM | Embedded |
|---|---|---|---|---|---|---|---|---|---|---|
| loadenv | ✓ | ✓ | ✓ | - | - | - | - | - | - | - |
Source
| Repository | https://github.com/xmonader/nim-loadenv |
|---|---|
| Homepage | https://github.com/xmonader/nim-loadenv |
| Documentation | View Documentation |
| Registry Source | nimble_official |
README
loadenv
Load your .env files easily into your nim application
Example
let envFile = """
SEND_GRID_TOK = 12312aeabasd123sad12r54
# COMMENTED = VALUE
SEND_GRID_USER = root
"""
let envFilePath = getTempDir()/"testfile.env"
writeFile(envFilePath, envFile)
loadenv.loadEnv(envFilePath)
assert os.existsEnv("SEND_GRID_USER") == true
assert os.existsEnv("SEND_GRID_TOK") == true
assert os.existsEnv("COMMENTED") == false
- In case of another separator other than
=you can passsepchar toloadEnvfunction