strictcli v0.39.0 /typescript/src/app
On this page

Registration and validation: createApp plus the App and Group classes storing commands, groups, deprecated entries, and global flags in insertion order.

#typescript/src/app

#typescript/src/app

Registration and validation: createApp plus the App and Group classes storing commands, groups, deprecated entries, and global flags in insertion order.

The runtime classes (AppImpl/GroupImpl) are internal -- index.ts exports only createApp and the App/Group interfaces. Later modules (parse, routing, help) import the classes from this module directly.

Registration order is data: commands, groups, deprecated commands, and global flags are stored in insertion order (Maps/arrays) for later help rendering. Mirroring the siblings, top-level command/group registration does NOT check name collisions (last registration wins); nested groups DO (group/command/deprecated collision checks), exactly like Python and Go.

#AppSpec

TS typescript
export interface AppSpec

Configuration for creating a new strictcli application via createApp().

#GroupSpec

TS typescript
export interface GroupSpec

Configuration for creating a command group via app.group() or group.group().

#Group

TS typescript
export interface Group

A named container for commands and nested groups, organizing the CLI hierarchy.

#Result

TS typescript
export interface Result

Returned by app.test(): captured output, exit code, and outcome data.

#App

TS typescript
export interface App

The top-level CLI application, created via createApp().

#RunChecksOptions

TS typescript
export interface RunChecksOptions

Options for App.runChecks (Go RunChecksOptions / Python run_checks kwargs).

#RunChecksResult

TS typescript
export interface RunChecksResult

Result of App.runChecks.

#createApp

TS typescript
export function createApp(spec: AppSpec): App

Creates a new strictcli application. This is the primary entry point for building a CLI: configure the app via AppSpec, register commands and groups on the returned App, then call app.run() to parse argv and dispatch.

#RESERVED_GLOBAL_SHORT_NAMES

TS typescript
export const RESERVED_GLOBAL_SHORT_NAMES: ReadonlySet<string> = new Set([

Names reserved by the framework for global flags. The pre-existing set is also what a SHORT flag name is checked against (the effects-regime quartet bans long names only -- it has no short forms).

#RESERVED_GLOBAL_FLAG_NAMES

TS typescript
export const RESERVED_GLOBAL_FLAG_NAMES: ReadonlySet<string> = new Set([

#markFrameworkHandler

TS typescript
export function markFrameworkHandler<T extends object>(fn: T): T

Records a handler as framework-minted. Package-internal.

#FRAMEWORK_INTERNAL_FORWARDING_REASON

TS typescript
export const FRAMEWORK_INTERNAL_FORWARDING_REASON =

The one reason string strictcli's own auto-registered commands use. Their handlers must absorb the app's app-defined global flag values, which a framework-authored handler cannot name.

#defineFrameworkCommand

TS typescript
export function defineFrameworkCommand(

Builds one of strictcli's own auto-registered commands (check and the five config subcommands). They go through the same single validated registration path as every consumer command -- there is no direct-carrier construction bypass left.

#RegisteredCommand

TS typescript
export interface RegisteredCommand

A registered command: the carrier plus registration-time derived data.

#GroupImpl

TS typescript
export class GroupImpl implements Group

#AppImpl

TS typescript
export class AppImpl implements App
Search