mirror of
https://github.com/toddbluhm/env-cmd.git
synced 2025-12-08 18:23:33 +00:00
chore: update readme for new option
This commit is contained in:
parent
53f4549001
commit
f47b9f3c63
28
README.md
28
README.md
@ -57,17 +57,17 @@ To use a custom env filename or path, pass the `-f` flag. This is a major breaki
|
||||
Usage: env-cmd [options] -- <command> [...args]
|
||||
|
||||
Options:
|
||||
-v, --version output the version number
|
||||
-e, --environments [envs...] The rc file environment(s) to use
|
||||
-f, --file [path] Custom env file path or .rc file path if '-e' used (default path: ./.env or
|
||||
./.env-cmdrc.(js|cjs|mjs|json))
|
||||
-x, --expand-envs Replace $var in args and command with environment variables
|
||||
--fallback Fallback to default env file path, if custom env file path not found
|
||||
--no-override Do not override existing environment variables
|
||||
--silent Ignore any env-cmd errors and only fail on executed program failure.
|
||||
--use-shell Execute the command in a new shell with the given environment
|
||||
--verbose Print helpful debugging information
|
||||
-h, --help display help for command
|
||||
-v, --version output the version number
|
||||
-e, --environments [env1,env2,...] The rc file environment(s) to use
|
||||
-f, --file [path] Custom env file path (default path: ./.env)
|
||||
-x, --expand-envs Replace $var and ${var} in args and command with environment variables
|
||||
--fallback Fallback to default env file path, if custom env file path not found
|
||||
--no-override Do not override existing environment variables
|
||||
--silent Ignore any env-cmd errors and only fail on executed program failure.
|
||||
--use-shell Execute the command in a new shell with the given environment
|
||||
--verbose Print helpful debugging information
|
||||
--recursive Replace $var and ${var} in env file with the referenced environment variable
|
||||
-h, --help output usage information
|
||||
```
|
||||
|
||||
## 🔬 Advanced Usage
|
||||
@ -129,14 +129,14 @@ commands together that share the same environment variables.
|
||||
```
|
||||
|
||||
### Asynchronous env file support
|
||||
|
||||
|
||||
EnvCmd supports reading from asynchronous `.env` files. Instead of using a `.env` file, pass in a `.js`
|
||||
file that exports either an object or a `Promise` resolving to an object (`{ ENV_VAR_NAME: value, ... }`). Asynchronous `.rc`
|
||||
files are also supported using `.js` file extension and resolving to an object with top level environment
|
||||
names (`{ production: { ENV_VAR_NAME: value, ... } }`).
|
||||
|
||||
|
||||
**Terminal**
|
||||
|
||||
|
||||
```sh
|
||||
./node_modules/.bin/env-cmd -f ./async-file.js -- node index.js
|
||||
```
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user