Skip to content

Releases: yamcodes/arkenv

@arkenv/vite-plugin@0.1.0

30 May 13:40
ca73038

Choose a tag to compare

Minor Changes

  • Update Vite peer dependency floor to ^4.0.0 #1087 e508608 @yamcodes

    BREAKING CHANGE: Drop support for Vite 2 and Vite 3. Limit the supported Vite range to versions actually validated in CI (Vite 4, 5, 6, 7, and 8).

@arkenv/cli@0.2.5

30 May 13:40
ca73038

Choose a tag to compare

Patch Changes

  • Automatically detect installed ArkEnv agent skill #1090 00f504f @yamcodes

    During initialization, check if the arkenv agent skill is already present in the workspace. If detected, the installation prompt and setup are bypassed, defaulting to false, and an informational message confirming the detection is logged.

  • Scaffold scanned environment variables as optional types during bootstrap #1083 182d1af @yamcodes

    The 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 of z.string().default("")
    • Valibot: Scaffolds fields with v.optional(v.string()) instead of v.optional(v.string(), "")

@arkenv/nextjs@0.0.3

23 May 15:17
d5ad3e3

Choose a tag to compare

Patch Changes

  • Fix Next.js schema string autocomplete #1079 bbab725 @pullfrog

    Provide ArkType DSL contextual typing for server, client, and shared schema values.

@arkenv/nextjs@0.0.2

23 May 14:17
677146f

Choose a tag to compare

Patch Changes

  • Fix client variable type inference 3531758 @yamcodes

    Client environment variables now correctly infer their validated type instead of resolving to never for 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

23 May 10:21
b1c87ce

Choose a tag to compare

Patch Changes

@arkenv/cli@0.2.4

23 May 15:17
d5ad3e3

Choose a tag to compare

Patch Changes

  • Fix empty sections in Next.js scaffolded schema 7756fcf @yamcodes

    The CLI no longer emits empty server: {}, client: {}, or shared: {} blocks when no variables belong to that section. Previously, scaffolding a project with no NEXT_PUBLIC_* variables produced client: {}, which caused a TypeScript error:

    Type '{}' is missing the following properties from type '{ PORT: never; NODE_ENV: never; }': PORT, NODE_ENV
    

    server, client, and shared sections are now conditionally omitted when empty. runtimeEnv is always emitted as it is required by @arkenv/nextjs. This applies across all three validator templates (ArkType, Zod, Valibot).

@arkenv/cli@0.2.3

23 May 14:17
677146f

Choose a tag to compare

Patch Changes

  • Add Next.js support to ArkEnv CLI 97f4c17 @yamcodes

    ArkEnv CLI now fully supports initializing ArkEnv in Next.js projects.

    • Automatically detect Next.js projects via package.json dependencies or config files (next.config.ts, next.config.js, etc.).
    • Configure framework settings, skip redundant type definition scaffolding, and install @arkenv/nextjs along with arktype (which is required by the integration, even when selecting a different validator like Zod or Valibot).
    • Dynamically split detected variables into server, client, and shared fields based on the selected validator (ArkType, Zod, or Valibot), mapping browser/shared variables in the runtimeEnv block to prevent server secrets from leaking.

@arkenv/cli@0.2.2

21 May 17:36
1979ee6

Choose a tag to compare

Patch Changes

  • Allow scaffolding into non-empty directory when --force is used #1061 3a08754 @yamcodes

    Ensure --force permits 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 #1060 85380d6 @yamcodes

    Refactored 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 packageManager fields during scaffolding #1055 a30c9ae @pullfrog

    Remove copied example packageManager fields during new project scaffolding so installs use the package manager selected by the CLI.

@arkenv/cli@0.2.1

21 May 12:12
71ea467

Choose a tag to compare

Patch Changes

  • Fix --help table alignment #1052 cf7bd02 @yamcodes

  • Support POSIX-style short-flag bundling in CLI parser #1047 b2e4865 @yamcodes

    Enables combining multiple short flags (e.g. -yq instead of -y -q or -yfq instead 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 #1051 dec2581 @yamcodes

    Add parser-level validation to reject flags that require a value (e.g. --example or -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

21 May 08:10
3043579

Choose a tag to compare

Minor Changes

  • Replace --name/-n flag with [project-name] positional argument on init command #1041 3c1c462 @yamcodes

    The init command now accepts an optional [project-name] positional argument (e.g., arkenv init my-new-project or arkenv init .).

    The --name and -n flags have been removed.

    BREAKING CHANGE: The --name / -n flags 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 @yamcodes

    Ensure 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 arkenv from outside the workspace root failed with empty-directory checks.

  • Fix scaffolding templates for Zod and Valibot validators #1034 1c0dbb9 @yamcodes

    Vite 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(),
    });
  • --example now forces the new-project wizard regardless of the current directory #1042 9116f33 @yamcodes

    Previously, passing --example in 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 basic

    Special 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.