Skip to main content

stricli

Build complex CLIs with type safety and no dependencies

Full TypeScript Support

TypeScript types for command named flags and positional arguments are defined once and then flow through the entire application.

Zero Dependencies

Stricli is a self-contained command line parser that has no runtime dependencies. This is due to the powerful, yet strictly limited scope of supported features.

Dual ESM + CommonJS

This package is published with support for both ESM and CJS consumers (although ESM is recommended).

Ready for Code Splitting

Command implementations are defined separately from their parameters, allowing for async imports and code splitting with ESM build tools. Run --help without ever importing a single runtime dependency.

Optional Dependency Injection

All system access is encapsulated in a single context object which allows for easier dependency injection and mocking for unit tests.

Dynamic Autocomplete

Stricli has first class support for shell autocomplete that can include custom dynamic suggestions at runtime.