Repository navigation
v0.12.0
evnx v0.12.0
Why 0.12.0 and not 0.11.1: new commands (evnx parse, update --list),
and output that scripts read changes: doctor's syntax messages,
validate --format json's "location", and cloud pull exiting 4 when
declined. In 0.x either one is a minor bump.
doctor's syntax messages are the parser's (B1). doctor checked
syntax with its own pattern, which passed files validate fails on
(P="a"junk, an undefined ${NOPE}); it now reports exactly what the parser
refuses, so the two agree. The wording changes —
Line 2: invalid syntax '!!bad' is now
Line 2: Invalid format: missing '=' separator — and the line's text is no
longer printed, since a line without = is sometimes a pasted secret.
Migrate: anything matching invalid syntax or the quote is never closed
in doctor's output should match .env: Line N: instead.
Added
-
evnx update --list: every copy of evnx on this machine (B5, RM-42).
An older copy earlier onPATHruns instead of a new install, silently; it
happened on the maintainer's own machines.--listwalksPATHin order,
then the folders installers use (cargo, npm, pipx, Homebrew,~/.local/bin),
counts a symlink and its target once, marks the copy that runs, and gives each
copy's version and the command that removes it. It recommends keeping the
newest, and says when the copy that runs is older. Versions come from what the
installer left (Homebrew's Cellar, pip's dist-info, npm'spackage.json, the
install script's receipt); a copy with none is run with--version, killed
after two seconds, and the output says so (D7). No network; exit 0 however
many copies (D8).--jsongivescountandcopies. -
Plain
updateand--checkmention other copies in one line, and
update --check --jsongainsother_copies. Plainupdatealso says how
old this build's source is, from the commit date compiled in bybuild.rs
(SOURCE_DATE_EPOCHwins, for reproducible builds). -
The install script leaves a receipt,
install-receipt.jsonbeside evnx's
settings, naming the file it wrote and its version.updatereads it before
guessing a channel from the path. -
npm and Homebrew warn about a shadowing copy. A global npm install warns
when anotherevnxcomes first onPATH; Homebrew's caveats say how to check. -
EVNX_MASTER_PASSWORDunlocks vaults without a prompt (B4, D4), for a
machine with no terminal that cannot use an API token. Every use prints a
warning to stderr (never the value). It is a variable of its own:
EVNX_PASSWORD, which opens backup files, never unlocks a vault, so one
leaked variable cannot open both.--password-stdinstill takes precedence,
and changing or undoing a master password always asks. In CI, prefer
EVNX_TOKEN. -
templatereads a template once, left to right (B3, RM-39). A value
is never read again as a template: withA={{B|upper}}andB=bee,
{{A|json}}rendered"BEE"in one key order and the literal text in the
other; it is now"{{B|upper}}"in every order (I-133). 2,000 keys over
3,000 lines took 4.2 s; it is now a single pass (I-143).- Filters chain left to right:
{{PORT|default:8080|int}},
{{NAME|upper|json}}. Chains were an error. Eachdefault:uses its own
text (I-134). - A backslash makes a reference literal:
\${NAME},\{{NAME}}and
\$NAMErender without the backslash, and\\before a reference is one
backslash (DEC-T5). Every other backslash is text, so"C:\\dir"and
\nin a JSON or YAML template stay as written.⚠️ \$NAMErendered
\value; it now renders$NAME. - New filters
|yaml,|toml,|sh: a double-quoted YAML scalar, a
TOML basic string, and one single-quoted shell word (DEC-T10). ${NAME:-x}and the other shell expansions are still written through
as they are, now with a warning naming the line, instead of silently
(I-136).
- Filters chain left to right:
-
validateanddoctorwarn about a carriage return inside a value (B2).
A\rthat ends no CRLF line — a classic Mac line ending, or a paste — is
kept in the value by evnx and Docker Compose, while python-dotenv and Node
dotenv end the line there and read what follows as another variable. The
reading is unchanged. New issue typelone_carriage_return(a warning; JSON
output gains it, nothing is removed). -
validateanddoctorreport a NUL byte in a value as an error (B2).
The file parses, but no process can receive the value:execrefuses it, and
Docker Compose's container fails withcontains nul byte. So the exit code
changes only for a file that already fails wherever it is loaded. New issue
typenul_byte. -
validateanddoctorwarn about a value Docker Compose reads differently
because of the order of the file (B2). Compose and python-dotenv expand
${VAR}top to bottom, against what is assigned above the reference; evnx
expands against each key's last value. SoB=1/A=${B}/B=2isA=1
there andA=2here, silently. The warning names the variable and the line
it is assigned on below. New issue typeexpansion_order.⚠️ evnx's value
is unchanged in this release, and changes in 0.13.0, when evnx expands top
to bottom as well. -
evnx parse: what evnx reads from a.env(B2, RM-36, RM-88). One row
per entry: line, key, and whether the value is empty, a placeholder or a
secret, never the value. Every problem in the file is listed, and the
exit code is 1 when there is one.--env -reads stdin.--format json
(schema_version: 1) is whatvalidate --input-format jsonreads back.
--valuesadds the values, and refuses a terminal unless--yes, where they
would stay in the scrollback. -
validate --env -reads stdin, and--input-format jsonreads JSON
(B2). JSON is a flat{"KEY": "value"}object or what
evnx parse --format json --valuesprints; the format is never guessed,
since.envtext may start with{. A finding on input with no lines
reads<stdin>:—.--fixrefuses both, since there is no file to rewrite,
and an empty pipe is an error rather than a pass. -
validatewarns about$$in a project Docker Compose reads (B2).
Compose reads$$as one$, unquoted and in double quotes; evnx keeps both
dollars, as python-dotenv and Node dotenv do. A random password holding$$
is far more common than a$$meant as one dollar, so evnx's value does not
change: thereader_mismatchwarning now covers it, and suggests single
quotes, which Compose reads as written. Measured intodialects.json, whose
script now reads Compose's real value:docker compose configprints each
$as$$.
Changed
⚠️ One way to name a file:./.env(B4, RM-32).diff,validateand
restoreprinted.envwhilescanandcloud pullprinted./.envfor
the same file; all five now say./.env, on Windows too (exceptcloud pull, which keeps.\.envthere). The./also keeps a name starting with
-from reading as a flag when copied into a shell.
validate --format jsonreports"location": "./.env", so a
script matching".env"needs updating. GitHub annotations keep
file=.env, anddiff --format patchkeepsa/.env, because programs read
those as repository paths.doctoris unchanged: it names files relative to
the project it checks, not the current folder.cloud pullandrestoreask the same question the same way (B4,
RM-34). One prompt, "Overwrite ./.env? (the current file is kept as a .bak
copy)"; declining prints "Cancelled; ./.env was not changed." and exits 4
in both (cloud pullexited 0, so a script could not tell that nothing was
written).cloud pulltakes--yes/-y, with--forcekept as an alias;
restorealready took both.- Library:
Issue.severityis aSeverityenum andIssue.issue_typean
IssueType(B2), not strings.validate --format jsonis byte-identical;
only Rust code usingevnxas a library sees the change. - A refused key says why (B2).
my.key,my-keyand1FOOare still
refused, since a shell cannot hold them, and the message now says so and
that Docker Compose and python-dotenv accept them (measured). Other names
state the rule, and strict mode says it requires uppercase. Accepting these
keys is planned for 0.13.0. validatelists every problem in a file that does not parse (B1). It
named only the first, so a file with three problems took three runs. It
still exits 2; a file with one problem prints exactly what it did before.
For contributors (B6, RM-38, RM-44)
- A classifier corpus,
tests/fixtures/classify-corpus.tsv: 152
name=valuepairs with the verdict each shared question gives (holds a
secret, placeholder at the Strict and Lenient levels, masked text).
tests/classify_corpus.rsreports every row that disagrees, not the first;
UPDATE_CORPUS=1refills it for review. It found one inconsistency, pinned as
known_strict_placeholders_lenient_does_not_share: RFC 2606 documentation
hosts (https://api.example.com/v1) are placeholders tovalidatebut not to
scananddiff. scripts/run-doc-examples.py <evnx> <evnx-web>runs everyevnx …line
in the guides against a seeded project, offline, and sorts each into ran,
needs-context, error or skipped. Not in CI yet. First run: 577 examples, 197
ran, 7 errors (one is a staleconvert --to k8s-secret).- Cloud tests against a real server.
tests/e2e_cloud.rsdrives the CLI
through register, verify, login, vault create, push, a byte-identical pull,
share, revoke and a refused pull, on a real evnx-server; it is skipped unless
EVNX_E2E_SERVERis set. Its first check is I-313: a second share sent
straight to the API is a 409 and changes nothing. Verified both ways: it
passes on the server production runs (d2663fa) and fails on one from before
the fix (8ffdf10, which answers 201)..github/workflows/cloud-e2e.yml
runs it nightly against that image, never on pull requests.
Fixed
validateon stdin or JSON no longer offers--fix. Findings said
"fixable with --fix" and the next steps "Run with --fix", for input--fix
refuses;auto_fixableis nowfalsethere in--format jsontoo. A missing
variable's suggestion said "Add DEBUG= to "; it now says
"Add DEBUG=".restorenames every path the same way. One run said "Kept the previous
./.env as .env.bak" and then "Restored 5 variable(s) to .env"; the kept copy,
the restored file, the fallback warning and the next-step commands now all
read./.env(RM-32).parse --format jsonreports"file": "./.env", asvalidatereports
"location": "./.env"for the same file.<stdin>is unchanged.⚠️ A key that starts withexportkeeps its whole name (B2).export
was stripped as a bare prefix, soexporter=1was read aser=1and
exports_dirass_dir, with no warning. It is now a keyword only when
whitespace follows it, as in Docker Compose and python-dotenv. This changes
a reading: a file with such a key now gives it its full name, which is what
every other reader gave it. Only lowercase names were affected.export =vand a bareexportsay`export` is followed by no key
(B2), instead ofInvalid key: ''and "missing '=' separator".- Text after a closing quote is counted, not quoted, in the error (B2).
A="value" restwas refused with the stray text in the message, and that
text is often the rest of a secret, printed to a terminal or a CI log. The
message now says how many characters follow the quote. ${VAR:-default}and its siblings are read as Docker Compose reads them
(B2).:-,-,:+,+,:?and?were all refused as an undefined
variable namedVAR:-default. A default is itself expanded (${A:-$B}), and
${VAR:?message}refuses the file with your message, as Compose does. Single
quotes still keep the text as written. One difference remains: a${...}
inside a default (${A:-${B}}) is still an error in evnx.- A
.envthat starts with a UTF-8 byte-order mark is read (B2). Some
Windows editors save one. evnx read it into the first key's name and refused
the file withInvalid key '\u{feff}K', a fault no one could see. It is now skipped,
as Docker Compose, Node dotenv anddocker runskip it.validatewarns
where python-dotenv is a reader, since python-dotenv keeps the mark in the
key and leaves the variable unset.--fixkeeps the mark. - A line inside a multiline value is no longer read as an assignment (B1).
Ten readers in six commands read a.envline by line beside the parser,
and each misread the inside of a quoted value. Now one reading serves them
all. On 0.11.0, withX=…orA=xon a line inside another key's value:validate --fixwrote a missing variable inside another key's value,
corrupting it and leaving the variable missing, and a fixed multiline value
kept its old continuation lines;diff --format patchreplaced that inner line instead of the real one;validatereported it as a duplicate key, pointed a GitHub annotation at
it, and warned that another reader would read it differently;restore --inspecton a backup that does not parse listed a base64 line
ending in=as a variable name: part of a key body, under "values never
shown";add, on a.envwith a syntax error elsewhere, took it as a variable
already set and did not add it;scan, on a.envwith a syntax error elsewhere, named the key on the
inner line instead of the variable holding the secret.
doctorandvalidatename three or more readers in one list. They
printed "read by evnx and python-dotenv and Node dotenv"; now
"read by evnx, python-dotenv and Node dotenv".
Installation
Linux / macOS (shell script)
curl -sSL https://raw.githubusercontent.com/urwithajit9/evnx/main/scripts/install.sh | bashHomebrew (macOS and Linux)
brew install urwithajit9/evnx/evnxScoop (Windows, user-local)
scoop bucket add evnx https://github.com/urwithajit9/scoop-evnx
scoop install evnxWinget (Windows, system-wide)
winget install urwithajit9.evnxnpm / Node.js
npm install -g @evnx/cliPython (pipx)
pipx install evnxCargo
cargo install evnx --all-features
cargo installcompiles from source withdefault = [], so plain
cargo install evnxgives you a binary without theauth,
vaultandcloudcommands. Every other channel above ships them
already — the binaries are built with--all-features.
Checksums
SHA256 checksums are provided for each binary. Verify after download:
sha256sum -c evnx-*.tar.gz.sha256Provenance
Every archive has a signed build provenance attestation, which ties it
to the workflow run and commit that built it. Verify one with the
GitHub CLI (signed in with gh auth login):
gh attestation verify evnx-x86_64-unknown-linux-musl.tar.gz -R urwithajit9/evnxWhat's Changed
- fix(doctor,validate): name three readers in one list (v0.12.0 B0) by @urwithajit9 in #247
- B1: one reading of a .env, shared by every command (v0.12.0) by @urwithajit9 in #248
- v0.12.0 B2: parser fixes, validate on any input, and evnx parse by @urwithajit9 in #254
- v0.12.0 B3: template engine reads a template once, left to right, with chained filters by @urwithajit9 in #255
- v0.12.0 B4: one overwrite prompt, ./ path labels, EVNX_MASTER_PASSWORD by @urwithajit9 in #256
- v0.12.0 B5: update --list, install receipt, release age by @urwithajit9 in #257
- v0.12.0 B6: classifier corpus, docs runner, real-server cloud tests by @urwithajit9 in #258
- fix: one path label in restore and parse, no --fix hints for stdin; README synced, SLSA badge by @urwithajit9 in #259
- Release v0.12.0 by @urwithajit9 in #260
Full Changelog: v0.11.0...v0.12.0
npm / Node.js
npm install -g @evnx/cli # global install
npx @evnx/cli --version # zero-install usage
npm install --save-dev @evnx/cli # project dev dependency