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.
| Capability | How clily approaches it |
|---|---|
| Validation | Accepts Valibot, Zod, ArkType, or any Standard Schema-compatible schema |
| Merge precedence | CLI args override env vars, which override config files, which override schema defaults |
| Runtime behavior | Uses a default runtime in Node and supports injected argv, env, cwd, stdout, debug, error, and exit |
| Completions | Generates bash, zsh, fish, and pwsh scripts from the existing command tree |
| Prompts | Fills missing required fields interactively when running in a TTY |
Documentation map
Install and first command
Configuration layers
Shell completions
Workspace matrix
Public API
v0.1.0 release notes
Choose your path
- New to clily: start with installation and first command.
- Evaluating the architecture: read configuration layers, schema model, and runtime boundary.
- Looking for proven patterns: jump to guides and examples.