Releases: yamcodes/arkenv
@arkenv/vite-plugin@0.1.0
@arkenv/cli@0.2.5
Patch Changes
-
Automatically detect installed ArkEnv agent skill
#109000f504f@yamcodesDuring initialization, check if the
arkenvagent skill is already present in the workspace. If detected, the installation prompt and setup are bypassed, defaulting tofalse, and an informational message confirming the detection is logged. -
Scaffold scanned environment variables as optional types during bootstrap
#1083182d1af@yamcodesThe CLI now generates optional schemas without default fallback values for custom/scanned environment keys during bootstrap:
- ArkType: Scaffolds fields with
"string?"instead of"string = ''" - Zod: Scaffolds fields with
z.string().optional()instead ofz.string().default("") - Valibot: Scaffolds fields with
v.optional(v.string())instead ofv.optional(v.string(), "")
- ArkType: Scaffolds fields with
@arkenv/nextjs@0.0.3
@arkenv/nextjs@0.0.2
Patch Changes
-
Fix client variable type inference
3531758@yamcodesClient environment variables now correctly infer their validated type instead of resolving to
neverfor non-NEXT_PUBLIC_keys.const env = createEnv({ client: { NEXT_PUBLIC_API_URL: "string", }, runtimeEnv: { NEXT_PUBLIC_API_URL: "https://api.example.com", }, }); env.NEXT_PUBLIC_API_URL; // previously `never`, now `string`
@arkenv/nextjs@0.0.1
@arkenv/cli@0.2.4
Patch Changes
-
Fix empty sections in Next.js scaffolded schema
7756fcf@yamcodesThe CLI no longer emits empty
server: {},client: {}, orshared: {}blocks when no variables belong to that section. Previously, scaffolding a project with noNEXT_PUBLIC_*variables producedclient: {}, which caused a TypeScript error:Type '{}' is missing the following properties from type '{ PORT: never; NODE_ENV: never; }': PORT, NODE_ENVserver,client, andsharedsections are now conditionally omitted when empty.runtimeEnvis always emitted as it is required by@arkenv/nextjs. This applies across all three validator templates (ArkType, Zod, Valibot).
@arkenv/cli@0.2.3
Patch Changes
-
Add Next.js support to ArkEnv CLI
97f4c17@yamcodesArkEnv CLI now fully supports initializing ArkEnv in Next.js projects.
- Automatically detect Next.js projects via
package.jsondependencies or config files (next.config.ts,next.config.js, etc.). - Configure framework settings, skip redundant type definition scaffolding, and install
@arkenv/nextjsalong witharktype(which is required by the integration, even when selecting a different validator like Zod or Valibot). - Dynamically split detected variables into
server,client, andsharedfields based on the selected validator (ArkType, Zod, or Valibot), mapping browser/shared variables in theruntimeEnvblock to prevent server secrets from leaking.
- Automatically detect Next.js projects via
@arkenv/cli@0.2.2
Patch Changes
-
Allow scaffolding into non-empty directory when
--forceis used#10613a08754@yamcodesEnsure
--forcepermits new-project scaffolding into a non-empty directory (e.g..) while preventing silent overwrites of user files via a preflight collision check. -
Refactor prompt wizard and steps to be pure and typesafe
#106085380d6@yamcodesRefactored the interactive prompt wizard and individual steps to be pure, modular, and typesafe. Steps now accept explicit configuration options and return normalized results instead of reading the filesystem directly or relying on global mock state.
-
Strip example
packageManagerfields during scaffolding#1055a30c9ae@pullfrogRemove copied example
packageManagerfields during new project scaffolding so installs use the package manager selected by the CLI.
@arkenv/cli@0.2.1
Patch Changes
-
Fix --help table alignment
#1052cf7bd02@yamcodes -
Support POSIX-style short-flag bundling in CLI parser
#1047b2e4865@yamcodesEnables combining multiple short flags (e.g.
-yqinstead of-y -qor-yfqinstead of-y -f -q) in CLI commands. Flag values starting with-(e.g.init -e -abc) are preserved without expansion. -
Validate valued CLI flags and reject missing values
#1051dec2581@yamcodesAdd parser-level validation to reject flags that require a value (e.g.
--exampleor-e) when they are passed without one. A validation error message is set, and the CLI exits with status code 1.
@arkenv/cli@0.2.0
Minor Changes
-
Replace
--name/-nflag with[project-name]positional argument oninitcommand#10413c1c462@yamcodesThe
initcommand now accepts an optional[project-name]positional argument (e.g.,arkenv init my-new-projectorarkenv init .).The
--nameand-nflags have been removed.BREAKING CHANGE: The
--name/-nflags are no longer supported and will result in a parsing error. Use the positional[project-name]argument instead.
Patch Changes
-
Fix working directory resolution when executing via monorepo scripts
169d9bf@yamcodesEnsure that the CLI processes paths and directory status checks relative to the directory where the command was initiated (
INIT_CWD), rather than the monorepo root.This fixes issues where running the CLI locally via workspace runners like
pnpm arkenvfrom outside the workspace root failed with empty-directory checks. -
Fix scaffolding templates for Zod and Valibot validators
#10341c0dbb9@yamcodesVite and Bun fullstack templates now wrap schemas in
type({...}):import { type } from "arkenv"; import { z } from "zod"; export const Env = type({ PORT: z.coerce.number(), });
Vanilla templates now call
arkenv({...})directly without wrapping:import arkenv from "arkenv/standard"; import { z } from "zod"; export const env = arkenv({ PORT: z.coerce.number(), });
-
--examplenow forces the new-project wizard regardless of the current directory#10429116f33@yamcodesPreviously, passing
--examplein a non-empty directory (or one that already has a
package.json) would silently fall through to the existing-project flow, ignoring the
flag entirely. The flag now always triggers the new-project wizard:# Works even in a non-empty directory or one with package.json arkenv init --example basicSpecial case –
arkenv init . --example basic: If you explicitly pass.as the
project name (or type it at the prompt) and the current directory is not empty, the
CLI aborts with a clear error instead of scaffolding into the dirty directory. When the
directory is empty,.is used for the current directory while the package name is
normalized to the current directory's basename as before.