Skip to content

(v1) CLI scaffold: collapse to canonical env-object family + v0→v1 migration #1332

Description

@yamcodes

Summary

Collapse the CLI scaffold to one canonical family: every framework scaffolds env.ts as the imported env object surface. The #1316 codegen-vs-plugin-env seam dissolves per ADR 0015.

Product call (#1333): Option 3. Schema/define is not a scaffold variant, escape hatch, or soft-deprecated path on v1 — omit it entirely. Teach and scaffold import { env } from "./env" only. Provide a migration path that detects v0 schema/define patterns and rewrites them to the canonical env-object surface when users upgrade.

Scope

Ownership boundary

This issue owns CLI scaffold + migration UX only.

Package API removal of schema/define on v1 is #1461 (separate ready-for-agent chore). Coordinate sequencing so migration UX matches the surface packages actually ship.

Acceptance criteria

  • arkenv init on a Vite or Bun project scaffolds the env-object surface by default and compiles/runs.
  • No schema/define / .d.ts scaffold variant exists; absence is intentional (Option 3).
  • Next/Nuxt scaffolds unchanged in outcome (already env-object).
  • Scaffold strategy code has one framework family, not two.
  • Migration detects v0 schema/define patterns and rewrites to the canonical env-object surface.

Landing

v1 branch only — see ADR 0015 landing strategy (as amended by #1333). Depends on #1328 / #1329. Coordinates with #1289 / #1311 / #1316 / #1320 / #1461. Part of #1105 (ADR: #1326). Unblocked by #1333 Option 3.

Metadata

Metadata

Assignees

No one assigned

    Labels

    @arkenv/cliIssues or Pull Requests involving the ArkEnv CLIenhancementNew feature or improvementready for agentFully specified, ready for immediate implementation

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions