Repository navigation
v0.10.2
evnx v0.10.2
0.10.x and 0.11.0 is reserved for the first stable release. This one is
evnx add: every issue from its review, re-verified against the shipped
0.10.1 binary, plus one parser fix that every command benefits from.
ⓘ Library API. Unlike 0.10.1, this patch release changes evnx's public
library surface (see Library below). crates.io lists no crate that depends on
evnx, so nobody is known to be affected; it is stated so that nobody is
surprised.
⚠️ Breaking
Yes/no questions in evnx add answer on Enter, as in evnx init since
0.10.1. Type y or n and press Enter; Enter alone takes the default. Before,
the y answered at once and the Enter after it silently answered the next
question.
evnx add custom asks less. Per variable: name, value, and one More options? (description, category, required); an empty name finishes. Add another variable? and the separate description and category questions are
gone, and the category list starts on None. Scripts should use the new
argument form instead (below).
⛔ Fixed — adding a variable again replaced your real value
evnx add appended every name every time. A second add service redis wrote
REDIS_URL twice into .env.example and .env and still said "Added 5
variables". Because dotenv uses the last assignment, the placeholder
appended to .env silently replaced the value you had set, so the app read
redis://localhost instead of your server. evnx init --from-source did the
same through the same code. Now each name is checked in each file:
- a name a file already has is skipped in that file;
- a name
.env.examplehas with a different value is kept, listed, and
not added to.enveither; .envcatches up with names.env.examplealready had.
The result says what happened: Added 4 variables for PostgreSQL, skipped 2 already present, or Nothing to add. Values in .env are never compared or
printed.
Added
evnx add custom NAME=value …: your own variables as arguments, with
--desc,--categoryand--requiredfor all of them. Works without a
terminal under--yes, so scripts, CI and agents can use it. A name alone
gets a placeholder; a secret-looking one (*_SECRET,*_TOKEN,*_KEY, …),
in a terminal, is asked for without echo instead. Every name is checked
before anything is written.evnx add --list: every idaddtakes, the same catalogue asinit --list-components, plus the blueprints. Leave the id out
(evnx add blueprint) to pick one in a terminal.--dry-runon everyaddsubcommand: what would be added to each file,
skipped and kept, and whether.envwould be created. Writes nothing; needs
no terminal.--json(with--yesor--dry-run): one document on stdout, with
added,skipped,conflicts,env_added,env_created,
env_committable,written,dry_run. Names only, and.env.example
values for conflicts; nothing from.env.evnx add framework nextjsworks:--languageis optional (framework
ids are unique). When given, it is checked, and a mismatch names the right
language.- One id space:
add serviceandadd frameworktake any catalogue id and
say what it is (vercel is an infra component; adding it.).evnx add infra
is a new alias ofadd service. - Browser copies in
add service: in a Vite, Next.js, SvelteKit, Nuxt or
Laravel project (read frompackage.json, asinit --detectreads it), the
public values get their prefixed copy, asinit --withwrites them:
add service supabasein a Vite project addsVITE_SUPABASE_URL. - Esc cancels any
evnx addconfirmation or menu without writing anything
(exit 0); at a yes/no question, Esc then Enter.
Changed
- With no
.env,evnx addcreates one from.env.example, asinitdoes:
.gitignorefirst, asking in a terminal and not under--yes. --yesnever shows the preview, in anyaddsubcommand (frameworkand
blueprintused to);-qleaves only warnings, conflicts and errors.- The preview lists framework, service, infra in a fixed order (also
init).
Fixed
- All commands: a bare
$NAMEin a.envvalue kept the character after
it out.URL=$BASE/apiread ashttp://localhostapi,$B:8080as
app8080, inconvert,template,validate,scan,diff,syncand
migrate.${NAME}was always correct. evnx add custom: a category with no description commented the variable out
(# [Application] NAME=value) while reporting it added.- A file
addcannot write stops the run before anything is written; a
read-only.envused to leave.env.examplealready appended. The error
names the file. - Without a terminal and without
--yes,addsays to add--yes(or, for
add custom, to pass the variables as arguments) instead ofIO error: not a terminal: not a terminal, and prints no preview first. Exit code still 2. - "Next steps" no longer follows "Aborted.".
- Appended lines follow the file's line endings, so a CRLF
.env.exampleno
longer comes back mixed. - Wording:
1 variable,1 conflict;-vno longer mentions "TODO
placeholders", whichaddstopped writing in 0.5.0.
Library
- Removed:
commands::add::shared::{AppendMode, detect_conflicts, append_to_env_files}. Usecommands::add::shared::{plan, apply}. - Changed:
commands::add::shared::Conflicthas noexisting_line;
commands::add::runtakes(Option<AddTarget>, add::Options); the
subcommand handlers take ashared::Mode. - Changed:
AddTarget(re-exported asevnx::AddTarget): ids are
Option<String>,Framework.languageisOption<String>, andCustomhas
fields (vars,desc,category,required).Commands::Addgained
list,dry_runandjson. - Added:
utils::prompt::{yes_no, require_terminal, require_terminal_or}
(moved frominit, which re-exports them internally).
Tests
tests/support/ is a shared module for integration tests (temp projects, a
real isolated git repository, snapshot normalising, the pty driver).
tests/add_golden.rs pins what add writes byte for byte, and
tests/add_runner.rs runs the training demo's scenes in CI.
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.sha256What's Changed
- test: shared tests/support module (P0-2) by @urwithajit9 in #161
- test(add): lock today's behaviour before the 0.10.2 changes (AD-0) by @urwithajit9 in #162
- add 0.10.2 steps 3–6: parser fix, honest prompts, category fix, one id space by @urwithajit9 in #163
- add: skip existing names, browser copies, custom arguments, list/dry-run/json by @urwithajit9 in #164
- chore(release): 0.10.2 by @urwithajit9 in #165
Full Changelog: v0.10.1...v0.10.2