https://github.com/flexstack/envtpl
A CLI tool for generating .env files from .env.template files via prompt
https://github.com/flexstack/envtpl
dotenv dotenv-cli dotenv-editor dotenv-template
Last synced: 6 months ago
JSON representation
A CLI tool for generating .env files from .env.template files via prompt
- Host: GitHub
- URL: https://github.com/flexstack/envtpl
- Owner: flexstack
- License: mit
- Created: 2024-09-08T22:35:51.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-09-29T19:10:23.000Z (over 1 year ago)
- Last Synced: 2025-02-23T11:32:15.030Z (11 months ago)
- Topics: dotenv, dotenv-cli, dotenv-editor, dotenv-template
- Language: Go
- Homepage:
- Size: 25.4 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
README
# envtpl
A CLI tool for generating .env files from .env.template files via prompts and random values.
## Installation
Using `curl`:
```sh
curl -sfL https://raw.githubusercontent.com/flexstack/envtpl/main/install | bash
```
Using `go install`:
```sh
go install github.com/flexstack/envtpl
```
## Usage
```sh
envtpl [template-file] -o [output-file]
```
### Supported types
```sh
# .env.template
UUID=
PASSWORD=
ENCRYPTION_KEY=
ENCRYPTION_IV=
ENCRYPTION_SALT=
PORT=
ENUM=
PROMPT=
SECRET_PROMPT=
PROMPT_2= # Empty values elicit a prompt
```
| Type | Description | Example |
| --- | --- | --- |
| alpha | Random alphanumeric characters | `PASSWORD=` |
| ascii85 | Random ASCII characters | `ENCRYPTION_KEY=` |
| base64 | Random base64 characters | `ENCRYPTION_IV=` |
| hex | Random hexadecimal characters | `ENCRYPTION_SALT=` |
| uuid | Random UUIDv4 | `UUID=` |
| enum | Enumerated list of values | `ENUM=` |
| int | Random integer | `PORT=` |
| text | Prompt user for text input | `PROMPT1=` |
| password | Prompt user for secret input | `SECRET_PROMPT=` |