beginner3 minutesevnx v0.2.1+

evnx convert

Command reference for evnx convert — flags, supported formats, transform values, glob patterns, and exit codes.

Prerequisites

evnx convert

Transform .env files into 14+ output formats including JSON, YAML, Kubernetes secrets, Terraform variables, and cloud provider configs.

Before you start

Run evnx convert without --to to open an interactive TUI format selector — no flags required.


Signature

Bash
evnx convert [OPTIONS]

All flags are optional. Omitting --to launches interactive mode.


Flags

FlagShortTypeDefaultDescription
--envpath.envPath to input .env file
--tostringTarget output format (omit for interactive selection)
--output-opathWrite output to file instead of stdout
--includeglobInclude only variables matching this pattern
--excludeglobExclude variables matching this pattern
--base64boolfalseBase64-encode all values before output
--prefixstringPrepend a string to all variable names
--transformenumTransform key casing (see Transform values)
--verbose-vboolfalsePrint debug output to stderr (global flag)
--help-hboolfalseDisplay help

--to has no -t short alias. --verbose / -v is a global flag on the top-level evnx command, not specific to convert.


Supported formats

CategoryFormat nameAliases
Genericjson
yamlyml
shellbash, export
Cloud Providersaws-secretsaws, aws-secrets-manager
gcp-secretsgcp, gcp-secret-manager
azure-keyvaultazure, azure-key-vault
CI/CDgithub-actionsgithub, gh-actions
Containersdocker-composecompose
kubernetesk8s, kubectl
Infrastructure as Codeterraformtf, tfvars
Secret Managersdoppler
heroku
vercel
railway

Transform values

Passed to --transform. Applied to every key in the output after --prefix is prepended.

ValueInput exampleOutput example
uppercasedatabase_urlDATABASE_URL
lowercaseDATABASE_URLdatabase_url
camelCasedatabase_urldatabaseUrl
snake_caseDatabaseURLdatabase_url

Order of operations: filter → prefix → transform.


Glob pattern support

--include and --exclude accept simple glob patterns. --exclude is applied after --include.

PatternMeaningExample match
*Everythingall variables
PREFIX_*Starts with prefixAWS_KEY, AWS_SECRET
*_SUFFIXEnds with suffixAPP_DEBUG, DB_DEBUG
*CONTAINS*Contains substringDATABASE_URL, REDIS_URL
EXACTExact key name onlyPORT

Character classes and brace expansions ([abc], ) are not supported.


Exit codes

CodeMeaning
0Conversion completed successfully
1Failure — unknown format, parse error, or I/O error

Exit code 2 is used only by evnx diff, not by convert.


See also