Categorygithub.com/flexstack/envtpl
repositorypackage
0.1.2
Repository: https://github.com/flexstack/envtpl.git
Documentation: pkg.go.dev

# Packages

No description provided by the author

# README

envtpl

A CLI tool for generating .env files from .env.template files via prompts and random values.

Installation

Using curl:

curl -sfL https://raw.githubusercontent.com/flexstack/envtpl/main/install | bash

Using go install:

go install github.com/flexstack/envtpl

Usage

envtpl [template-file] -o [output-file]

Supported types

# .env.template
UUID=<uuid>
PASSWORD=<alpha:24>
ENCRYPTION_KEY=<ascii85:32>
ENCRYPTION_IV=<base64:16>
ENCRYPTION_SALT=<hex:16>
PORT=<int:1024-65535>
ENUM=<enum:development,production>
PROMPT=<text:Enter your name>
SECRET_PROMPT=<password:Enter your password>
PROMPT_2= # Empty values elicit a prompt
TypeDescriptionExample
alphaRandom alphanumeric charactersPASSWORD=<alpha:24>
ascii85Random ASCII charactersENCRYPTION_KEY=<ascii85:32>
base64Random base64 charactersENCRYPTION_IV=<base64:16>
hexRandom hexadecimal charactersENCRYPTION_SALT=<hex:16>
uuidRandom UUIDv4UUID=<uuid>
enumEnumerated list of valuesENUM=<enum:development,production>
intRandom integerPORT=<int:1024-65535>
textPrompt user for text inputPROMPT1=<text:Enter your name>
passwordPrompt user for secret inputSECRET_PROMPT=<password:Enter your API key>