Define yargs commands as files; your directory tree becomes the CLI.
- 📁 File-Based Command Tree
- 🔒 Type-Safe Arguments
- ⚡ Lazy Group Loading
- 🧩 Command Overlays
- ✅ Test-Time Validation
This Yargs helper function lets you define all your commands as individual files, where their file names and directory structure imply your nested command structure. Supports both JavaScript and TypeScript (on Node 24+).
See the package README for installation and a quick example, and the documentation for guides and options.
pnpm install
pnpm tsc
pnpm lint # oxlint
pnpm lint:fix
pnpm format # oxfmt
pnpm test # vitest
pnpm test:release # checks version selection and release notes without publishing
pnpm audit --audit-level=high
pnpm build:release
pnpm sizeTests cover production TypeScript source, including untested files. Minimum
coverage is 95% statements, 85% branches, 95% functions, and 95% lines. The
published package's JavaScript (gzipped, excluding peer dependencies) has a 10 kB
size budget; adjust it only with a documented reason in the PR. High and critical
dependency advisories fail CI. Coverage reports upload as CI artifacts and to
Codecov via the CODECOV_TOKEN secret; Codecov upload failures are nonblocking,
but the local coverage gate always applies.
Commit history through 09abc19 predates commitlint adoption and is excluded
from CI commit linting; all commits after that boundary are checked (see
.github/workflows/ci.yml's policy job).
See RELEASING.md for how releases are published and GitHub Releases for changes. See SECURITY.md for private vulnerability reporting.
See Contributing Guide.
MIT
Ben Houston, Sponsored by Land of Assets.