Converts environment-variable-style names to kebab-case: LOG_LEVEL → log-level, WORKER_COUNT → worker-count. The two styles often describe the same setting in different places: an env var on one side, a --log-level command-line flag, a Helm value or a Kubernetes ConfigMap key on the other.
Paste a .env file or a list of variables to get the hyphenated, lowercase names used by CLIs and many YAML-based tools.
String, with or without their values.Result; add -- in front if you need flag syntax.LOG_LEVEL=debug
CACHE_DIR=/tmp/app-cache
WORKER_COUNT=4log-level=debug
cache-dir=/tmp/app-cache
worker-count=4The names before = are converted; the path /tmp/app-cache already uses hyphens and lowercase, so it is not recognized as SCREAMING_SNAKE_CASE and stays unchanged.
CACHE_DIR → cache-dir._INTERNAL_FLAG → internal-flag.Many tools accept the same option as MYAPP_LOG_LEVEL or --log-level. Converting the env var list helps write the flag definitions and the help text.
Helm charts and ConfigMaps often use hyphenated or camelCase keys while containers read SCREAMING_SNAKE_CASE variables. Converting gives the key names for the chart side of that mapping.
HTTP_2_ENABLED → http-2-enabled.PORT are not converted.Not portably. Most shells do not allow hyphens in variable names, so keep SCREAMING_SNAKE_CASE for the variables themselves and use kebab-case for flags and config keys.
-- prefix?No. Only the name changes. If the input already has --, it is kept.