clilyruntime-aware CLI docs
Concepts

Schema model

clily uses Standard Schema as its contract layer instead of introducing its own validation DSL.

clily accepts any validation library that implements the Standard Schema contract.

That gives you two advantages:

  • you keep the ergonomics of your preferred schema library
  • clily can still derive metadata such as defaults, required fields, and option shapes

Libraries already exercised in the monorepo

LibraryWhere it is used
Valibotexamples/valibot-node-zsh, examples/valibot-node-fish-runtime
Zodexamples/zod-bun-bash
ArkTypeexamples/arktype-deno-pwsh

Type flow

The root command handler receives merged output from:

  • root flags
  • root args, if present

Child command handlers receive merged output from:

  • inherited parent flags
  • that child command's args

This is what allows a deploy handler to read both profile and apiKey without manual type plumbing.

What clily does internally

Internally, schemas are converted into JSON Schema-like metadata that can drive:

  • citty argument definitions
  • default extraction
  • required field detection
  • help text and completion tree generation

That internal representation is an implementation detail. The external contract remains Standard Schema.

On this page