feat: Forward-port add host command from #1324 - #1419
Conversation
Bring arkenv add host [provider] onto v1, adapting field rendering to dialects and FRAMEWORK_CLIENT_PREFIXES instead of the v0 template helpers. Co-authored-by: Cursor <cursoragent@cursor.com>
🦋 Changeset detectedLatest commit: c655f28 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/core
@arkenv/fumadocs-ui
@arkenv/nextjs
@arkenv/nuxt
@arkenv/standard
@arkenv/vite-plugin
commit: |
There was a problem hiding this comment.
ℹ️ Minor suggestions only — the feature is well-tested and cleanly wired.
Reviewed changes — forward-port of the add host command from #1324, re-implemented on the v1 CLI using v1 dialects and framework prefixes.
- Add
arkenv add host [provider]command with--yes/--agentsupport and a missing-provider prompt. - Add
mutateEnvConfigto merge Vercel/Netlify preset keys into an existing flatenv.tsviamagicast+ dialect rendering. - Add
PromptPort.selectandClackPromptAdapter.selectfor the interactive provider prompt. - Update CLI dispatch, composition, help, and parser to route both
initandaddcommands. - Add tests for CLI parsing,
AddUseCase,mutateEnvConfig, and help output. - Add a
minorchangeset for thearkenvpackage.
ℹ️ Nitpicks
- Consider updating
apps/www/content/docs/cli/hosting-presets.mdx(orindex.mdx) to documentarkenv add host [provider]alongside the existinginit --host-presetflow.
Kimi K2 (free via Pullfrog for OSS) | 𝕏
Clarify bare `add` errors, share getFieldDefinition, avoid `as any` for clack select, and document `add host` in the CLI docs. Co-authored-by: Cursor <cursoragent@cursor.com>
|
Addressed the Pullfrog review:
|
There was a problem hiding this comment.
✅ No new issues found.
Reviewed changes — the follow-up commits address every thread from the prior review, plus a small autofix formatting pass.
- Updated CLI docs to describe
arkenv add host [provider]for existing flatenv.tsschemas in bothhosting-presets.mdxandindex.mdx. - Fixed bare
arkenv addparsing so it now reportsMissing subcommandinstead ofUnknown argument:. - Removed the
as anycast inClackPromptAdapter.select, routing throughunknownto satisfy Biome underexactOptionalPropertyTypes. - Deduplicated
getFieldDefinitionby exporting it fromfeatures/config-mutationand importing it intoAddUseCase. - Retired all three prior Pullfrog review threads after verifying the fixes.
Kimi K2 (free via Pullfrog for OSS) | 𝕏
| Support adding a hosting provider preset (Vercel or Netlify) to an existing `env.ts` configuration file: | ||
|
|
||
| ```bash | ||
| npx arkenv@next add host [provider] |
There was a problem hiding this comment.
isnt this supposed to be @alpha not @next ? double echeck
There was a problem hiding this comment.
You're right — .changeset/pre.json sets "tag": "alpha", and existing v1 changelogs/changesets use npx arkenv@alpha. Updated the changeset from @next to @alpha.
v1 packages publish under the alpha dist-tag, not next. Co-authored-by: Cursor <cursoragent@cursor.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
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 v1, this PR will be updated.⚠️ ⚠️ ⚠️ ⚠️ ⚠️ ⚠️ `v1` is currently in **pre mode** so this branch has prereleases rather than normal releases. If you want to exit prereleases, run `changeset pre exit` on `v1`.⚠️ ⚠️ ⚠️ ⚠️ ⚠️ ⚠️ # Releases ## arkenv@1.0.0-alpha.9 ### Minor Changes - #### Add `add host` command to CLI for adding hosting presets to existing schemas _[`#1419`](#1419) [`0a559ce`](0a559ce) [@yamcodes](https://github.com/yamcodes)_ Support adding a hosting provider preset (Vercel or Netlify) to an existing `env.ts` configuration file: ```bash npx arkenv@alpha add host [provider] ``` - Prompts interactively to select Vercel or Netlify if the provider is omitted. - Auto-detects the framework (Next.js, Nuxt, Vite, Bun) and the validator engine (Zod, Valibot, or ArkType) to inject the preset fields with the correct syntax. - Fallback to logging the generated variable schemas to stdout with manual configuration instructions if `env.ts` is missing or unparseable. ## @arkenv/nuxt@1.0.0-alpha.9 ### Patch Changes - #### Keep coerced number and boolean env values through the security proxy _[`#1429`](#1429) [`6be63f7`](6be63f7) [@yamcodes](https://github.com/yamcodes)_ Lock the Nuxt security proxy so schema-key reads return the coerced validation target. A key declared as `"number"` or `"boolean"` returns a number or boolean at runtime, not a raw string from Nuxt runtime config / `__NUXT__`. ```ts import { arkenv } from "@arkenv/nuxt"; export const env = arkenv({ NUXT_PUBLIC_PORT: "number", PORT: "number", }); // 3000 (number), not "3000" (string) env.NUXT_PUBLIC_PORT; env.PORT; ``` Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>

Summary
arkenv add host [provider]) fromdevontov1packages/arkenv/(v1 CLI) with dialect-based field rendering viaDIALECTS/tryFormatPresetFieldValueandFRAMEWORK_CLIENT_PREFIXESmutateEnvConfig, promptselect, help/parser coverage, and aminorchangeset forarkenvFixes #1267 (v1 parity)
Test plan
pnpm --filter arkenv exec vitest run(342 tests)pnpm --filter arkenv typecheckarkenv add host vercelagainst a flatenv.tsarkenv add hostinteractive prompt and missing-env.tsfallbackMade with Cursor