clilyruntime-aware CLI docs

clily documentation

Build typed CLI experiences that stay coherent across validation, config, runtime injection, and shell completion.

clily is a TypeScript CLI framework built around a simple idea: your command model should remain one model.

The same definition that drives parsing should also drive:

  • configuration loading
  • environment variable resolution
  • interactive fallback prompts
  • runtime injection for tests or embedding
  • help text and completion generation

That is the mental model behind @clily/core.

What clily solves

Traditional CLI stacks tend to split across multiple libraries and multiple sources of truth. clily keeps those layers aligned by validating everything through Standard Schema and merging inputs into one resolved object before your handler runs.

CapabilityHow clily approaches it
ValidationAccepts Valibot, Zod, ArkType, or any Standard Schema-compatible schema
Merge precedenceCLI args override env vars, which override config files, which override schema defaults
Runtime behaviorUses a default runtime in Node and supports injected argv, env, cwd, stdout, debug, error, and exit
CompletionsGenerates bash, zsh, fish, and pwsh scripts from the existing command tree
PromptsFills missing required fields interactively when running in a TTY

Documentation map

Choose your path

On this page