Envil CLI
Generate app environment definitions and empty examples without executing application code.
The CLI has two commands:
envil init
envil example
envil init
Generate a server environment starter without choosing a client runtime:
envil init
Infer server and client fragment schemas from a dotenv file:
envil init --from .env
envil init --from .env.example
Useful options:
--client-prefix <prefix>
--output <path>
--force
Values are held only in memory and are never copied into generated TypeScript.
Connection URLs and credential-like server names are redacted automatically.
The generated definition includes inferred schemas and any detected client
prefix, but leaves runtimeEnv for the application to configure explicitly.
envil example
Generate empty runtime keys from an exported app environment:
envil example --input src/env.ts
Useful options:
--export <name>
--output <path>
--force
The command uses the TypeScript Compiler API and never imports the application
module, reads process.env or import.meta.env, runs an environment Effect, or
calls a resolver.
Only runtime-environment-backed variables are emitted. Resolver-backed variables
and static shared values are omitted. fromEnv mappings and fragment prefixes are
reflected in the output.