Skip to content

v0.11.0

Choose a tag to compare

@github-actions github-actions released this 29 Oct 06:25
· 350 commits to main since this release
a255caf

evnx v0.11.0

⚠️ Breaking changes, and how to migrate:

  • template: an unresolved placeholder is an error (RM-14, DEC-T2, I-142).
    {{X}} with no value used to be written through literally, exit 0; now the
    run exits 2, writes nothing, and lists every name. Migrate: add
    --allow-unresolved where the pass-through was intended. --strict is now
    the default; it is still accepted, with a notice, and is removed in 1.0.
  • spec: a regex format is written regex:<pattern> (RM-15, DEC-SP6,
    I-188). A name that is not a format used to be compiled as a regex, so a typo
    (urll) failed every value; it is now an error when the contract is read,
    with "did you mean". Migrate: prefix bare patterns:
    format = "^sk_" → format = "regex:^sk_".
  • diff --format json: values_redacted is gone; schema_version is 2
    (RM-16). Migrate: read value_state (withheld, masked, shown);
    value_state == "masked" is the old values_redacted == true.
  • diff --format patch is a unified diff (RM-40, I-072). It used to print
    # Add these to .env: / + KEY=<withheld> sections, which patch rejected;
    it now prints a diff patch -p1 applies, and a patch that would carry real
    values (--values, --against, --reverse) needs --show-values, else
    exit 2. diff --interactive now writes the chosen changes (keeping
    .env.bak). Migrate: anything parsing the old sections should apply the
    patch instead, or read --format json.
  • restore writes back to the file the backup was made from (RM-18, I-029).
    A backup of .env.staging used to restore over .env; without --output it
    now restores to .env.staging, in the current folder. A recorded name that is
    not .env or .env.<name> still restores to .env. Migrate: pass
    --output .env to keep the old destination.
  • update --check --json: new channel values (RM-19, DEC-UP1).
    script-or-pip is gone: a shared bin folder with no pip record is now
    script, with its command filled in instead of null. New: pipx, and
    pip-externally-managed (pip under a Python that refuses pip, whose
    command is pipx install evnx). Migrate: match on the new values; treat
    an unknown one as unknown.
  • A relative [defaults] example is read from the folder holding
    .evnx.toml
    (I-332), the way .gitignore and docker-compose.yml read
    their paths. A root .evnx.toml naming deploy/compose/.env.example used to
    send a command run inside deploy/compose to
    deploy/compose/deploy/compose/.env.example. Nothing changes for a command
    run in the folder that holds the file. Migrate: a path written relative to
    a subfolder you run commands from should be rewritten relative to the
    .evnx.toml.

⚠️ init and add honour [defaults] env_name. A project whose
.evnx.toml sets env_name = "production" now has init and add write
.env.production, the file validate, sync and diff already read there,
instead of .env. Pass --env-name to choose another.

  • doctor checks whether an AI coding agent can read .env (RM-25). For
    each agent whose configuration is already in the project:

    • Claude Code reads any file unless permissions.deny blocks it, so
      .claude/settings.json (or settings.local.json) must deny
      Read(./.env) and Read(./.env.*). doctor prints the lines to add;
      --fix never rewrites that file.
    • Cursor, Aider, Gemini CLI and Windsurf honour .gitignore; .env is
      reported only when neither .gitignore nor the agent's own file
      (.cursorignore, .aiderignore, .geminiignore, .codeiumignore)
      excludes it. --fix adds .env* to that file.
    • Copilot's content exclusion is an organisation setting: named as not
      checkable from the repository.

    Nothing is created for a tool the project does not use. The JSON report has
    one more check, ai_agents. This prevents accidental exposure only: an agent
    allowed to run shell commands can still read the file.

  • Release archives carry build provenance (RM-26). Each .tar.gz and
    .zip has a Sigstore-signed SLSA provenance attestation tying it to the
    workflow run and commit that built it. Verify with
    gh attestation verify <archive> -R urwithajit9/evnx. No asset is added or
    renamed. Each archive is signed in the build job that compiled it (RM-81),
    and every release now checks its own published archives the same way
    (RM-82).

  • install.sh checks provenance when the GitHub CLI can (RM-83). With a
    signed-in gh (2.49 or later), an archive that does not verify as built by
    evnx's release workflow from the requested tag is refused and nothing is
    installed. With no gh, a gh that is not signed in (gh attestation verify
    needs a login), or a release before v0.11.0, the installer prints one line
    saying the check was skipped and carries on. The checksum is still mandatory.

  • A public key is not a secret by its name (RM-31). VAPID_PUBLIC_KEY,
    STRIPE_PUBLISHABLE_KEY and the like matched *_KEY, so diff --show-values
    and sync hid them and validate demanded a strong random value. Names
    containing PUBLIC_KEY or PUBLISHABLE_KEY are now judged on the rest of
    the name (PUBLIC_KEY_PASSWORD is still a secret), and a value that looks
    like a secret is still masked.

  • cloud pull keeps the file it replaces, and its mode (RM-34). Replacing
    a .env with different contents now keeps the old one as .env.bak (then
    .bak.2, …), whether you answered yes or passed --force, as restore
    does. The kept copy is protected by .gitignore like the file itself. The
    write goes through the shared writer: an existing file keeps its mode, with a
    warning if others can read it (it used to be forced to 0600), and a symlink
    is written through rather than replaced.

  • Internal (RM-35, RM-37): the deprecated, unused utils::git and
    utils::string::redact are gone, and lazy_static is replaced by the
    standard library's LazyLock, removing a dependency.

  • template leaves bare $NAME alone (I-135, DEC-T3). ${NAME} and
    {{NAME}} are references; a bare $NAME is substituted when the variable is
    defined and otherwise left as it is, because in nginx, shell or Makefile text
    ($host, $document_root, $1) it is that program's syntax. It used to be
    reported as undefined, and with unresolved references now an error (RM-14,
    above) every such template would have failed.

  • template: each |default: uses its own text (I-134).
    {{E|default:one}} {{E|default:two}} with E empty rendered one one.

  • scan reads a plaintext .env.backup (RM-84, I-293). Files named like
    an evnx backup (.env.backup, .env.production.backup, .env.backup.2)
    were skipped by name, as ciphertext, so cp .env .env.backup was never
    scanned: real secrets, exit 0. The content decides now, as it does for
    doctor: a real backup is still skipped, a plaintext copy is scanned.

  • scan says how it read each file (RM-47). Name-based checks
    (DB_PASSWORD=… flagged by its name) run only on files named like a .env;
    the same line in config.txt gets the value patterns alone. -v now says so
    on each Scanning: line, and the JSON report has a files list with each
    file's read_as, dotenv or text (additive).

  • crates.io and PyPI publish by trusted publishing (RM-27). A release now
    publishes to crates.io itself (publish-crate in release.yml; it was a
    manual cargo publish), and PyPI uploads with GitHub's OIDC token instead
    of a stored API token, adding PEP 740 attestations. No long-lived registry
    token is needed for either.

  • Internal: a release build retries its provenance attestation once, after
    60 seconds, so a passing Sigstore timeout no longer stops the release (seen
    twice in the second fork dry run).

  • Internal (RM-28): the release and CI workflows move to actions/checkout
    v7.0.1, actions/download-artifact v8.0.2 (a hash mismatch now fails the
    download), actions/setup-node v7.1.0 (its automatic cache turned off in the
    publish job), docker/build-push-action v7.4.0 and a newer
    dtolnay/rust-toolchain, all pinned by commit.

  • Cloud commands a production server can trust (RM-85, from a paid
    user's 0.10.18 session):

    • cloud pull said "writing to a production vault from ./.env", which
      describes a push. It now says what a pull does, only when it would
      replace a different file: .env exists and differs from version 3 of app/production (production); pulling replaces it.
    • Server times end in UTC (cloud history, audit, sessions, …): a
      server in Seoul read 16:21 as local time.
    • cloud link names the folder it bound, which is the project's
      .evnx.toml folder and every folder below it, often not the current one.
      It said "bound this directory".
    • The binding is one aligned vault app/production ([cloud] vault) row
      under the config line, and the file line is an absolute path.
  • [cloud] file: a binding can name the file (RM-86).
    evnx cloud link app/production --file deploy/.env records it relative to
    the .evnx.toml's folder, so push and pull use the same file from every
    folder below it; they used ./.env from wherever they ran. --file and
    --env-name still win; a path outside the project is refused.

  • evnx cloud diff --local (RM-87): the local file against a version, by
    key name (+ only in the vault, - only in the file, ~ value differs),
    decrypted in memory; exit 0 when identical, 1 when not. Nothing is written,
    so checking a server no longer means pulling production secrets into /tmp.

  • evnx spec check (RM-41): the [vars] contract against .env.example
    (every declared variable in it, every name in it declared) and, when there
    is one, .env (every required variable present). Read-only, exit 0/1/2, a
    project without [vars] is skipped and says so. Shipped as the
    evnx-spec-check pre-commit hook.

  • diff --format patch is a patch (RM-40, I-072). It is a unified diff of
    .env that patch -p1 applies: the missing names are appended with the
    template's lines, keys only in .env are kept and named in comments. A
    patch that would carry real values (--values, --against, --reverse)
    needs --show-values; it used to print <withheld> lines patch rejected.

  • diff --interactive writes what you choose (RM-40), keeping the
    previous file as .env.bak; batch 7 had made it say it wrote nothing.
    --interactive --reverse is refused: it would write .env's values into
    the committed template (evnx sync adds names with placeholders).

  • evnx run -- <cmd> (RM-43): a local .env into a command's
    environment block, never its arguments, as evnx cloud run does for a vault;
    evnx's own EVNX_* settings are not passed on, and variables that make a
    program load other code (LD_PRELOAD, NODE_OPTIONS, …) are refused.

  • Secrets are masked in run and cloud run output (RM-43): values the
    classifier calls secret print as ***, by default when output is not a
    terminal (a CI log, an agent); --mask and --no-mask decide otherwise. It
    prevents accidents, not exfiltration.

  • validate and doctor say where your .env's readers disagree (RM-04,
    phase 1). evnx's parser does not change; it reads as Docker Compose does. When
    the project uses Node dotenv, validate reports reader_mismatch (a
    warning, --ignore-able, never --fixed) for lines Node reads differently:
    KEY= # note and KEY=#ff0000 (empty), PW=a#b (cut at #), and
    ${VAR} without dotenv-expand (not expanded). Docker Compose and
    python-dotenv were measured to read all of these as evnx does, so they
    produce no finding. doctor adds one line naming the readers it detected.
    Every value comes from running the real loaders
    (scripts/measure-dialects.py, the weekly dialects.yml workflow).

  • evnx scan - reads stdin (RM-48). Scan a diff, a log or a file an
    agent is about to write without putting it on disk:
    git diff | evnx scan -. It is read as a .env when it parses as one and
    as text otherwise (-v and the JSON files list say which), it can sit
    beside paths, and findings are labelled <stdin>. Empty stdin is an error,
    exit 2, so cat missing-file | evnx scan - cannot pass as clean.

  • convert --only secrets|public (RM-67). Keep only the variables the
    shared classifier calls secret (by name, or by value: a provider key, a
    private key, a URL with a password), or only the rest; for example public
    values to a build system and secrets to a secret manager. Works with
    --include and --exclude.

  • Internal (RM-46): scan's lenient placeholder check is now named
    is_placeholder_lenient, so it cannot be mistaken for validate --fix's
    strict one, which decides whether a value is safe to overwrite.

  • evnx update prints a command that works for the copy that is running
    (RM-19, UP-1 to UP-4):

    • a pipx install says pipx upgrade evnx; it was read as pip and told
      pip install --upgrade evnx, which does not upgrade it;
    • ~/.local/bin or /usr/local/bin with no pip record is the install
      script's, and only its command is printed. pip used to come first, and a
      system Python that refuses pip (PEP 668) refused it;
    • a pip install under such a Python is told to move to pipx, never to pass
      --break-system-packages;
    • update, commands and completions no longer read .evnx.toml: a
      broken one stopped them with exit 2, and a valid one printed a config
      line before the completion script;
    • --check says "a channel can lag" only where one can: not for the install
      script, which downloads from the release --check reads.
  • install.sh reports the copy it installed, and names the one that runs
    (RM-20). Live on main (and dotenv.space/install.sh) on merge, not with
    this release:

    • "Installed version" is the version of the file just written, not of
      whichever evnx is first on PATH; another copy ahead on PATH is named,
      with the command that removes it (npm, pipx, pip, Homebrew, cargo).
    • A copy that Homebrew, npm or pip owns is never replaced: the script stops
      and prints that manager's upgrade command.
    • A fresh account installs into ~/.local/bin, created if missing, instead of
      asking for sudo.
    • A folder not on PATH ends with the export line and exit 0, not
      "Installation failed". Another copy on PATH is then named as the one
      evnx still runs, and never offered for removal: the first version of
      this change told the user to rm what could be their only working copy.
    • EVNX_VERSION=0.10.18 pins a release; EVNX_INSTALL_DIR=… picks the
      folder.
  • cloud export --to takes convert's names and collision rule (RM-07).
    --to gcp-secrets, azure-keyvault, heroku and kubernetes wrote
    my-project, my-keyvault, YOUR_APP_NAME and app-secrets, and two names
    the format merges were both written. They now need --project,
    --vault-name, --heroku-app or --name (--namespace optional), refused
    before any request when missing; a collision is refused unless
    --allow-collisions is given. The file is what evnx convert prints for the
    same input and flags.

  • sync --check --format json sorts missing and template_only again
    (RM-11). 0.10.12 to 0.10.18 printed them in file order, unannounced, while
    the guide said "Keys are sorted".

  • init names a .env in a subfolder (I-331). In a monorepo, init at the
    root now says that deploy/compose/.env exists, that commands run at the
    root read the root's file, and how to set up the subfolder
    (evnx init -p deploy/compose). Dependency, build and hidden folders are
    skipped.

  • init --env-name NAME and add … --env-name NAME (RM-17, MEC-2, I-027,
    I-033). init creates or fills .env.NAME from the template; add writes
    .env.NAME and the template, and no other env file. One file per run: loop
    over names for several. A name is checked as on the read side (../x is
    refused). The hint for a missing .env.NAME — "Create it with evnx init",
    which wrote .env — now says evnx init --env-name NAME (C-2).

  • One "did you mean" for every --env-name (RM-17): an abbreviation, then
    the closest spelling, so prodution suggests production.

  • 🔒 Azure secrets never reach a command line (RM-06, I-086). convert --to azure-keyvault and migrate --to azure-keyvault printed az keyvault secret set --value <secret>, visible in ps, shell history and set -x logs. Each
    secret is now written to a private temp file through a quoted heredoc and
    read with --file … --encoding utf-8; the file is removed afterwards.

  • doctor warns when .dockerignore lets .env into an image (RM-22). With
    a Dockerfile, a missing .dockerignore, or one that does not exclude
    .env*, is a warning; --fix adds .env* and the template exceptions.

  • migrate in CI names each secret (RM-08, I-274): with no terminal, the
    per-secret ✓/✗ lines were swallowed by the hidden progress bar, so a log
    said "1 failed" and named nothing. A missing token now says "Set
    GITHUB_TOKEN, or pass --github-token" (I-273); --dry-run says "would
    print commands for" for the destinations evnx does not upload to; menus no
    longer end in ?:.

  • A master-password prompt with no terminal names --password-stdin
    (I-330, RM-01). cloud push, pull, run and export, vault create,
    share, revoke and rekey, and auth login, register,
    rotate-master-password and undo-password-change, run in CI without the
    flag, failed with "reading the master password: IO error: not a terminal".
    They now say "no terminal to ask for the master password: pipe it with
    --password-stdin" and show the command with the flag added. Exit code
    unchanged (2).

  • init writes .evnx.toml before printing anything (RM-03). init --blueprint t3_modern --yes | head -n 1 exited 141 with .env,
    .env.example and .gitignore written but no .evnx.toml. All four are now
    written first; the lines printed, and their order, are unchanged.

  • sync audits real values written through allow_actual (RM-05, I-284).
    They were written with no [AUDIT] line while the run said "placeholder
    values" and the dry-run marked them ·. The [AUDIT] line now prints, the
    message says "and real values for N keys in allow_actual", and the preview
    marks them !.

  • doctor reports every detected project type (RM-23), not the first:
    requirements.txt beside package.json gets the Python and the Node.js
    checks.

  • validate suggests --fix only when a finding shown is fixable (RM-09).

  • Hints and messages that named the wrong thing:

    • org remove, delete and leave with no terminal name the member and
      --org <slug>; remove printed a literal <member> (RM-02).
    • template --output - refused with "Nothing was written to -."; it now says
      "Nothing was printed." (RM-13).
    • scan: one held-back finding says "lists it" (I-290);
      scan.max_file_size is announced in KiB, as the skip note says it (I-291);
      scan.disable counts "built-in detector(s)", since the names include
      heuristics (I-292).
    • init --dry-run -p DIR names every file with its folder (I-333).
  • Help texts that described old behaviour (RM-21): auth register (three
    public keys, ML-KEM-768 included), auth rotate-master-password (evnx vault rekey exists), auth download-data (cloud export has shipped), add custom
    (*_PWD is hidden too), and validate --rotate-weak-secrets, whose example
    rendered as one flattened line.

Installation

Linux / macOS (shell script)

curl -sSL https://raw.githubusercontent.com/urwithajit9/evnx/main/scripts/install.sh | bash

Homebrew (macOS and Linux)

brew install urwithajit9/evnx/evnx

Scoop (Windows, user-local)

scoop bucket add evnx https://github.com/urwithajit9/scoop-evnx
scoop install evnx

Winget (Windows, system-wide)

winget install urwithajit9.evnx

npm / Node.js

npm install -g @evnx/cli

Python (pipx)

pipx install evnx

Cargo

cargo install evnx --all-features

cargo install compiles from source with default = [], so plain
cargo install evnx gives you a binary without the auth,
vault and cloud commands. 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.sha256

Provenance

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/evnx

What's Changed

  • docs: sync with v0.10.18 by @urwithajit9 in #225
  • cloud: a master-password prompt with no terminal names --password-stdin (I-330, RM-01) by @urwithajit9 in #226
  • cloud: the --password-stdin hint keeps every flag of the command (I-330 follow-up) by @urwithajit9 in #228
  • v0.11.0 batch 1: nine fixes for wrong output, missing writes and stale help by @urwithajit9 in #229
  • v0.11.0 batch 2a: --env-name for init and add, Azure secrets off argv, .dockerignore check, migrate CI logs by @urwithajit9 in #230
  • v0.11.0 batch 2b: breaking changes in template, spec, diff JSON and restore by @urwithajit9 in #231
  • v0.11.0 batch 3: export --to names, sorted sync JSON, monorepo config paths and init warning by @urwithajit9 in #232
  • install.sh: report the installed copy, name the one that runs, never replace a managed copy (RM-20) by @urwithajit9 in #233
  • install.sh: don't suggest removing the only copy on PATH (RM-20 follow-up) by @urwithajit9 in #234
  • update: the right upgrade command for pipx, the install script and PEP 668 systems (RM-19) by @urwithajit9 in #235
  • v0.11.0 batch 4: doctor checks AI agents' access to .env; release provenance by @urwithajit9 in #236
  • v0.11.0 batch 5: provenance per build job, self-verifying releases, install.sh checks provenance by @urwithajit9 in #237
  • v0.11.0 batch 6: v0.12.0's small remainders (public keys, cloud pull writer, cleanup) by @urwithajit9 in #238
  • v0.11.0 batch 7: template leaves bare $NAME alone; per-match defaults; honest diff --interactive by @urwithajit9 in #239
  • v0.11.0 batch 8: scan reads plaintext .env.backup; says how each file was read by @urwithajit9 in #240
  • v0.11.0 batch 9: scan - reads stdin; convert --only secrets|public by @urwithajit9 in #241
  • v0.11.0 batches 9b–13: cloud fixes, spec check, real diff patch, evnx run with masking, reader checks by @urwithajit9 in #242
  • v0.11.0 batch 14: trusted publishing for PyPI and crates.io; action bumps by @urwithajit9 in #243
  • release: retry the provenance attestation once by @urwithajit9 in #244
  • Release v0.11.0 by @urwithajit9 in #245
  • docs(readme): v0.11.0 install and commands by @urwithajit9 in #246

Full Changelog: v0.10.18...v0.11.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