usingenv
v4.0.0
Published
Run commands with a .env file using a clean CLI syntax (using .env.file run command)
Downloads
377
Readme
usingenv
Run any command with a specific .env file using a simple, readable syntax.
No manual exporting. No messy shell commands. Just run it.
What this does
usingenv lets you execute any command while automatically loading environment variables from a file.
Instead of doing this:
dotenv -e .env.vercel -- python manage.py runserverYou can do:
using .env.vercel run python manage.py runserverThat’s it.
Why this exists
Working with multiple environments is painful:
.env.local.env.dev.env.staging.env.production
Switching between them usually means long commands or manual exports.
usingenv removes that friction.
Installation
npm install -g usingenvUsage
Basic usage
using .env.file run your command hereAlternate separator
using .env.file -- your command hereHelp and version
using --help
using --versionExamples
Run a Node app:
using .env.local run node app.jsRun a Django server:
using .env.dev run python manage.py runserverRun Make commands:
using .env.vercel run make runserverHow it works
- Reads your
.envfile - Loads variables into memory
- Runs your command with those variables available
- Stops cleanly when your command exits
Nothing leaks into your terminal session.
Requirements
- Node.js 18 or higher
Notes
- This does NOT modify your system environment permanently
- Each command runs in its own isolated environment
- Safe to use for local development and CI scripts
License
MIT
