https://github.com/inventage/envsubst
Bash-like environment variables substitution
https://github.com/inventage/envsubst
alternative environment envsubst gettext npm variables
Last synced: about 1 month ago
JSON representation
Bash-like environment variables substitution
- Host: GitHub
- URL: https://github.com/inventage/envsubst
- Owner: inventage
- License: mit
- Created: 2021-02-08T20:59:36.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2024-12-23T03:51:26.000Z (10 months ago)
- Last Synced: 2025-08-25T01:48:11.553Z (about 2 months ago)
- Topics: alternative, environment, envsubst, gettext, npm, variables
- Language: JavaScript
- Homepage:
- Size: 1.07 MB
- Stars: 6
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# envsubst
Bash-like environment variables substitution
[](https://github.com/inventage/envsubst/actions?query=workflow%3A"Main+Workflow")
[](https://www.npmjs.com/package/@inventage/envsubst)## Example
Let's say you have a file `temp` with the following content:
```
${BAR}
${FOO:-foo}
```When you run `BAR=baz npx --ignore-existing @inventage/envsubst temp`, you will end up with the following content in `temp`:
```
baz
foo
```and the following output:
```
Made 2 replacements:┌──────┬─────────────┬───────┐
│ File │ Variable │ Value │
├──────┼─────────────┼───────┤
│ temp │ ${BAR} │ baz │
├──────┼─────────────┼───────┤
│ temp │ ${FOO:-foo} │ foo │
└──────┴─────────────┴───────┘
```