One configuration story
Model flags and args once, then let clily merge CLI input, environment variables, local config, and schema defaults into a single validated object.
clily is the framework behind @clily/core: a runtime-aware command system that validates with Standard Schema libraries, merges config layers deterministically, and generates shell completions from the same command tree you execute.
import { clily } from '@clily/core'
import * as v from 'valibot'
const run = clily({
name: 'release',
completion: true,
flags: v.object({
verbose: v.optional(v.boolean(), false),
}),
children: {
deploy: {
args: v.object({ apiKey: v.string() }),
handler: async (args) => {
console.log(args.apiKey, args.verbose)
},
},
},
})
await run()Merge order
CLI args → env vars → config files → schema defaults.
Execution model
One typed argument object, whether you run in Node or inject your own runtime boundary.
Model flags and args once, then let clily merge CLI input, environment variables, local config, and schema defaults into a single validated object.
Use the default runtime in Node, or inject argv, env, cwd, stdout, debug, and exit behavior when you need Bun, Deno-style flows, tests, or embedding.
Generate bash, zsh, fish, and PowerShell completions without maintaining a second command graph or a separate shell integration layer.
Docs map
Start here
Install the package, choose a schema library, and ship your first typed command.
ExploreCore model
Understand merge precedence, Standard Schema usage, and the runtime boundary.
ExplorePractical work
Learn completions, prompts, testing, and embedding patterns from real examples.
ExploreMonorepo tour
See the workspace matrix spanning Valibot, Zod, ArkType, Node, Bun, and Deno-style flows.
ExploreProduction-grade monorepo
That matters for the docs because every guide can point to a concrete workspace: Node + Valibot + zsh, Bun + Zod + bash, Deno-style + ArkType + pwsh, and runtime injection + fish.
Node + Valibot + zsh completion
Bun + Zod + bash completion
Deno-style runtime + ArkType + pwsh
Injected stdout/exit hooks + fish