| Crates.io | cargo-dotenv |
| lib.rs | cargo-dotenv |
| version | 1.0.1 |
| created_at | 2023-07-05 18:41:32.352603+00 |
| updated_at | 2023-07-05 18:52:47.558022+00 |
| description | A tiny cargo subcommand to run cargo commands with dotenv |
| homepage | |
| repository | https://github.com/kurtbuilds/cargo-dotenv |
| max_upload_size | |
| id | 909288 |
| size | 13,123 |
This is a tiny utility that injects env variables before running cargo commands.
I built this utility specifically because IntelliJ Rust does not support
.env files, nor does the EnvFile plugin support Rust.
Otherwise, I recommend adding env variables through just, your shell, or other means.
# Runs `cargo run` with env coming from `.env`
cargo dotenv run
# Runs `cargo check` with env coming from `.env.production`
cargo dotenv -e .env.production check
You can run dotenv recursively arbitrarily. This fact is useless, but I find it amusing.
cargo dotenv dotenv dotenv dotenv dotenv dotenv dotenv dotenv dotenv check
cargo install cargo-dotenv