API reference
API, CLI, and package export reference.
These pages are the API, CLI, and package surfaces. Start with options
and init, then open the package that matches your stack.
Configuration
These pages cover options, keywords, schema shapes, and the env object.
options
Configure the second argument to arkenv().
keywords
Use string.host and number.port with @arkenv/core.
schema
Pass a schema map, a compiled type(), or Standard Schema values.
env
Read the validated env object in application code.
Commands
The arkenv package is the CLI. Import validation from @arkenv/core or
@arkenv/standard.
init
Scaffold schemas and hosting presets into a project.
check
Validate the resolved environment against your schema with CI exit codes.
Packages
These pages cover the runtime engines and framework plugins.
@arkenv/core
Validate with ArkType using arkenv() and type().
@arkenv/standard
Validate with Zod, Valibot, or another Standard Schema library.
@arkenv/nextjs
Wire Next.js with withArkEnv and env.gen.ts.
@arkenv/nuxt
Register the Nuxt module.
@arkenv/vite-plugin
Validate in Vite and keep server keys off the client.
@arkenv/bun-plugin
Validate Bun builds and isolate BUN_PUBLIC_ keys.
@arkenv/agent-plugin
Install the coding-agent plugin and MCP audit/init tools.
Global flags
These flags apply to every ArkEnv CLI command.
--yes / -y
Skip interactive prompts and use defaults. The CLI also forwards this flag to subprocesses it starts, including package-manager installs.
Use --yes in scripts. Prefer --agent when a machine must also get
JSON on stdout.
--quiet / -q
Suppress normal log output. On failure, the CLI still captures logs so you can diagnose the run.
--json / -j
Write structured JSON to stdout instead of human-readable text.
--agent
Non-interactive, machine-readable mode for AI agents. This is a macro
for --yes --quiet --json. It does not imply --force; pass
--force yourself if you accept overwriting generated files.
--help / -h
Print CLI help.