This was generated by AI during triage.
Agent Brief
Category: enhancement
Summary: Support hosting presets in arkenv init (Phase 1)
Current behavior:
arkenv init creates a boilerplate configuration (env.ts) with default variables (DATABASE_URL, NEXT_PUBLIC_API_URL, etc.). It does not offer any hosting-specific environment variables.
Desired behavior:
- During
arkenv init, prompt the user: "Select a hosting provider preset (optional)" with options:
None (default)
Vercel
Netlify
- If a provider is selected:
- Add their standard environment variables to the generated schema in
env.ts (using correct framework prefixes e.g. NEXT_PUBLIC_ for Next.js, NUXT_PUBLIC_ for Nuxt, VITE_ for Vite).
Preset Schemas (for ArkType validator):
- Vercel:
VERCEL: "string?"
VERCEL_ENV: "'production' | 'preview' | 'development'?"
VERCEL_URL: "string?"
<prefix>VERCEL_ENV: "'production' | 'preview' | 'development'?"
<prefix>VERCEL_URL: "string?"
- Netlify:
NETLIFY: "string?"
CONTEXT: "'production' | 'deploy-preview' | 'branch-deploy'?"
URL: "string?"
DEPLOY_URL: "string?"
<prefix>CONTEXT: "'production' | 'deploy-preview' | 'branch-deploy'?"
<prefix>URL: "string?"
(Note: Generate equivalent schemas for Zod and Valibot validators based on the target validator chosen during init).
Key interfaces:
ProjectOptions type (add optional hostPreset field).
- Prompts in
init command (use @clack/prompts select).
- Templates under
packages/arkenv/src/features/scaffold/templates/ (add hostPreset variables to templates).
Acceptance criteria:
Agent Brief
Category: enhancement
Summary: Support hosting presets in
arkenv init(Phase 1)Current behavior:
arkenv initcreates a boilerplate configuration (env.ts) with default variables (DATABASE_URL,NEXT_PUBLIC_API_URL, etc.). It does not offer any hosting-specific environment variables.Desired behavior:
arkenv init, prompt the user: "Select a hosting provider preset (optional)" with options:None(default)VercelNetlifyenv.ts(using correct framework prefixes e.g.NEXT_PUBLIC_for Next.js,NUXT_PUBLIC_for Nuxt,VITE_for Vite).Preset Schemas (for ArkType validator):
VERCEL: "string?"VERCEL_ENV: "'production' | 'preview' | 'development'?"VERCEL_URL: "string?"<prefix>VERCEL_ENV: "'production' | 'preview' | 'development'?"<prefix>VERCEL_URL: "string?"NETLIFY: "string?"CONTEXT: "'production' | 'deploy-preview' | 'branch-deploy'?"URL: "string?"DEPLOY_URL: "string?"<prefix>CONTEXT: "'production' | 'deploy-preview' | 'branch-deploy'?"<prefix>URL: "string?"(Note: Generate equivalent schemas for Zod and Valibot validators based on the target validator chosen during init).
Key interfaces:
ProjectOptionstype (add optionalhostPresetfield).initcommand (use@clack/promptsselect).packages/arkenv/src/features/scaffold/templates/(add hostPreset variables to templates).Acceptance criteria:
arkenv initprompts the user for a hosting provider.VercelorNetlifyadds the corresponding preset variables to the generated schema.