feat: drop -e short alias for --example#1370
Conversation
Co-authored-by: Cursor <cursoragent@cursor.com>
🦋 Changeset detectedLatest commit: 1b42f74 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
arkenv
@arkenv/build
@arkenv/bun-plugin
@arkenv/cli
@arkenv/fumadocs-ui
@arkenv/nextjs
@arkenv/nuxt
@arkenv/vite-plugin
commit: |
📦 Bundle Size Report✅ All size limits passed! |
There was a problem hiding this comment.
✅ No new issues found.
Reviewed changes — drops the -e short alias for arkenv init --example and updates tests, help text, docs, and the changeset.
packages/cli/src/cli/cli.ts— removes-efrom the--exampleflag config and adds a comment reserving-efor a possible future--env/--environmentoption.packages/cli/src/cli/commands/help.tsandapps/www/content/docs/cli/index.mdx— no longer list-eas an alias for--example.packages/cli/src/cli/cli.test.tsandpackages/cli/src/cli/commands/help.test.ts— repurpose value-flag coverage to-H/--exampleand add assertions that-eand-yeare rejected as unknown arguments..changeset/drop-example-e-alias.md— documents the breaking change and provides a migration snippet.
Local validation: pnpm --filter @arkenv/cli exec vitest run src/cli/cli.test.ts src/cli/commands/help.test.ts (30 tests passed) and pnpm --filter @arkenv/cli run typecheck both pass.
Kimi K2 (free via Pullfrog for OSS) | 𝕏
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
(#1378) Forward-ports the `-e` short-alias removal from dev PR #1370 (issue #1367) onto the `v1` branch, re-implemented at the v1 package layout (`packages/arkenv/src/**`, package `arkenv`). ## Summary Drops the `-e` short alias for `init --example`, making `--example` **long-form only**. `-e` is permanently reserved so it stays free for a possible future `--env` / `--environment` option. Across the CLI ecosystem (Docker, Kubernetes, Unix), `-e` almost universally means `--env` / `--environment`. AI agents instinctively reach for `arkenv init -e NODE_ENV=production`, which silently bound to the unrelated `--example` flag and consumed the next token — behavior that didn't match intent and triggered retry/hallucination loops. ## Changes - `packages/arkenv/src/cli/cli.ts`: drop the `-e` short alias from the `--example` flag config (kept as `value` kind, long-form only). Added a comment marking `-e` as reserved. Removal flows automatically through `knownFlags`, `valuedFlags`, bundled-short-flag expansion, and the `example` accessor. - `packages/arkenv/src/cli/commands/help.ts`: help output shows `--example` with no short alias. - `apps/www/content/docs/cli/index.mdx`: flags table no longer lists `-e` for `--example`. - Tests updated: assertions that `-e` maps to `--example` are removed/replaced (value-flag coverage repurposed to `-H`/`--example`); new coverage asserts `-e` and `-ye` are rejected as `Unknown argument: -e` while `--example` still works. - Changeset `drop-example-e-alias.md`: `arkenv` **minor**, documented as a **BREAKING CHANGE** (mirrors the `-C`/`-a` removal precedent). ## Forward-port notes - Adapted paths: dev `packages/cli/src/**` → v1 `packages/arkenv/src/**`. - Changeset key `@arkenv/cli` → `arkenv` (v1 package name); migration snippet uses the bare `arkenv init` form to match the existing v1 `trim-short-flag-aliases` changeset. - Updated the still-unreleased v1 `trim-short-flag-aliases.md` changeset to drop `-e` from its "unchanged aliases" list, since it is no longer accurate after this change. ## Behavior - `arkenv init --example <name>` works exactly as before. - `arkenv init -e <name>` → `Unknown argument: -e`. - `-ye` (bundled) → `Unknown argument: -e`. ## Verification - `arkenv` `cli.test.ts` + `help.test.ts` pass (30 tests) with internal deps built. Remaining suite failures are pre-existing sandbox limitations (`git init` denied, smoke tests needing a built binary) and unrelated to this change. Ports #1370 · relates to #1367 Made with [Cursor](https://cursor.com) Co-authored-by: Cursor <cursoragent@cursor.com>
This PR was opened by the [Changesets release](https://github.com/changesets/action) GitHub action. When you're ready to do a release, you can merge this and the packages will be published to npm automatically. If you're not ready to do a release yet, that's fine, whenever you add more changesets to dev, this PR will be updated. # Releases ## @arkenv/cli@0.5.0 ### Minor Changes - #### Drop the `-e` short alias for `init --example` _[`#1370`](#1370) [`b86b999`](b86b999) [@yamcodes](https://github.com/yamcodes)_ **BREAKING CHANGE**: The `-e` short alias is no longer recognized. Its long form, `--example`, continues to work exactly as before. Across the broader CLI ecosystem, `-e` almost universally means `--env` / `--environment`. For a type-safe environment variable library, mapping `-e` to `--example` is a sharp trap: AI agents instinctively reach for `arkenv init -e NODE_ENV=production`, which silently bound to `--example` and consumed the next token as the example name. `-e` is now permanently reserved so it stays free for a future `--env` / `--environment` option. Passing `-e` — standalone or inside a bundle like `-ye` — now fails fast with the standard `Unknown argument: -e` error. Migration: replace the short alias with its long form. ```bash # Before npx @arkenv/cli@latest init -e with-vite-react # After npx @arkenv/cli@latest init --example with-vite-react ``` ### Patch Changes - #### Improve npm keywords across published packages for discoverability _[`#1383`](#1383) [`bf60ab2`](bf60ab2) [@yamcodes](https://github.com/yamcodes)_ Clean up and extend the `keywords` field of every published package so npm search, aggregators, and LLM-powered package discovery surface ArkEnv for the terms users actually search for. - Remove the misleading `pnpm` keyword from `arkenv` and add `env`, `environment-variables`, `dotenv`, `config`, `standard-schema`, and the supported validators `zod` and `valibot`. - Deduplicate the repeated `arkenv` keyword in `@arkenv/vite-plugin`. - Give every env-related package a shared baseline (`env`, `environment-variables`, `dotenv`, `config`, `validation`, `typesafe`, `standard-schema`) alongside their integration-specific terms. - Add a keyword set to `@arkenv/fumadocs-ui`, which previously had none. - #### Add `with-valibot` to the bundled example registry and scaffold defaults _[`#1382`](#1382) [`4aa2e42`](4aa2e42) [@yamcodes](https://github.com/yamcodes)_ Register the new standalone `with-valibot` example so it is offered alongside `with-zod` when scaffolding, including in the offline fallback registry used when the remote registry fetch fails. - Add a `with-valibot` entry to the bundled fallback example registry. - Add `with-valibot` env defaults (`HOST`, `PORT`, `NODE_ENV`) to the scaffold defaults map. ## arkenv@0.12.3 ### Patch Changes - #### Improve npm keywords across published packages for discoverability _[`#1383`](#1383) [`bf60ab2`](bf60ab2) [@yamcodes](https://github.com/yamcodes)_ Clean up and extend the `keywords` field of every published package so npm search, aggregators, and LLM-powered package discovery surface ArkEnv for the terms users actually search for. - Remove the misleading `pnpm` keyword from `arkenv` and add `env`, `environment-variables`, `dotenv`, `config`, `standard-schema`, and the supported validators `zod` and `valibot`. - Deduplicate the repeated `arkenv` keyword in `@arkenv/vite-plugin`. - Give every env-related package a shared baseline (`env`, `environment-variables`, `dotenv`, `config`, `validation`, `typesafe`, `standard-schema`) alongside their integration-specific terms. - Add a keyword set to `@arkenv/fumadocs-ui`, which previously had none. ## @arkenv/bun-plugin@0.1.11 ### Patch Changes - #### Improve npm keywords across published packages for discoverability _[`#1383`](#1383) [`bf60ab2`](bf60ab2) [@yamcodes](https://github.com/yamcodes)_ Clean up and extend the `keywords` field of every published package so npm search, aggregators, and LLM-powered package discovery surface ArkEnv for the terms users actually search for. - Remove the misleading `pnpm` keyword from `arkenv` and add `env`, `environment-variables`, `dotenv`, `config`, `standard-schema`, and the supported validators `zod` and `valibot`. - Deduplicate the repeated `arkenv` keyword in `@arkenv/vite-plugin`. - Give every env-related package a shared baseline (`env`, `environment-variables`, `dotenv`, `config`, `validation`, `typesafe`, `standard-schema`) alongside their integration-specific terms. - Add a keyword set to `@arkenv/fumadocs-ui`, which previously had none. <details><summary>Updated 1 dependency</summary> <small> [`bf60ab2`](bf60ab2) </small> - `arkenv@0.12.3` </details> ## @arkenv/fumadocs-ui@0.0.10 ### Patch Changes - #### Improve npm keywords across published packages for discoverability _[`#1383`](#1383) [`bf60ab2`](bf60ab2) [@yamcodes](https://github.com/yamcodes)_ Clean up and extend the `keywords` field of every published package so npm search, aggregators, and LLM-powered package discovery surface ArkEnv for the terms users actually search for. - Remove the misleading `pnpm` keyword from `arkenv` and add `env`, `environment-variables`, `dotenv`, `config`, `standard-schema`, and the supported validators `zod` and `valibot`. - Deduplicate the repeated `arkenv` keyword in `@arkenv/vite-plugin`. - Give every env-related package a shared baseline (`env`, `environment-variables`, `dotenv`, `config`, `validation`, `typesafe`, `standard-schema`) alongside their integration-specific terms. - Add a keyword set to `@arkenv/fumadocs-ui`, which previously had none. ## @arkenv/nextjs@0.1.4 ### Patch Changes - #### Improve npm keywords across published packages for discoverability _[`#1383`](#1383) [`bf60ab2`](bf60ab2) [@yamcodes](https://github.com/yamcodes)_ Clean up and extend the `keywords` field of every published package so npm search, aggregators, and LLM-powered package discovery surface ArkEnv for the terms users actually search for. - Remove the misleading `pnpm` keyword from `arkenv` and add `env`, `environment-variables`, `dotenv`, `config`, `standard-schema`, and the supported validators `zod` and `valibot`. - Deduplicate the repeated `arkenv` keyword in `@arkenv/vite-plugin`. - Give every env-related package a shared baseline (`env`, `environment-variables`, `dotenv`, `config`, `validation`, `typesafe`, `standard-schema`) alongside their integration-specific terms. - Add a keyword set to `@arkenv/fumadocs-ui`, which previously had none. <details><summary>Updated 1 dependency</summary> <small> [`bf60ab2`](bf60ab2) </small> - `arkenv@0.12.3` </details> ## @arkenv/nuxt@0.0.6 ### Patch Changes - #### Improve npm keywords across published packages for discoverability _[`#1383`](#1383) [`bf60ab2`](bf60ab2) [@yamcodes](https://github.com/yamcodes)_ Clean up and extend the `keywords` field of every published package so npm search, aggregators, and LLM-powered package discovery surface ArkEnv for the terms users actually search for. - Remove the misleading `pnpm` keyword from `arkenv` and add `env`, `environment-variables`, `dotenv`, `config`, `standard-schema`, and the supported validators `zod` and `valibot`. - Deduplicate the repeated `arkenv` keyword in `@arkenv/vite-plugin`. - Give every env-related package a shared baseline (`env`, `environment-variables`, `dotenv`, `config`, `validation`, `typesafe`, `standard-schema`) alongside their integration-specific terms. - Add a keyword set to `@arkenv/fumadocs-ui`, which previously had none. - #### Type the `arkenv` key in `nuxt.config.ts` via `@nuxt/schema` augmentation _[`#1371`](#1371) [`7d541b4`](7d541b4) [@yamcodes](https://github.com/yamcodes)_ Augment `@nuxt/schema`'s `NuxtConfig` and `NuxtOptions` so the `arkenv` module options key is fully typed. Consumers now get autocomplete, type-checking, and JSDoc hovers for `arkenv` options directly in `nuxt.config.ts`, instead of falling back to a loose index signature. `ModuleOptions` is now an alias of the documented `ArkEnvConfigOptions`, so option hovers surface the existing JSDoc / `@default` tags from a single source of truth. ```ts export default defineNuxtConfig({ modules: ["@arkenv/nuxt/module"], arkenv: { schemaPath: "src/env.ts", // autocompleted & type-checked layout: "flat", validate: true, }, }); ``` <details><summary>Updated 1 dependency</summary> <small> [`bf60ab2`](bf60ab2) </small> - `arkenv@0.12.3` </details> ## @arkenv/vite-plugin@0.1.5 ### Patch Changes - #### Improve npm keywords across published packages for discoverability _[`#1383`](#1383) [`bf60ab2`](bf60ab2) [@yamcodes](https://github.com/yamcodes)_ Clean up and extend the `keywords` field of every published package so npm search, aggregators, and LLM-powered package discovery surface ArkEnv for the terms users actually search for. - Remove the misleading `pnpm` keyword from `arkenv` and add `env`, `environment-variables`, `dotenv`, `config`, `standard-schema`, and the supported validators `zod` and `valibot`. - Deduplicate the repeated `arkenv` keyword in `@arkenv/vite-plugin`. - Give every env-related package a shared baseline (`env`, `environment-variables`, `dotenv`, `config`, `validation`, `typesafe`, `standard-schema`) alongside their integration-specific terms. - Add a keyword set to `@arkenv/fumadocs-ui`, which previously had none. <details><summary>Updated 1 dependency</summary> <small> [`bf60ab2`](bf60ab2) </small> - `arkenv@0.12.3` </details> --------- Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>

Fixes #1367
Drops the
-eshort alias for--example, making--examplelong-form only.-eis permanently reserved so it stays free for a possible future--env/--environmentoption.Why
Across the CLI ecosystem (Docker, Kubernetes, Unix),
-ealmost universally means--env/--environment. AI agents instinctively reach forarkenv init -e NODE_ENV=production, which silently bound to the unrelated--exampleflag and consumed the next token — producing behavior that didn't match intent and triggering retry/hallucination loops.Changes
packages/cli/src/cli/cli.ts: drop the-eshort alias from the--exampleflag config (kept asvaluekind, long-form only). Added a comment marking-eas reserved. Removal flows automatically throughknownFlags,valuedFlags, bundled-short-flag expansion, and theexampleaccessor.packages/cli/src/cli/commands/help.ts: help output shows--examplewith no short alias.apps/www/content/docs/cli/index.mdx: flags table no longer lists-efor--example.-emaps to--exampleare removed/replaced (value-flag coverage repurposed to-H/--example); new coverage asserts-eand-yeare rejected asUnknown argument: -ewhile--examplestill works.@arkenv/climinor, documented as a BREAKING CHANGE (mirrors the-C/-aremoval precedent).Behavior
arkenv init --example <name>works exactly as before.arkenv init -e <name>→Unknown argument: -e.-ye(bundled) →Unknown argument: -e.Follow-up
After merge to
dev, run/forward-portto bring this to thev1branch (packages/cli/src/**→packages/arkenv/src/**, changeset key@arkenv/cli→arkenv).Made with Cursor