# Stricli > Build complex CLIs with type safety and no dependencies ## Stricli ### Features #### [🗃️ Command Routing](/stricli/docs/features/command-routing.md) [2 items](/stricli/docs/features/command-routing.md) --- ### Getting Started #### [📄️ Overview](/stricli/docs/getting-started/overview.md) [Stricli is a zero-dependency framework for building complex, highly-featured CLIs in TypeScript.](/stricli/docs/getting-started/overview.md) --- ### Argument Parsing Extending from our core principle of [When Parsing, Form Follows Function](/stricli/docs/getting-started/principles.md#when-parsing-form-follows-function), Stricli infers the shape of parameter definitions from the TypeScript types used in the implementation. This is achieved with some advanced conditional types that map the types of the parameters to the types of the parser specifications. Stricli supports both [named flags](/stricli/docs/features/argument-parsing/flags.md) and [positional arguments](/stricli/docs/features/argument-parsing/positional.md) when defining parameters. TypeScript `strict` recommended for type checking Stricli relies on TypeScript to infer the types of the parameters. Through a series of conditional types, the type of the parameters in the implementation function are mapped to the types of the parser specifications. Many of these transforms do not behave as expected when the TypeScript compiler is not configured with `strict: true`. Specifically, the option `strictNullChecks` is known to be incompatible with the conditional types used to infer if a parameter is optional or not. So in order to ensure that the types are correctly inferred, it is **strongly recommended** that all Stricli projects (using TypeScript) are built with `strict: true`. --- ### Named Flags Flags are named, non-positional arguments that are passed to a command. They can be passed in any order, and depending on the type and configuration can be repeated or excluded. ##### Case Style[​](#case-style "Direct link to Case Style") By default, Stricli will ensure that flag names are matched exactly. However, the [`scanner.caseStyle`](/stricli/docs/features/configuration.md#scanner-case-style) configuration option allows you to specify `"allow-kebab-for-camel"`. This extends the argument scanner to allow kebab-case versions of camelCase flag names. For example, a flag that is normally passed as `--allowEdits` could also be passed as `--allow-edits`. There is a separate configuration option [`documentation.caseStyle`](/stricli/docs/features/integrations/help-text.md#display-case-style) that controls which case style is used when displaying help text and documentation. By default, the documentation option will reflect the scanner option, but this can be manually overridden. ##### Aliases[​](#aliases "Direct link to Aliases") Within Stricli, aliases refer to the alternate, single-character name of an existing flag. These only require a single `-` escape and can be batched together as a single argument `-abc` (equivalent to `-a -b -c`). Any single uppercase or lowercase character can be used as an alias, but be aware that some characters may conflict with [integrations](/stricli/docs/features/integrations.md). For the [default integrations](/stricli/docs/features/integrations.md#default-integrations), the following aliases are reserved and cannot be used: * `-h` (reserved for `--help`) * `-H` (reserved for `--helpAll`) * `-v` (reserved for `--version` when [version information](/stricli/docs/features/integrations/version-information.md) is provided) #### Types[​](#types "Direct link to Types") To be generic and flexible, Stricli supports parsing strings to any specified type. However, Stricli also provides additional support for several built-in types that have extended functionality not available to traditional parsed flags. ##### Parsed[​](#parsed "Direct link to Parsed") The base flag type supported by Stricli is `parsed`. To use a parsed flag, you must provide a function that accepts a string and then returns a type that matches the associated type. Stricli provides some built-in parsers for booleans and numbers, but ultimately how you perform this parsing/validation is up to you. There are some great third party libraries like [`zod`](https://zod.dev/) or [`typanion`](https://mael.dev/typanion/) that are perfect for this, depending on your use case. ##### Enumerations[​](#enumerations "Direct link to Enumerations") Stricli encounters all arguments as strings, and if there is an explicit set of valid string values then the `enum` flag type could be useful. Given a TypeScript union of string literals (ex: `"a" | "b" | "c"`) the parameter specification can provide a set of all values that should be supported by the flag (ex: `["a", "b", "c"]`). It will then include all values in the help text, and type check a default value if provided. For [auto-complete proposals](/stricli/docs/features/shell-autocomplete.md), it will automatically suggest any values that match the current partial input. ##### Booleans (with Negation)[​](#booleans-with-negation "Direct link to Booleans (with Negation)") Instead of parsing a flag value as a raw boolean (`--flag=true/false`), you could instead use the special `boolean` flag type which has a few enhancements. Since boolean flags can only have two values, the presence of the flag can be used to determine the value instead (`--flag`/`-f`). However, depending on the [default value](#defaults), it may be useful to allow for negation. By default, Stricli automatically supports additional flags prefixed with `no` to indicate the opposite value (`--noFlag` or `--no-flag` depending on [case style](#case-style)). This type uses the provided `looseBooleanParser` under the hood to allow for values like `yes`/`y` (for `true`) and `no`/`n` (for `false`). The negation behavior can be controlled using the `withNegated` option: * When `withNegated` is not set or set to `true` (default), a negated version of the flag (e.g., `--noQuiet` for `--quiet`) will be genereated * When `withNegated` is set to `false`, the negated flag is disabled and only the base flag name is available This is particularly useful when you want to prevent confusing flag combinations or when the semantics of the flag don't make sense with negation. Here's an example with `withNegated: false`, where the negated is disabled: ##### Counters[​](#counters "Direct link to Counters") Stricli exposes a `numberParser` to support parsing input strings to numbers. However, instead of parsing the flag value as an integer (`--flag=1`), you could instead use the special `counter` flag type which has a few enhancements. This type only applies to integers, not all numbers and is best used when counting the number of appearances of a given flag in the arguments. Each appearance of the flag increments the counter by 1. #### Variants[​](#variants "Direct link to Variants") Most flags support several different variants, some of which are enforced through type checking. ##### Optional[​](#optional "Direct link to Optional") If a flag property is optional, or is otherwise possibly `undefined` then it must have `optional: true` in its configuration. This is enforced by TypeScript based on the type of the corresponding property. When a property exists on the type used to define the flags, it must be represented in the specification. In cases where the type that defines the flags is derived from some other type, and you do not want an optional property to be made available as a flag the property should be manually removed (i.e. `Omit`). ##### Empty[​](#empty "Direct link to Empty") It can be valuable to distinguish between `--flag` and `--flag value`. For `parsed` flag types, this behavior is available with the `inferEmpty` attribute. When this is true and the flag is encountered without an input, the input is inferred as the empty string `""` instead. ##### Defaults[​](#defaults "Direct link to Defaults") Any flag can specify a default value as a string. For `parsed` flag types, this string will be parsed before being passed to the implementation. For `enum` flag types, this value is type checked against the list of possible values. For variadic flags, you can specify an array of default values. Each default value will be validated (for `enum` flags) or parsed (for `parsed` flags) before being passed to the implementation. ##### Variadic[​](#variadic "Direct link to Variadic") A flag can be variadic when the type it represents is an array of values. In this case, the flag can be specified multiple times and each value is then parsed individually and added to a single array. If the type of a flag is an array it must be set as variadic. If the `variadic` config property is set to a string, Stricli will use that as a separator and split each input string. This is useful for cases where the input string is a single value that contains multiple values separated by a specific character (like a comma). Variadic flags support [default values](#defaults) as an array of strings (for `parsed` flags) or an array of valid enum values (for `enum` flags). ##### Hidden[​](#hidden "Direct link to Hidden") If a flag has already been marked optional, then it can also be marked as hidden. This means that the flag will not appear in the default help text, documentation, or auto-complete proposals. Hidden flags should be reserved for features that aren't necessarily user facing, but are advanced or debug-related. The an additional system flag `--helpAll` (or `--help-all` depending on case style) will always include all flags, even hidden ones. --- ### Positional Arguments All non-flag arguments passed to the CLI are considered in order, parsed, and then passed to the rest arguments of the command. While flags can be parsed or additionally support a variety of [built-in types](/stricli/docs/features/argument-parsing/flags.md#types), all positional arguments must be parsed from strings with a provided parser. These support any strings, but by default any inputs starting with `-` or `--` will be interpreted as [flags](/stricli/docs/features/argument-parsing/flags.md) instead. To escape this behavior, consider using the [argument escape sequence](/stricli/docs/features/configuration.md#argument-escape-sequence). #### Variadic Limits[​](#variadic-limits "Direct link to Variadic Limits") Stricli reserves the first argument in the implementation function for [Flags](/stricli/docs/features/argument-parsing/flags.md) and considers the rest as positional arguments. While it is possible to have overloads or other complex function signatures, Stricli only supports cases where the arguments are either all explicitly specified `(flags, a, b, c) => {}` or a single rest array where all of the elements are the same type `(flags, ...args: T[]) = {}`. ##### Tuples[​](#tuples "Direct link to Tuples") When the function arguments are individually specified, Stricli will infer the types of the parameter definitions. ##### Homogenous Arrays[​](#homogenous-arrays "Direct link to Homogenous Arrays") The only other supported pattern for command functions matches the flags as the first argument and then the rest of the arguments as a single array with a single type. This element type of the array could be a more complex type depending on the parse function provided. ###### Bounds[​](#bounds "Direct link to Bounds") In general TypeScript, it is possible to use a tuple type as the type of a rest parameter. This allows for more complex function signatures to be represented. These [are not supported](#variadic-limits), but Stricli does provide some additional features for homogenous arrays. The `minimum` and `maximum` bounds can be provided to a parameter, and then Stricli will ensure that any encountered arguments fall within those bounds. #### Variants[​](#variants "Direct link to Variants") Most positional arguments support variants, some of which are enforced through type checking. ##### Optional[​](#optional "Direct link to Optional") If an argument is optional, or is otherwise possibly `undefined` then it must have `optional: true` in its configuration. This is enforced by TypeScript based on the type of the corresponding property. ##### Default[​](#default "Direct link to Default") Any argument can specify a default value as a string. This string will be parsed before being passed to the implementation. #### Placeholder[​](#placeholder "Direct link to Placeholder") Positional arguments don't truly have names as a name cannot be included in the input (for named arguments, use [flags](/stricli/docs/features/argument-parsing/flags.md) instead). However, they still have a semantic meaning and it can be useful to refer to it with a name for simplicity. To avoid confusion with named flags, you can specify a "placeholder" for positional arguments. These placeholders are used in the auto-generated usage lines and in the help text. --- ### Command Routing Applications are the top-level object that encapsulate all of the logic for a given CLI application. They can be built with a single [command](/stricli/docs/features/command-routing/commands.md) as the root or a [route map](/stricli/docs/features/command-routing/route-maps.md) of nested subcommands. caution Depending on which [integrations](/stricli/docs/features/integrations.md) are provided, the application may automatically include additional flags and functionality. For example, if [version information](/stricli/docs/features/integrations/version-information.md) is provided, then the application will automatically include a `--version` flag (with alias `-v`) to print the current version of the application. None of the nested commands can be specified with flags or aliases that conflict with the provided integrations, and doing so will cause an error to be thrown when the application is built. When defining an application, there are several [configurations](/stricli/docs/features/configuration.md) that should be specified (although all have default values). --- ### Commands Commands are the true building blocks of any CLI application. In order to create a new command, call the `buildCommand` function with the entire specification for that command's parameters and documentation. The argument object for the builder accepts the following properties. #### Implementation[​](#implementation "Direct link to Implementation") ##### Lazy `loader`[​](#lazy-loader "Direct link to lazy-loader") The `loader` is a function that asynchronously returns a command module. The module should either be the command's implementation function or a default export of the same. ```ts /// impl.ts export default function(flags: {}) { console.log("This is the primary function"); } export function alt(flags: {}) { console.log("This is the alternative function"); } /// commands.ts const primaryCommand = buildCommand({ loader: async () => import("./impl"), ... }); const altCommand = buildCommand({ loader: async () => { const { alt } = await import("./impl"); return alt; }, ... }); ``` The asychronous nature of the loader is designed particularly for [dynamic import](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/import) expressions, so that the command can be defined and referenced when parsing/generating help text without loading the entire implementation. This also means that Stricli works well with bundlers that provide code splitting/async loading, and only the requested command's implementation is loaded at runtime. ##### Direct `func`[​](#direct-func "Direct link to direct-func") If lazy loading is not desired, there is an option to co-locate the specification and the implementation into the same object. The `func` property is an alternative to `loader` should just be the implementation of the function. ```ts /// commands.ts const command = buildCommand({ func(flags: {}) { console.log("This is the inline function"); }, ... }); ``` #### Parameters[​](#parameters "Direct link to Parameters") The parameters object is a specification of all of the parameters (arguments and flags) that the command should accept. For more information about this specification, check out the section on [argument parsing](/stricli/docs/features/argument-parsing.md). #### Documentation[​](#documentation "Direct link to Documentation") A base level of documentation is required, and more is always appreciated. All commands must specify a value for `brief` that contains a short line of text to be used when referring to this command throughout the help text of the application. Optionally, you can further customize the help text for this specific command by including `fullDescription` or `customUsage`. The former will override `brief` in the command's help text and can contain multiple lines of text rather than just one. The `customUsage` property will replace the auto-generated usage lines, and is useful when there's some [additional validation of user inputs](/stricli/docs/features/out-of-scope.md#cross-argument-validation) that isn't represented natively by Stricli. You can also provide an object with `input` and `brief` to print a description after the usage line. --- ### Route Maps For CLI applications with more than one command, route maps are the way to organize and nest these commands so that they are accessible to users. In order to create a new route map, call the `buildRouteMap` function with a mapping of route names to targets. The argument object for the builder accepts the following properties. #### Routes[​](#routes "Direct link to Routes") The `routes` object is a simple mapping from route names to targets. The route names specified here are affected by the [scanner case style config](/stricli/docs/features/configuration.md#scanner-case-style) when provided at runtime. ```ts /// commands.ts const primaryCommand = ... const altCommand = ... buildRouteMap({ routes: { primary: primaryCommand, alt: altCommand, }, ... }); ``` When defining routes, a target can be any command or even another route map. When a route map is specified the usage line that is generated for the help text will list out the names of the sub-routes for that map as options. ```ts /// commands.ts const itemActionsRouteMap = buildRouteMap({ routes: { create: createItemCommand, rename: renameItemCommand, delete: deleteItemCommand, }, ... }); const root = buildRouteMap({ routes: { login: loginCommand, item: itemActionsRouteMap, }, ... }); ``` The route map configuration above will produce a command with the following behavior: ```sh run --help USAGE run login run item create|rename|delete run --help COMMANDS login Login with auth credentials item Actions that manipulate items run item --help USAGE run item create run item rename run item delete run item --help Actions that manipulate items COMMANDS create Create a brand new item rename Rename an existing item delete Delete an item ``` ##### Default Command[​](#default-command "Direct link to Default Command") In some situations, particularly migrations, it can be useful to turn a single command into multiple commands. When a set of inputs resolve to a route map, the default behavior is to print the help text and discard any other inputs. With the `defaultCommand` configuration, all inputs that resolve to a route map instead invoke this default command. The default command must be registered as a route in that route map. This prevents the case where it becomes impossible to invoke a command with an argument that matches the name of another route. Note that this means that all inputs that were considered invalid routes will now be passed as inputs to the default command. ```ts buildRouteMap({ routes: { foo: fooCommand, bar: buildRouteMap({ routes: { old: oldBarCommand, new: newBarCommand, }, defaultCommand: "old", }), }, }); ``` The route map configuration above will produce a command with the following behavior: ```sh run --help USAGE run foo run bar run --help run bar --help USAGE run bar old run bar new run bar --help run bar old OLD BAR COMMAND run bar new NEW BAR COMMAND run bar OLD BAR COMMAND ``` ##### Aliases[​](#aliases "Direct link to Aliases") For one reason or another, it may make sense to expose the same command multiple times under different names. Since the routes are defined by the route map, it is easy to just re-use the same target in multiple places. However, this option exists as an alternative that makes it easier to add aliases for a given route. ```ts /// commands.ts buildRouteMap({ routes: { open: openCommand, close: closeCommand, }, aliases: { reopen: "open", }, ... }); ``` The route map configuration above will produce a command with the following behavior: ```sh run --help USAGE run open run close run --help COMMANDS open Open the connection close Close the connection run open --help USAGE run open run open --help Open the connection ALIASES run reopen ``` #### Documentation[​](#documentation "Direct link to Documentation") A base level of documentation is required, and more is always appreciated. All route maps must specify a value for `brief` that contains a short line of text to be used when referring to this route throughout the help text of the application. Optionally, you can further customize the help text for this specific command by including `fullDescription`. This will override `brief` in the command's help text and can contain multiple lines of text rather than just one. There is also an additional `hideRoute` object that allows you to hide certain routes from showing up in documentation. ```ts /// commands.ts buildRouteMap({ docs: { brief: "This is a brief description of the routes", fullDescription: [ "This is the full description of the routes.", "It should include all of the necessary details about the subcommands within.", "It will only be displayed to the user in the help text for this route.", ].join("\n"), hideRoute: { secret: true, }, }, ... }); ``` The command configuration above will produce a command with the following behavior: ```sh run --help USAGE run subcommand1|subcommand2 run --help This is the full description of the routes. It should include all of the necessary details about the subcommands within. It will only be displayed to the user in the help text for this route. ``` --- ### Configuration The Stricli framework was designed to give applications the maximum amount of flexibility within the predefined constraints. When [building an application](/stricli/docs/features/command-routing.md), you can specify additional configurations to control the application behavior in different ways. #### Application Name (`name`)[​](#application-name-name "Direct link to application-name-name") The name of the application, should match the name of the executable that users will invoke on the command line. #### Input Scanning (`scanner`)[​](#input-scanning-scanner "Direct link to input-scanning-scanner") The scanner is the internal system in Stricli that processes user inputs from the command line and determines which route/command to run and the arguments to run it with. Configuration for this system is controlled by the `scanner` property in the application configuration. ##### Scanner Case Style[​](#scanner-case-style "Direct link to Scanner Case Style") As route, command, and flag names are all defined in the specification as object properties, it is likely that stylistic preferences will force these properties to adhere to **camelCase** styling. However, many CLI applications also support or require **kebab-case** style for naming at runtime. The `caseStyle` configuration allows you to adjust what to accept as input. The default value for this configuration is `original`, which requires that any input match the defined name exactly. The other option is `allow-kebab-for-camel`, which augments the scanner and additionally allows the **kebab-case** style version of any **camelCase** style name. The conversion relies on converting upper case letters to lower case with a preceding `-`. ##### Argument Escape Sequence[​](#argument-escape-sequence "Direct link to Argument Escape Sequence") Stricli scans the user input to determine how to parse that input into flags and positional arguments. Due to the fact that every input string with a leading `-` is treated as a potential flag, it can be useful to bypass this behavior in some circumstances. The user can specify `--` which indicates to the scanner that any following inputs should be treated as positional arguments. This feature is controlled by the `allowArgumentEscapeSequence` property, which defaults to `false`. The following is an example command that prints flags and args to stdout. With `allowArgumentEscapeSequence=false` ```sh run --foo -- --bar { foo: true, bar: true }, ["--"] ``` With `allowArgumentEscapeSequence=true` ```sh run --foo -- --bar { foo: true }, ["--bar"] ``` ##### Distance Calculation[​](#distance-calculation "Direct link to Distance Calculation") When input scanning fails to find a route/command or flag, Stricli will include suggested alternatives in the error message (`"did you mean ___?"`). Stricli calculates the [Damerau-Levenshtein distance](https://en.wikipedia.org/wiki/Damerau%E2%80%93Levenshtein_distance) of all potential alternatives and returns only those that have a distance below a certain threshold. By default, this distance threshold is `7` with specific weights for certain operations (insertion=1, deletion=2, substitution=2, transposition=0). However, it can be customized to any value by editing the `distanceOptions` property. #### Localization (`localization`)[​](#localization-localization "Direct link to localization-localization") Every single string of text that is printed by a Stricli application can be customized and controlled by the `localization` configuration. The only exception to this is the internal errors that are thrown by `buildApplication` if the application specification itself was invalid in some way. ##### Application Text[​](#application-text "Direct link to Application Text") The text for an application is composed of several static values and several dynamic functions for errors. The static values are primarily used for documentation, which includes the section headers (`USAGE`, `COMMANDS`, `FLAGS`, etc.), keywords (`optional`, `default`, etc.), and built-in briefs (`Print this help information and exit`, etc.). You can customize this text by providing a custom [`ApplicationText`](/stricli/packages/core/interfaces/ApplicationText.md) object. ##### Locale-specific Text[​](#locale-specific-text "Direct link to Locale-specific Text") The `context` object provided to the `run` command may optionally include a `locale` property that can be used to control what text is used by the application. For this section, locale roughly refers to [IETF language tag](https://en.wikipedia.org/wiki/IETF_language_tag), but since application owners provide both the locale and the text loader that interprets the locale, any locale scheme can be used. When setting up locale support a default locale must be provided for when the `context` object does not define its own `locale` property. If a default locale is not explicitly set in the configuration, it will be `en`. The `loadText` function is responsible for loading the [application text](#application-text) object for the requested locale. It can return `undefined` but doing so will print an error message to stderr and the application will switch to the default locale. #### Custom Exit Code (`determineExitCode`)[​](#custom-exit-code-determineexitcode "Direct link to custom-exit-code-determineexitcode") When a command's implementation function throws an exception, that triggers a failure which will force the application to return an exit code of `1`. If you wish to customize this behavior, you can specify a `determineExitCode` function in the application config that reads the exception and returns your desired exit code. #### Disable ANSI Color[​](#disable-ansi-color "Direct link to Disable ANSI Color") Stricli has support for ANSI terminal styling codes, if it is supported by the current streams (with sufficient color depth). Color and styling can be temporarily disabled for each run by setting the `NO_COLOR` or `FORCE_COLOR` common environment variables, or the specific `STRICLI_NO_COLOR` variable which will only affect Stricli applications. The `documentation.disableAnsiColor` config value can also be used to forcibly disable ANSI color codes for all runs of an application, no matter what the environment variables are set to. #### Migrated to Integrations[​](#migrated-to-integrations "Direct link to Migrated to Integrations") In order to provide more flexibility and to reduce bloat in the application configuration, some functionality has been rewritten as [integrations](/stricli/docs/features/integrations.md). The application configuration object has properties for `documentation` and `versionInfo` which have now been migrated to the [`help`](/stricli/docs/features/integrations/help-text.md) and [`version`](/stricli/docs/features/integrations/version-information.md) integrations respectively. Under the hood, when no integrations are provided, Stricli still reads from these configuration properties to build the [default integrations](/stricli/docs/features/integrations.md#default-integrations). The result is that setting these properties will result in the exact same behavior, but they will be removed in a future major version release. Please migrate your application to use the integrations directly instead. --- ### Integrations Integrations are a way to provide additional functionality to a Stricli application without requiring the application to implement that functionality itself. #### Lifecycle Hooks[​](#lifecycle-hooks "Direct link to Lifecycle Hooks") At several key points during the lifecycle of a Stricli application run, integrations can be called to perform additional logic. These lifecycle hooks are (in order): * `app:start` * `command:start` (only called before command execution) * `command:end` (only called after command execution) * `app:end` All lifecycle hooks are called in the order that they are defined in the `integrations` object. The hook gains access to the context and (for `command:*` hooks) information about the current run, including the command that was executed and the unprocessed inputs via the result of the route scan. For both of the `*:end` hooks, the result of the command execution (the exit code) is also provided. warning If any of the hooks throw an error, the application will print the error to stderr and exit with a unique code. To prevent this, you can wrap your hook logic in a try/catch block and handle the error yourself. #### Application Flags[​](#application-flags "Direct link to Application Flags") Integrations can also provide additional flags to the application. These flags will be automatically added alongside existing flags for commands and route maps. The match the name of the property on the integrations object (with full respect of the current [case style](/stricli/docs/features/configuration.md#scanner-case-style)). There are several flags that can control the appearance of these flags. * `brief` - The in-line documentation for this flag. * `aliases` - An array of single-character aliases for this flag. * `hidden` - If set to `true`, this flag will not be included in the default help text. * `global` - If set to `true`, this flag will be available on all commands, not just the root command. * `complete` - If set to `true`, this flag will be included in the auto-complete suggestions for the application. When the flag is requested by the user, the `run` function will be called with similar arguments to the `command:start` hook with the addition of the other additional flags. The `run` function can be asynchronous and can return a promise. It will always result in a `0` exit code unless an error is thrown, in which case the application will print the error to stderr and exit with a unique code. note When the user's inputs result in a route map being targeted, and there is no active flag, then Stricli will look for an integration with `defaultForRouteMap` set to `true`. If one is found, it will be executed as if the user had requested that integration's flag. This exists primarily to allow for the `--help` flag to be automatically executed when a user lands on a route map without specifying a subcommand or flag. #### Default Integrations[​](#default-integrations "Direct link to Default Integrations") The following integrations are provided by default for all Stricli applications that do not provide their own. They can be overridden by providing your own integrations, which allows you to supply them with alternate names, aliases, or configurations. Note that if you provide any integrations, you must provide all of the integrations that you want to use, as Stricli will not automatically merge your integrations with the default integrations. note You can register these provided integrations yourself with alternate options. For example, if you want to have `--version` but `-V` instead of `-v` you can configure the integration with `alias: "V"` directly instead. Or if you would prefer to use `-v` as an alias for a different flag like `--verbose`, you can remove the alias entirely with `alias: false`. ##### `--help`/`--helpAll` ([Help Text](/stricli/docs/features/integrations/help-text.md))[​](#--help--helpall-help-text "Direct link to --help--helpall-help-text") By default, Stricli applications have global `--help` and `--helpAll` flags that print out the help text for the application. The `--help` flag will not include any hidden flags, while the `--helpAll` flag will include all flags and routes, even if they are hidden. The `--helpAll` flag is not included in the default help text, but can be made visible by setting `documentation.alwaysShowHelpAllFlag` to `true` in the [configuration](/stricli/docs/features/configuration.md). The default integrations for these flags are constructed from the `config` and `text` objects with the following code: ```ts { help: help({ brief: text.briefs.help, alias: "h", hidden: false, <<<<<<< Updated upstream ======= defaultForRouteMap: true, >>>>>>> Stashed changes includeHidden: false, formatting: config.documentation, }), helpAll: help({ brief: text.briefs.helpAll, alias: "H", hidden: !config.documentation.alwaysShowHelpAllFlag, <<<<<<< Updated upstream ======= defaultForRouteMap: false, >>>>>>> Stashed changes includeHidden: true, formatting: config.documentation, }), } ``` ##### `--version` ([Version Information](/stricli/docs/features/integrations/version-information.md))[​](#--version-version-information "Direct link to --version-version-information") If the application configuration provides `versionInfo`, then Stricli will automatically provide a `--version` flag to print the current version of the application to stdout. Additionally, if `versionInfo.getLatestVersion` is defined, then Stricli will also print a warning to stderr if the current version does not match the latest version. The default integration for this flag is constructed from the `config` and `text` objects with the following code: ```ts { version: version({ brief: text.briefs.version, alias: "v", info: config.versionInfo, hook: "app:start", }), } ``` --- ### Help Text The `help` integration provides the built-in `--help` (and `--helpAll`) flags for Stricli applications. It accepts the additional flag properties for an integration, but also has additional properties to control the formatting of the help text. The `formatting` object is a subset of the now-deprecated `documentation` configuration object, and is used to control the formatting of the help text. #### Use Alias in Usage Line[​](#use-alias-in-usage-line "Direct link to Use Alias in Usage Line") `formatting.useAliasInUsageLine` controls whether or not the usage line for commands should use the full flag names or their aliases. The usage lines for commands are automatically generated from the parameters. If the flag and argument names are overly long, the usage line can become particularly unwieldy. If using the default integrations through the existing application configuration, this value is controlled by `documentation.useAliasInUsageLine` which defaults to `false`. #### Only Required in Usage Line[​](#only-required-in-usage-line "Direct link to Only Required in Usage Line") `formatting.onlyRequiredInUsageLine` controls whether or not the usage line for commands should include all flags and arguments, or only those that are required. This will include required flags that have a default specified. If there are many optional flags or arguments, this can often grow too verbose. Note that custom usage lines can be provided manually per-command to allow for more specific control. If using the default integrations through the existing application configuration, this value is controlled by `documentation.onlyRequiredInUsageLine` which defaults to `false`. #### Display Case Style[​](#display-case-style "Direct link to Display Case Style") The `formatting.caseStyle` configuration here is the documentation-side equivalent of the [scanner case style](/stricli/docs/features/configuration.md#scanner-case-style). It controls which case style is used when displaying route and flag names. If using the default integrations through the existing application configuration, this value is controlled by `documentation.caseStyle` which defaults to the value that matches the corresponding `scanner.caseStyle` value. If the scanner has `allow-kebab-for-camel` then the documentation case style will be `convert-camel-to-kebab` which converts the case style of any camelCase names to kebab-case when they are included in documentation. danger It is invalid to set `formatting.caseStyle` to `convert-camel-to-kebab` when `scanner.caseStyle` is `original` as this results in documentation that includes names that will not be supported at runtime. #### Hidden Flags/Commands[​](#hidden-flagscommands "Direct link to Hidden Flags/Commands") The `help` integration has a property `includeHidden` which controls whether or not hidden flags and commands are included in the help text. The default `--help` flag will always have this set to `false`, while the default `--helpAll` flag will always have this set to `true`. This allows users to see all available flags and commands, even if they are hidden from the default help text. If using the default integrations through the existing application configuration, this value is controlled by `documentation.alwaysShowHelpAllFlag` which defaults to `false`. If this is set to `true`, then the `--helpAll` flag will always be visible in the help text, otherwise it will be hidden. --- ### Version Information One common requirement of CLI applications is to display their own current version. The `version` integration provides a built-in `--version` flag for Stricli applications, and registers a hook to provide a warning. It accepts the additional flag properties for an integration, but also has additional properties to control how the version information is displayed. The `info` object in the options is a copy of the now-deprecated `versionInfo` configuration object. To enable this integration, you must provide either a static `currentVersion` string or a function `getCurrentVersion` which asynchronously returns the current version. For applications that are are either bundled or support importing from `.json` files, you can simply import the `version` from your `package.json` file and provide it as the `currentVersion`. For example: ```ts import { buildApplication, version } from "@stricli/core"; import pkg from "./package.json"; // Directly, through the integration export const app = buildApplication( root, { name: pkg.name, }, { version: version({ brief: "Print the current version of the application", alias: "v", info: { currentVersion: pkg.version, }, }), }, ); // Indirectly, through the application configuration export const app = buildApplication(root, { name: pkg.name, versionInfo: { currentVersion: pkg.version, }, }); ``` #### Update Warnings[​](#update-warnings "Direct link to Update Warnings") Another related requirement is to warn users when their version is outdated and there is an updated version available. In the `info` object you can also specify a `getLatestVersion` function which optionally accepts `currentVersion` and returns the latest version of the application, if it is available. During the specified lifecycle hook, the integration will then compare the current version against the latest version and print a warning to stderr. Optionally a command can be provided (`upgradeCommand`) to customize the message if there is a simple way for end users to upgrade to the latest version. The text of this warning can be controlled by the [localization](/stricli/docs/features/configuration.md#localization-localization) but will only be displayed when `getLatestVersion` is provided and the current version does not match the latest version. --- ### Isolated Context For the core functionality of parsing input and writing to the terminal, command line applications require few external dependencies. They need to be able to write to `stdout` for console output and `stderr` for errors. For Stricli, these requirements are encapsulated in the [`CommandContext`](/stricli/packages/core/interfaces/CommandContext.md) type. It is a simple object that stores a `process` property that has `stdout`/`stderr` writable streams. This context is required when running the app, and is how Stricli prints help text and error messages to the console. For Node or Node-compatible environments, this is as simple as passing `{ process }` or `globalThis` to `run`. #### Terminal Output[​](#terminal-output "Direct link to Terminal Output") The provided context is bound to `this` on the command's implementation function. The global `process` will still be available, but this indirection allows for injecting alternate implementations without hot-swapping globals. This allows applications to fully test the implementation functions by controlling all of their inputs and dependencies. Check out the [testing section](/stricli/docs/testing.md) for more information on how to test your commands. tip Practically, using the context is **not required** for implementing a command within a Stricli application. If you don't get benefit from this indirection you can choose to ignore this context completely and use `process` directly or even log with `console.log` or `console.error`. #### Application Context[​](#application-context "Direct link to Application Context") This object serves double duty as the context for the command and the application itself. There are some additional options that control the application's behavior. The first is `process.exit()` which allows Stricli to set the exit code of the application once the command finishes (or throws an error). The other is `locale` which is used by the [localization logic](/stricli/docs/features/configuration.md#localization-localization) to determine which language the text should be in. #### Custom Data[​](#custom-data "Direct link to Custom Data") However, the context type can be customized which opens up some more options via dependency injection. You can define a custom context to store arbitrary data, which will then get passed through to your command. ```ts /// types.ts interface User { readonly id: number; readonly name: string; } interface CustomContext extends CommandContext { readonly user?: User; } /// impl.ts export default function(this: CustomContext) { if (this.user) { this.process.stdout.write(`Logged in as ${this.user.name}`); } else { this.process.stdout.write(`Not logged in`); } } /// run.ts const user = ... // load user await run(app, process.argv.slice(2), { process, user }); ``` In this example, imagine that you store user information in the user's local environment. You can fetch that information and store it in the context for use in any/all of your commands. --- ### Out of Scope Stricli has a lot of features (see [Features](/stricli/docs/category/features.md)) but it was not designed to solve every problem. It was deliberately created to have a limited feature set and then excel at those. The following features were all determined to be out-of-scope and are better solved manually or with an existing library. #### Cross-Argument Validation[​](#cross-argument-validation "Direct link to Cross-Argument Validation") Stricli derives the command line arguments from the functional arguments defined in the implementation. It was decided that the `flags` argument must be an object with static keys. This means that there are some flag types that can be represented in TypeScript but are not supported by Stricli. ```ts export default function(flags: { alpha: number } | { beta: number; bravo: number }) { ... ``` This function accepts *either* `{ alpha: number }` or `{ beta: number; bravo: number }` but not both simultaneously. There are some other CLI frameworks that support defining this kind of validation, but Stricli **does not** provide built-in support for this use case. Despite that, it is still possible to perform this validation manually. This may be a good use case for a third party runtime validation library like [`zod`](https://zod.dev/) or [`typanion`](https://mael.dev/typanion/). ```ts import { z } from "zod"; const MyFlags = z.union([z.object({ alpha: z.number() }), z.object({ beta: z.number(), bravo: z.number() })]); export default function (rawFlags: { alpha?: number; beta?: number; bravo?: number }) { const flags = MyFlags.parse(rawFlags); } ``` #### Local System Access[​](#local-system-access "Direct link to Local System Access") Command functions passed to Stricli can contain any sort of implementation. This means that an implementation can directly access any globals of the environment it is running in (ex: Node/Deno) as well as import other modules. While this is perfectly valid, the recommended best practice is to write command implementations with dependency injection via the [context](/stricli/docs/features/isolated-context.md) (bound to `this`) so that they are portable and testable. As such, the local dependencies of a given command/application are not defined by Stricli and it is up to the application developer to define and supply them. #### Logging[​](#logging "Direct link to Logging") Stricli has a very limited set of situations that rely in output printed to the console. As such, Stricli directly writes to stdout and stderr depending on the use case. A fully featured logging solution is not simple to implement. Given that Stricli has no need for a logging solution directly, it does not provide one. However, developers are more than welcome to "bring your own" with any logging solution. As well, the `stdout` and `stderr` streams can be implemented indirectly by a logger if the intention is to capture all console output by the logger. Just provide alternative streams in the `context` object when invoking `run` and Stricli will write to those streams. ##### Enhanced Formatting[​](#enhanced-formatting "Direct link to Enhanced Formatting") For similar reasons to the lack of first-party logging support, Stricli does not provide enhanced formatting utilities. Consider the following third-party libraries if enhanced formatting is necessary for your application: * [`chalk`](https://github.com/chalk/chalk) - Terminal string styling done right * [`treeify`](https://github.com/notatestuser/treeify) - *treeify* converts a JS object into a nice, visible depth-indented tree for console printing * [`ervy`](https://github.com/chunqiuyiyu/ervy) - Bring charts to terminal #### Prompting and `stdin`[​](#prompting-and-stdin "Direct link to prompting-and-stdin") The only end user input processed by Stricli is the `inputs` array of strings (derived from `argv` in Node). Many commands have no need for interactivity and the best method to achieve it is highly dependant on the environment. This is why `stdin` is not defined on the default context. For end user interactivity during command execution, we would recommend [`enquirer`](https://github.com/enquirer/enquirer) for basic prompts or [`clack`](https://www.clack.cc/) for more advanced applications. --- ### Shell Autocomplete Stricli has first class support for tab auto completion in shells. Rather than generate shell-specific scripts based on your application, the logic for proposing input completions is written directly into the core library. This means that the auto complete behavior will exactly match the functionality of your app. #### Configuration[​](#configuration "Direct link to Configuration") The auto-complete feature can be customized with the `completion` configuration. ##### Alias Support[​](#alias-support "Direct link to Alias Support") You can control whether or not aliases will be suggested as possible completions with the `includeAliases` configuration property. It defaults to match the value of `useAliasInUsageLine`. ##### Hidden Route Support[​](#hidden-route-support "Direct link to Hidden Route Support") You can control whether or not aliases will be suggested as possible completions with the `includeHiddenRoutes` configuration property. It defaults to `false`, and will not expose any hidden route names. #### Autocomplete Management[​](#autocomplete-management "Direct link to Autocomplete Management") Part of the difficulty with setting up auto completion is getting it installed into the shell. Stricli solves this with a standalone command `npx @stricli/auto-complete@latest`. ```text USAGE @stricli/auto-complete install [--shell bash] targetCmd autcCmd @stricli/auto-complete uninstall [--shell bash] targetCmd @stricli/auto-complete --help @stricli/auto-complete --version Manage auto-complete command installations for shells FLAGS -h --help Print this help information and exit -v --version Print version information and exit COMMANDS install Installs target command with autocompletion for a given shell type uninstall Uninstalls target command for a given shell type ``` This command allows you to configure your shell to run a secondary `autcCmd` command whenever auto completion is requested for the `targetCmd` command. caution At this time, the only shell that `@stricli/auto-complete` supports is `bash`. Support for other shells is planned for the future. ##### Adding a Built-In `install` Command[​](#adding-a-built-in-install-command "Direct link to adding-a-built-in-install-command") To simplify the process of installing the auto complete command, `@stricli/auto-complete` also exposes methods that allow you to build a command to be added to your own app. It is recommended to hide these so that they do not show up in any help text, but they can still be run. To see an example of this setup, check out the [quick start](/stricli/docs/quick-start.md). --- ### Alternatives Considered Given the large number of libraries and frameworks in the JavaScript ecosystem already, it makes sense to justify why those were deemed insufficient or otherwise a poor fit especially when floating the notion of creating [yet another library](https://xkcd.com/927/). The reasoning provided here is non-exhaustive and only serves as a summary of why it was not chosen. #### Common Patterns[​](#common-patterns "Direct link to Common Patterns") ##### Method Chaining[​](#method-chaining "Direct link to Method Chaining") Method chaining is a very popular code pattern in JavaScript. Unfortunately, given the incremental, imperative nature of this pattern it is almost impossible to use static typing end-to-end. As a result, many of these libraries offer runtime type validation, but none of these provide accurate TypeScript types for parsed arguments and flags. This can easily lead to situations where compile/runtime types are out of sync, clashing with our principle of [linked parsing](/stricli/docs/getting-started/principles.md#when-parsing-form-follows-function). This eliminated the following packages: [cac](https://github.com/cacjs/cac), [caporal](https://caporal.io/), [commander](https://github.com/tj/commander.js), [gluegun](https://infinitered.github.io/gluegun/#/), [sade](https://github.com/lukeed/sade), [vorpal](http://vorpal.js.org/), [yargs](https://github.com/yargs/yargs) ##### Custom DSLs[​](#custom-dsls "Direct link to Custom DSLs") CLIs have existed long before JavaScript, so many frameworks and libraries rely on a custom DSL that mirrors the intended help text. This makes these frameworks and libraries more user-friendly for non-JavaScript developers, but then they require additional domain knowledge. While there are some agreed-upon patterns, there is no "one true DSL" for CLIs which means that different libraries have different conventions. This goes against our principles for ["magic" patterns](/stricli/docs/getting-started/principles.md#no-magic-features-or-patterns) and [linked parsing](/stricli/docs/getting-started/principles.md#when-parsing-form-follows-function). This eliminated the following packages: [cac](https://github.com/cacjs/cac), [caporal](https://caporal.io/), [commander](https://github.com/tj/commander.js), [docopt](http://docopt.org/), [meow](https://github.com/sindresorhus/meow), [sade](https://github.com/lukeed/sade), [vorpal](http://vorpal.js.org/) #### Popular Libraries[​](#popular-libraries "Direct link to Popular Libraries") ##### [`parseargs`](https://github.com/pkgjs/parseargs) (Node.js)[​](#parseargs-nodejs "Direct link to parseargs-nodejs") New method added to the core `util` utility library in Node.js. It was introduced in v16.7.0/v18.3.0 and is currently (at time of writing) at stability level 1, experimental. It is purposefully [limited in scope](https://github.com/pkgjs/parseargs#scope) and as such does not provide enough features to be a one-stop shop for a complete CLI framework. ##### [`arg`](https://github.com/vercel/arg) (vercel)[​](#arg-vercel "Direct link to arg-vercel") Vercel's `arg` is a very popular (20M+ weekly downloads at time of writing) library with no dependencies. It accepts a record of flags to parsers and handles all the parsing in one call. However, similar to `parseargs` it is only an argument parser and does not provide any kind of command routing for multi-command applications. It is most likely to be applicable for single-command apps or one-off scripts. ##### [`cliffy`](https://github.com/drew-y/cliffy)[​](#cliffy "Direct link to cliffy") `cliffy` is different from the other solutions listed here as it creates REPL applications. Instead of a single executable that is run with different arguments, `cliffy` creates applications that interactively respond to user input to run multiple commands. It doesn't necessarily aim to satisfy the [clig.dev](https://clig.dev) guidelines as it is a different user experience, but its similarity to the other options warranted its inclusion in this list. ##### [`yargs`](https://yargs.js.org/)[​](#yargs "Direct link to yargs") `yargs` is a powerful and flexible library with a simple API. It supports commands and grouped options, dynamically generated help menus, and bash-completion shortcuts. It has been adopted by some in the the Node.js ecosystem, with extensive documentation and community support. It requires installing plugins and manual configuration to get TypeScript support, and the API is not as type-safe as Stricli. It also has a large number of dependencies, which can be a concern for some users. #### Popular Frameworks[​](#popular-frameworks "Direct link to Popular Frameworks") ##### [`oclif`](https://oclif.io/) (salesforce)[​](#oclif-salesforce "Direct link to oclif-salesforce") Salesforce's `oclif` is a popular framework with "only 17 dependencies" and is used by several high-profile CLIs like `heroku` and naturally Salesforce's own CLI. Commands are defined as subclasses with static properties used to define argument types and customize behavior. These static properties are the source of truth for the types of the arguments and flags, and must be defined using the library's utility functions. Then the parse method must be manually invoked at the start of the command's run logic. This goes against our principle of [Form Follows Function](/stricli/docs/getting-started/principles.md#when-parsing-form-follows-function) as it inverts the source of truth for argument and flag types. Additionally, forcing the command implementation to be a method limits the kind of lazy evaluation strategies that can be adopted for improving performance. CLIs that use `oclif` are built as a collection of [plugins](https://oclif.io/docs/plugins) that are dynamically loaded at runtime. As such, command routing is implemented with ["topics"](https://oclif.io/docs/topics) that are derived from the directory layout of each plugin. Every command module must be loaded at runtime to parse the static properties, so a separate [manifest file](https://oclif.io/docs/plugin_loading#manifests-improve-performance) was introduced to improve performance. The plugin system does not mesh well with our principle of [No "Magic" Patterns](/stricli/docs/getting-started/principles.md#no-magic-features-or-patterns) as it relies on systems outside of the JavaScript runtime (file system access and custom module resolution). As well, it more tightly couples the CLI with that specific runtime (Node) which is less desirable as there are more server-side runtimes available. ##### [`clipanion`](https://mael.dev/clipanion/) (yarn)[​](#clipanion-yarn "Direct link to clipanion-yarn") `clipanion` is the popular framework with no dependencies used by `yarn`. > This section was edited following a discussion with the author of `clipanion`, which you can check out [here](https://github.com/bloomberg/stricli/issues/54). Commands are defined as subclasses with fields used to define argument types and customize behavior. These fields are the source of truth for the types of the arguments and flags, and must be defined using the library's utility functions. While similar to `oclif`'s approach, this pattern does not go against our principle of [Form Follows Function](/stricli/docs/getting-started/principles.md#when-parsing-form-follows-function) as the source of truth for argument and flag types lives with the implementation. Applications that use `clipanion` can [register multiple commands](https://mael.dev/clipanion/docs/getting-started#registering-multiple-commands) directly. Every command defines its own set of paths, so all commands must be loaded at runtime to implement command routing. This approach to command routing, combined with the limitation that command implementations are defined as class methods, limits the kind of lazy evaluation strategies that can be adopted for improving performance (the latter is addressed [here](https://mael.dev/clipanion/docs/tips#lazy-evaluation) in the documentation). Some large `clipanion` applications like `yarn` are built as a collection of plugins that are dynamically loaded at runtime. This system does not mesh well with our principle of [No "Magic" Patterns](/stricli/docs/getting-started/principles.md#no-magic-features-or-patterns) as it relies on package management outside of the JavaScript runtime. In general, the kind of applications that Stricli targets don't have a need for a plugin-based architecture as that level of user extensibility is not an additional requirement. --- ### Frequently Asked Questions ##### Why is it called "stricli"?[​](#why-is-it-called-stricli "Direct link to Why is it called \"stricli\"?") The name is a combination of "strict" and CLI. Strict refers to the strict input parsing as well as the strict TypeScript type checking. This word was also chosen because it looks/sounds somewhat like the English word "strictly". ##### What is the logo?[​](#what-is-the-logo "Direct link to What is the logo?") The current Stricli logo is a combination of s (for Stricli) and > to represent the terminal prompt. The specific s used in the logo is from the wonderful variable font [Tourney](https://github.com/Etcetera-Type-Co/Tourney) which is licensed under the [OFL](https://github.com/Etcetera-Type-Co/Tourney/blob/master/OFL.txt). --- ### Overview **Stricli** is a zero-dependency framework for building complex, highly-featured CLIs in TypeScript. Stricli was created despite an existing set of CLI frameworks in the JavaScript ecosystem. Bloomberg maintains several internal, user-facing CLIs written in TypeScript on top of Node.js using an assortment of existing frameworks and libraries. In the opinion of the authors of this framework, these existing frameworks and libraries suffer from some shortcomings and pain points that warranted an alternative solution. Check out the [alternatives considered](/stricli/docs/getting-started/alternatives.md) for a concrete breakdown. The common issues with these alternatives can be reframed as a set of language-agnostic [guiding principles](/stricli/docs/getting-started/principles.md) that should be considered in addition to [clig.dev](https://clig.dev) when analyzing a CLI framework. --- ### Guiding Principles Much of this work was inspired by and built upon the incredible [Command Line Interface Guidelines](https://clig.dev). They are a set of open-source rules and recommendations for developing command line interfaces. This framework adheres to these guidelines, but it does not implement *all* of them. Some features were considered [out-of-scope](/stricli/docs/features/out-of-scope.md) for this framework, and are already solved by existing packages in the ecosystem. The following are principles that were found to be common traits of frameworks with good design. #### Commands Are Just Functions[​](#commands-are-just-functions "Direct link to Commands Are Just Functions") > **tl;dr** - Every command that is exposed by a CLI should just be a function underneath. Command line interfaces exist to provide functionality to users without needing to write code against a programmatic API. To put this another way, a CLI is merely a means for a user to invoke a certain function with specific arguments. These arguments are provided on the command line as text input and should translate directly to function arguments. It is rare that an advanced CLI application exposes only a single function, so the framework should be able to support a nested set of commands that are all reachable from certain routes. To support the natural syntax of functions, an application should simultaneously understand both named, unordered flags as well as positional arguments. Check out [clig.dev section on `Arguments and flags`](https://clig.dev/#arguments-and-flags) for specific guidelines on how these different input types should be formatted/interpreted. #### When Parsing, Form Follows Function[​](#when-parsing-form-follows-function "Direct link to When Parsing, Form Follows Function") > **tl;dr** - If function and command line arguments are linked, then function arguments should define command line parsing. Given a set of arguments for a function, the corresponding parser should type check against them completely. The arguments for the function are the source of truth, not the other way around. Invalid arguments should be caught by the framework before the command is executed. This includes missing arguments, extraneous arguments, and any arguments that are otherwise incorrectly formatted or structured. When inputs are parsed without an intended end state, it then falls to the individual functions to define which inputs are valid. The application logic for a CLI should not be directly responsible for validating user input, [within reason](/stricli/docs/features/out-of-scope.md#cross-argument-validation). #### No "Magic" Features or Patterns[​](#no-magic-features-or-patterns "Direct link to No \"Magic\" Features or Patterns") > **tl;dr** - Developers should be able to understand and debug a framework using native tools for the language of that framework. While too much code can hinder readability, not enough code can completely kill it. "Don't Repeat Yourself" is an important principle in itself, but that does not always justify replacing code with custom conventions. When a framework has too much "magic" and relies on systems external to the code, it reduces portability and locks developers into certain patterns or tools. It is better to rely on the existing features of a language or environment, and if they don't exist that can be an opportunity to standardize rather than circumvent. --- ### Quick Start This quick start guide will get you started with a new, empty Stricli application and show you how to modify it to suit your needs. #### Generate a New Node Application[​](#generate-a-new-node-application "Direct link to Generate a New Node Application") If you have issues with this generator, please open an issue on [its source repo here](https://github.com/bloomberg/stricli/tree/main/packages/create-app). ##### Step 1: `@stricli/create-app`[​](#step-1-striclicreate-app "Direct link to step-1-striclicreate-app") Run the following command. ```text npx @stricli/create-app@latest my-app ``` This command will create a new directory `my-app` and populate it with the boilerplate for a Stricli application. You can also pass the following options if you wish to customize the generated application. ```text FLAGS [--type] Package type, controls output format of JS files [commonjs|module, default = module] [--template] Application template to generate [single|multi, default = multi] [--auto-complete/--no-auto-complete] Include auto complete postinstall script [default = true] -n [--name] Package name, if different from directory [--command] Intended bin command, if different from name -d [--description] Package description [default = Stricli command line application] [--license] Package license [default = MIT] [--author] Package author [default = ""] -h --help Print help information and exit -v --version Print version information and exit ARGUMENTS path Target path of new package directory ``` ##### Step 2: Install dependencies[​](#step-2-install-dependencies "Direct link to Step 2: Install dependencies") The generated application will only contain `package.json`. To actually install the declared dependencies, `cd` to that directory and run `npm install --ignore-scripts`. The ignore is needed when using `--auto-complete` (enabled by default) as it adds a `postinstall` script to install the auto complete functionality. ##### Step 3: Build application[​](#step-3-build-application "Direct link to Step 3: Build application") The boilerplate includes a `build` script that invokes [`tsup`](https://tsup.egoist.dev/). Note that this tool uses [`esbuild`](https://esbuild.github.io/) to compile the project to a single output file and it [will not perform type checking by default](https://tsup.egoist.dev/#what-about-type-checking). ##### Step 4: Test the output[​](#step-4-test-the-output "Direct link to Step 4: Test the output") Stricli applications can be executed directly in source, or in a separate script. This template generates a `src/bin/cli.ts` file to invoke `run` so that the rest of the source only contains exports without side-effects. Try running your new app by calling the compiled bin script at `dist/cli.js` with `--help`. ```sh dist/cli.js --help USAGE my-app subdir my-app nested foo|bar ... my-app --help my-app --version Stricli command line application FLAGS -h --help Print this help information and exit -v --version Print version information and exit COMMANDS subdir Command in subdirectory nested Nested commands dist/cli.js nested --help USAGE my-app nested foo my-app nested bar my-app nested --help Nested commands FLAGS -h --help Print this help information and exit COMMANDS foo Nested foo command bar Nested bar command ``` You should see this exact output if you generated a multi-command app. Since Stricli applications are all defined in code, you can keep this file layout or move the files/declarations around as you want. Just be aware that everything except the `impl.ts` files will be loaded synchronously on app load, so be mindful of what you import and where. ###### Single Command[​](#single-command "Direct link to Single Command") You can optionally choose to run `npx @stricli/create-app@latest --template single` to generate a single command app. If you generated a single command app, your initial output should look like this: ```sh dist/cli.js --help USAGE my-app --count value arg1 my-app --help my-app --version Stricli command line application FLAGS --count Number of times to say hello -h --help Print this help information and exit -v --version Print version information and exit ARGUMENTS arg1 Your name ``` If you see that output, you have successfully generated a new Stricli application! ```sh dist/cli.js World --count 3 Hello World! Hello World! Hello World! ``` --- ### Testing Stricli commands are designed to run with a [provided context](/stricli/docs/features/isolated-context.md), which makes it easier to write isolated tests. Most commands can be tested in one of two ways, depending on construction: * [Testing the commands within an application](#running-the-application) * [Testing a single command's implementation directly](#importing-the-implementation) The former tests a command in the scope of the entire application, where the route to the command is necessary and the inputs are provided as strings. This is useful for testing the routing and parsing of inputs, as well as the command itself. The latter tests the command in isolation, where the implementation function is called directly and the inputs are provided as their intended arguments, which can be more convenient when testing arguments that are stubbed/mocked. While Stricli currently uses `vitest` for its own tests, any test framework/library can be used. As such, imports for `describe`/`it` and `expect` have been elided in the examples below to make them more readable. #### Mocking the Context[​](#mocking-the-context "Direct link to Mocking the Context") Depending on which test/mock framework is used, the `buildContextForTest` function (or an equivalent) can be implemented in a variety of ways. In this example, it would only need to intercept calls to `context.process.stdout.write()` and redirect the inputs to a string at `context.stdout` (so that the output could be confirmed). You can look at the [`buildFakeContext` function written for the internal Stricli tests](https://github.com/bloomberg/stricli/blob/main/packages/core/tests/fakes/context.ts) as an example. If your application makes use of [custom data in the context](/stricli/docs/features/isolated-context.md#custom-data), then your equivalent `buildContextForTest` function should include that data as well. #### Running the Application[​](#running-the-application "Direct link to Running the Application") To run a Stricli application, the `run` function takes in the application, the inputs as an array of strings, and the context. If a "mock" version of the context can be constructed, then the application can be tested with the `run` function. A Note For Inputs At runtime, the `inputs` array is derived from `process.argv`. As such, it has already handled tokenizing the raw inputs and trimming the executable (if present). This means that in order to test `app cmd foo "bar baz"` the inputs array to `run` should be `["cmd", "foo", "bar baz"]`. ```ts import { run } from "@stricli/core"; import { app } from "./app"; describe("echo command", () => { it("prints 'hello' to stdout", async () => { const context = buildContextForTest(); await run(app, ["echo", "hello"], context); expect(context.stdout).includes("hello"); }); it("prints 'hello world' to stdout", async () => { const context = buildContextForTest(); await run(app, ["echo", "hello", "world"], context); expect(context.stdout).includes("hello world"); }); }); ``` ##### Handling Errors with `run`[​](#handling-errors-with-run "Direct link to handling-errors-with-run") The `run` function will always return a `Promise`, as it is intended for use on the command line. If the application (or a command) throws an error it will be captured and redirected to stderr. ```ts import { run } from "@stricli/core"; import { app } from "./app"; describe("add command", () => { it("fails if one input isn't a valid number", async () => { const context = buildContextForTest(); await run(app, ["add", "1", "two"], context); expect(context.stderr).includes("Cannot convert two to a number"); }); }); ``` #### Importing the Implementation[​](#importing-the-implementation "Direct link to Importing the Implementation") Commands that take full advantage of the [lazy loader pattern](/stricli/docs/features/command-routing/commands.md#lazy-loader) (or the [direct function pattern](/stricli/docs/features/command-routing/commands.md#direct-func), if the function is exported separately) can be tested directly by calling the implementation function. ```ts import func from "./impl"; describe("echo command", () => { it("prints 'hello' to stdout", async () => { const context = buildContextForTest(); await func.call(context, {}, "hello"); expect(context.stdout).includes("hello"); }); it("prints 'hello world' to stdout", async () => { const context = buildContextForTest(); await func.call(context, {}, "hello", "world"); expect(context.stdout).includes("hello world"); }); }); ``` ##### Handling Thrown Exceptions[​](#handling-thrown-exceptions "Direct link to Handling Thrown Exceptions") While `run` captures thrown exceptions to format them nicely for the command line, implementation functions should not. This means that if an exception is thrown, it will be thrown to the test and must be handled there. ```ts import func from "./impl"; describe("divide command", () => { it("dividing by zero throws an error", async () => { const context = buildContextForTest(); await func.call(context, {}, 1, 0).then( () => { throw new Error("Expected ({}, 1, 0) to throw an error"); }, (exc) => { expect(exc instanceof Error); expect(exc.message).includes("Cannot divide by zero"); }, ); }); }); ``` --- ### Packages * [`@stricli/core`](/stricli/packages/core.md) * [`@stricli/auto-complete`](/stricli/packages/auto-complete.md) --- ### @stricli/auto-complete ### `@stricli/auto-complete` > Common utilities for enhancing Stricli applications with autocomplete [![NPM Version](https://img.shields.io/npm/v/@stricli/auto-complete.svg?style=flat-square)](https://www.npmjs.com/package/@stricli/auto-complete) [![NPM Type Definitions](https://img.shields.io/npm/types/@stricli/auto-complete.svg?style=flat-square)](https://www.npmjs.com/package/@stricli/auto-complete) [![NPM Downloads](https://img.shields.io/npm/dm/@stricli/auto-complete.svg?style=flat-square)](https://www.npmjs.com/package/@stricli/auto-complete) 👉 See **** for documentation on Stricli and **** for the API docs of this package. --- ### Function: buildInstallCommand() > **buildInstallCommand**<`CONTEXT`>(`targetCommand`, `commands`): `Command`<`CONTEXT`> #### Type Parameters[​](#type-parameters "Direct link to Type Parameters") • **CONTEXT** *extends* [`StricliAutoCompleteContext`](/stricli/packages/auto-complete/interfaces/StricliAutoCompleteContext.md) #### Parameters[​](#parameters "Direct link to Parameters") • **targetCommand**: `string` • **commands**: `Readonly`<`Partial`<`Record`<`"bash"`, `string`>>> #### Returns[​](#returns "Direct link to Returns") `Command`<`CONTEXT`> #### Defined in[​](#defined-in "Direct link to Defined in") [commands.ts:39](https://github.com/bloomberg/stricli/blob/ce1268b6b86eb7d136dd0be5b9fa525173d43b19/packages/auto-complete/src/commands.ts#L39) --- ### Function: buildUninstallCommand() > **buildUninstallCommand**<`CONTEXT`>(`targetCommand`, `shells`): `Command`<`CONTEXT`> #### Type Parameters[​](#type-parameters "Direct link to Type Parameters") • **CONTEXT** *extends* [`StricliAutoCompleteContext`](/stricli/packages/auto-complete/interfaces/StricliAutoCompleteContext.md) #### Parameters[​](#parameters "Direct link to Parameters") • **targetCommand**: `string` • **shells**: `Readonly`<`Partial`<`Record`<`"bash"`, `boolean`>>> #### Returns[​](#returns "Direct link to Returns") `Command`<`CONTEXT`> #### Defined in[​](#defined-in "Direct link to Defined in") [commands.ts:81](https://github.com/bloomberg/stricli/blob/ce1268b6b86eb7d136dd0be5b9fa525173d43b19/packages/auto-complete/src/commands.ts#L81) --- ### @stricli/auto-complete #### Interfaces[​](#interfaces "Direct link to Interfaces") * [StricliAutoCompleteContext](/stricli/packages/auto-complete/interfaces/StricliAutoCompleteContext.md) #### Functions[​](#functions "Direct link to Functions") * [buildInstallCommand](/stricli/packages/auto-complete/functions/buildInstallCommand.md) * [buildUninstallCommand](/stricli/packages/auto-complete/functions/buildUninstallCommand.md) --- ### Interface: StricliAutoCompleteContext #### Extends[​](#extends "Direct link to Extends") * `CommandContext` #### Properties[​](#properties "Direct link to Properties") ##### fs?[​](#fs "Direct link to fs?") > `readonly` `optional` **fs**: `object` ###### promises[​](#promises "Direct link to promises") > `readonly` **promises**: `Pick`<`__module`, `"readFile"` | `"writeFile"`> ###### Defined in[​](#defined-in "Direct link to Defined in") [context.ts:8](https://github.com/bloomberg/stricli/blob/ce1268b6b86eb7d136dd0be5b9fa525173d43b19/packages/auto-complete/src/context.ts#L8) *** ##### os?[​](#os "Direct link to os?") > `readonly` `optional` **os**: `Pick`<`__module`, `"homedir"`> ###### Defined in[​](#defined-in-1 "Direct link to Defined in") [context.ts:7](https://github.com/bloomberg/stricli/blob/ce1268b6b86eb7d136dd0be5b9fa525173d43b19/packages/auto-complete/src/context.ts#L7) *** ##### path?[​](#path "Direct link to path?") > `readonly` `optional` **path**: `Pick`<`PlatformPath`, `"join"`> ###### Defined in[​](#defined-in-2 "Direct link to Defined in") [context.ts:11](https://github.com/bloomberg/stricli/blob/ce1268b6b86eb7d136dd0be5b9fa525173d43b19/packages/auto-complete/src/context.ts#L11) *** ##### process[​](#process "Direct link to process") > `readonly` **process**: `Pick`<`Process`, `"stderr"` | `"stdout"` | `"env"`> ###### Overrides[​](#overrides "Direct link to Overrides") `CommandContext.process` ###### Defined in[​](#defined-in-3 "Direct link to Defined in") [context.ts:6](https://github.com/bloomberg/stricli/blob/ce1268b6b86eb7d136dd0be5b9fa525173d43b19/packages/auto-complete/src/context.ts#L6) --- ### @stricli/core ### `@stricli/core` > Build complex CLIs with type safety and no dependencies [![NPM Version](https://img.shields.io/npm/v/@stricli/core.svg?style=flat-square)](https://www.npmjs.com/package/@stricli/core) [![NPM Type Definitions](https://img.shields.io/npm/types/@stricli/core.svg?style=flat-square)](https://www.npmjs.com/package/@stricli/core) [![NPM Downloads](https://img.shields.io/npm/dm/@stricli/core.svg?style=flat-square)](https://www.npmjs.com/package/@stricli/core) 👉 See **** for documentation on Stricli and **** for the API docs of this package. --- ### Class: AliasNotFoundError Thrown when input suggests an alias, but no alias with that letter was found. #### Extends[​](#extends "Direct link to Extends") * [`ArgumentScannerError`](/stricli/packages/core/classes/ArgumentScannerError.md) #### Constructors[​](#constructors "Direct link to Constructors") ##### new AliasNotFoundError()[​](#new-aliasnotfounderror "Direct link to new AliasNotFoundError()") > **new AliasNotFoundError**(`input`): [`AliasNotFoundError`](/stricli/packages/core/classes/AliasNotFoundError.md) ###### Parameters[​](#parameters "Direct link to Parameters") • **input**: `string` ###### Returns[​](#returns "Direct link to Returns") [`AliasNotFoundError`](/stricli/packages/core/classes/AliasNotFoundError.md) ###### Overrides[​](#overrides "Direct link to Overrides") [`ArgumentScannerError`](/stricli/packages/core/classes/ArgumentScannerError.md).[`constructor`](/stricli/packages/core/classes/ArgumentScannerError.md#constructors) ###### Defined in[​](#defined-in "Direct link to Defined in") [packages/core/src/parameter/scanner.ts:145](https://github.com/bloomberg/stricli/blob/ce1268b6b86eb7d136dd0be5b9fa525173d43b19/packages/core/src/parameter/scanner.ts#L145) #### Properties[​](#properties "Direct link to Properties") ##### cause?[​](#cause "Direct link to cause?") > `optional` **cause**: `unknown` ###### Inherited from[​](#inherited-from "Direct link to Inherited from") [`ArgumentScannerError`](/stricli/packages/core/classes/ArgumentScannerError.md).[`cause`](/stricli/packages/core/classes/ArgumentScannerError.md#cause) ###### Defined in[​](#defined-in-1 "Direct link to Defined in") node\_modules/typescript/lib/lib.es2022.error.d.ts:24 *** ##### input[​](#input "Direct link to input") > `readonly` **input**: `string` Command line input that triggered this error. ###### Defined in[​](#defined-in-2 "Direct link to Defined in") [packages/core/src/parameter/scanner.ts:144](https://github.com/bloomberg/stricli/blob/ce1268b6b86eb7d136dd0be5b9fa525173d43b19/packages/core/src/parameter/scanner.ts#L144) *** ##### message[​](#message "Direct link to message") > **message**: `string` ###### Inherited from[​](#inherited-from-1 "Direct link to Inherited from") [`ArgumentScannerError`](/stricli/packages/core/classes/ArgumentScannerError.md).[`message`](/stricli/packages/core/classes/ArgumentScannerError.md#message) ###### Defined in[​](#defined-in-3 "Direct link to Defined in") node\_modules/typescript/lib/lib.es5.d.ts:1077 *** ##### name[​](#name "Direct link to name") > **name**: `string` ###### Inherited from[​](#inherited-from-2 "Direct link to Inherited from") [`ArgumentScannerError`](/stricli/packages/core/classes/ArgumentScannerError.md).[`name`](/stricli/packages/core/classes/ArgumentScannerError.md#name) ###### Defined in[​](#defined-in-4 "Direct link to Defined in") node\_modules/typescript/lib/lib.es5.d.ts:1076 *** ##### stack?[​](#stack "Direct link to stack?") > `optional` **stack**: `string` ###### Inherited from[​](#inherited-from-3 "Direct link to Inherited from") [`ArgumentScannerError`](/stricli/packages/core/classes/ArgumentScannerError.md).[`stack`](/stricli/packages/core/classes/ArgumentScannerError.md#stack) ###### Defined in[​](#defined-in-5 "Direct link to Defined in") node\_modules/typescript/lib/lib.es5.d.ts:1078 --- ### Class: ArgumentParseError Thrown when underlying parameter parser throws an exception parsing some input. #### Extends[​](#extends "Direct link to Extends") * [`ArgumentScannerError`](/stricli/packages/core/classes/ArgumentScannerError.md) #### Constructors[​](#constructors "Direct link to Constructors") ##### new ArgumentParseError()[​](#new-argumentparseerror "Direct link to new ArgumentParseError()") > **new ArgumentParseError**(`externalFlagNameOrPlaceholder`, `input`, `exception`): [`ArgumentParseError`](/stricli/packages/core/classes/ArgumentParseError.md) ###### Parameters[​](#parameters "Direct link to Parameters") • **externalFlagNameOrPlaceholder**: `Placeholder` | `ExternalFlagName` • **input**: `string` • **exception**: `unknown` ###### Returns[​](#returns "Direct link to Returns") [`ArgumentParseError`](/stricli/packages/core/classes/ArgumentParseError.md) ###### Overrides[​](#overrides "Direct link to Overrides") [`ArgumentScannerError`](/stricli/packages/core/classes/ArgumentScannerError.md).[`constructor`](/stricli/packages/core/classes/ArgumentScannerError.md#constructors) ###### Defined in[​](#defined-in "Direct link to Defined in") [packages/core/src/parameter/scanner.ts:189](https://github.com/bloomberg/stricli/blob/ce1268b6b86eb7d136dd0be5b9fa525173d43b19/packages/core/src/parameter/scanner.ts#L189) #### Properties[​](#properties "Direct link to Properties") ##### cause?[​](#cause "Direct link to cause?") > `optional` **cause**: `unknown` ###### Inherited from[​](#inherited-from "Direct link to Inherited from") [`ArgumentScannerError`](/stricli/packages/core/classes/ArgumentScannerError.md).[`cause`](/stricli/packages/core/classes/ArgumentScannerError.md#cause) ###### Defined in[​](#defined-in-1 "Direct link to Defined in") node\_modules/typescript/lib/lib.es2022.error.d.ts:24 *** ##### exception[​](#exception "Direct link to exception") > `readonly` **exception**: `unknown` Raw exception thrown from parse function. ###### Defined in[​](#defined-in-2 "Direct link to Defined in") [packages/core/src/parameter/scanner.ts:188](https://github.com/bloomberg/stricli/blob/ce1268b6b86eb7d136dd0be5b9fa525173d43b19/packages/core/src/parameter/scanner.ts#L188) *** ##### externalFlagNameOrPlaceholder[​](#externalflagnameorplaceholder "Direct link to externalFlagNameOrPlaceholder") > `readonly` **externalFlagNameOrPlaceholder**: `string` External name of flag or placeholder for positional argument that was parsing this input. ###### Defined in[​](#defined-in-3 "Direct link to Defined in") [packages/core/src/parameter/scanner.ts:180](https://github.com/bloomberg/stricli/blob/ce1268b6b86eb7d136dd0be5b9fa525173d43b19/packages/core/src/parameter/scanner.ts#L180) *** ##### input[​](#input "Direct link to input") > `readonly` **input**: `string` Command line input that triggered this error. ###### Defined in[​](#defined-in-4 "Direct link to Defined in") [packages/core/src/parameter/scanner.ts:184](https://github.com/bloomberg/stricli/blob/ce1268b6b86eb7d136dd0be5b9fa525173d43b19/packages/core/src/parameter/scanner.ts#L184) *** ##### message[​](#message "Direct link to message") > **message**: `string` ###### Inherited from[​](#inherited-from-1 "Direct link to Inherited from") [`ArgumentScannerError`](/stricli/packages/core/classes/ArgumentScannerError.md).[`message`](/stricli/packages/core/classes/ArgumentScannerError.md#message) ###### Defined in[​](#defined-in-5 "Direct link to Defined in") node\_modules/typescript/lib/lib.es5.d.ts:1077 *** ##### name[​](#name "Direct link to name") > **name**: `string` ###### Inherited from[​](#inherited-from-2 "Direct link to Inherited from") [`ArgumentScannerError`](/stricli/packages/core/classes/ArgumentScannerError.md).[`name`](/stricli/packages/core/classes/ArgumentScannerError.md#name) ###### Defined in[​](#defined-in-6 "Direct link to Defined in") node\_modules/typescript/lib/lib.es5.d.ts:1076 *** ##### stack?[​](#stack "Direct link to stack?") > `optional` **stack**: `string` ###### Inherited from[​](#inherited-from-3 "Direct link to Inherited from") [`ArgumentScannerError`](/stricli/packages/core/classes/ArgumentScannerError.md).[`stack`](/stricli/packages/core/classes/ArgumentScannerError.md#stack) ###### Defined in[​](#defined-in-7 "Direct link to Defined in") node\_modules/typescript/lib/lib.es5.d.ts:1078 --- ### Class: abstract ArgumentScannerError ### Class: `abstract` ArgumentScannerError Abstract class that all internal argument scanner errors extend from. #### Extends[​](#extends "Direct link to Extends") * `InternalError` #### Extended by[​](#extended-by "Direct link to Extended by") * [`AliasNotFoundError`](/stricli/packages/core/classes/AliasNotFoundError.md) * [`ArgumentParseError`](/stricli/packages/core/classes/ArgumentParseError.md) * [`EnumValidationError`](/stricli/packages/core/classes/EnumValidationError.md) * [`FlagNotFoundError`](/stricli/packages/core/classes/FlagNotFoundError.md) * [`InvalidNegatedFlagSyntaxError`](/stricli/packages/core/classes/InvalidNegatedFlagSyntaxError.md) * [`UnexpectedFlagError`](/stricli/packages/core/classes/UnexpectedFlagError.md) * [`UnexpectedPositionalError`](/stricli/packages/core/classes/UnexpectedPositionalError.md) * [`UnsatisfiedFlagError`](/stricli/packages/core/classes/UnsatisfiedFlagError.md) * [`UnsatisfiedPositionalError`](/stricli/packages/core/classes/UnsatisfiedPositionalError.md) #### Constructors[​](#constructors "Direct link to Constructors") ##### new ArgumentScannerError()[​](#new-argumentscannererror "Direct link to new ArgumentScannerError()") > **new ArgumentScannerError**(`message`?): [`ArgumentScannerError`](/stricli/packages/core/classes/ArgumentScannerError.md) ###### Parameters[​](#parameters "Direct link to Parameters") • **message?**: `string` ###### Returns[​](#returns "Direct link to Returns") [`ArgumentScannerError`](/stricli/packages/core/classes/ArgumentScannerError.md) ###### Inherited from[​](#inherited-from "Direct link to Inherited from") `InternalError.constructor` ###### Defined in[​](#defined-in "Direct link to Defined in") node\_modules/typescript/lib/lib.es5.d.ts:1082 ##### new ArgumentScannerError()[​](#new-argumentscannererror-1 "Direct link to new ArgumentScannerError()") > **new ArgumentScannerError**(`message`?, `options`?): [`ArgumentScannerError`](/stricli/packages/core/classes/ArgumentScannerError.md) ###### Parameters[​](#parameters-1 "Direct link to Parameters") • **message?**: `string` • **options?**: `ErrorOptions` ###### Returns[​](#returns-1 "Direct link to Returns") [`ArgumentScannerError`](/stricli/packages/core/classes/ArgumentScannerError.md) ###### Inherited from[​](#inherited-from-1 "Direct link to Inherited from") `InternalError.constructor` ###### Defined in[​](#defined-in-1 "Direct link to Defined in") node\_modules/typescript/lib/lib.es5.d.ts:1082 #### Properties[​](#properties "Direct link to Properties") ##### cause?[​](#cause "Direct link to cause?") > `optional` **cause**: `unknown` ###### Inherited from[​](#inherited-from-2 "Direct link to Inherited from") `InternalError.cause` ###### Defined in[​](#defined-in-2 "Direct link to Defined in") node\_modules/typescript/lib/lib.es2022.error.d.ts:24 *** ##### message[​](#message "Direct link to message") > **message**: `string` ###### Inherited from[​](#inherited-from-3 "Direct link to Inherited from") `InternalError.message` ###### Defined in[​](#defined-in-3 "Direct link to Defined in") node\_modules/typescript/lib/lib.es5.d.ts:1077 *** ##### name[​](#name "Direct link to name") > **name**: `string` ###### Inherited from[​](#inherited-from-4 "Direct link to Inherited from") `InternalError.name` ###### Defined in[​](#defined-in-4 "Direct link to Defined in") node\_modules/typescript/lib/lib.es5.d.ts:1076 *** ##### stack?[​](#stack "Direct link to stack?") > `optional` **stack**: `string` ###### Inherited from[​](#inherited-from-5 "Direct link to Inherited from") `InternalError.stack` ###### Defined in[​](#defined-in-5 "Direct link to Defined in") node\_modules/typescript/lib/lib.es5.d.ts:1078 --- ### Class: EnumValidationError Thrown when input fails to match the given values for an enum flag. #### Extends[​](#extends "Direct link to Extends") * [`ArgumentScannerError`](/stricli/packages/core/classes/ArgumentScannerError.md) #### Constructors[​](#constructors "Direct link to Constructors") ##### new EnumValidationError()[​](#new-enumvalidationerror "Direct link to new EnumValidationError()") > **new EnumValidationError**(`externalFlagName`, `input`, `values`, `corrections`): [`EnumValidationError`](/stricli/packages/core/classes/EnumValidationError.md) ###### Parameters[​](#parameters "Direct link to Parameters") • **externalFlagName**: `ExternalFlagName` • **input**: `string` • **values**: readonly `string`\[] • **corrections**: readonly `string`\[] ###### Returns[​](#returns "Direct link to Returns") [`EnumValidationError`](/stricli/packages/core/classes/EnumValidationError.md) ###### Overrides[​](#overrides "Direct link to Overrides") [`ArgumentScannerError`](/stricli/packages/core/classes/ArgumentScannerError.md).[`constructor`](/stricli/packages/core/classes/ArgumentScannerError.md#constructors) ###### Defined in[​](#defined-in "Direct link to Defined in") [packages/core/src/parameter/scanner.ts:230](https://github.com/bloomberg/stricli/blob/ce1268b6b86eb7d136dd0be5b9fa525173d43b19/packages/core/src/parameter/scanner.ts#L230) #### Properties[​](#properties "Direct link to Properties") ##### cause?[​](#cause "Direct link to cause?") > `optional` **cause**: `unknown` ###### Inherited from[​](#inherited-from "Direct link to Inherited from") [`ArgumentScannerError`](/stricli/packages/core/classes/ArgumentScannerError.md).[`cause`](/stricli/packages/core/classes/ArgumentScannerError.md#cause) ###### Defined in[​](#defined-in-1 "Direct link to Defined in") node\_modules/typescript/lib/lib.es2022.error.d.ts:24 *** ##### externalFlagName[​](#externalflagname "Direct link to externalFlagName") > `readonly` **externalFlagName**: `string` External name of flag that was parsing this input. ###### Defined in[​](#defined-in-2 "Direct link to Defined in") [packages/core/src/parameter/scanner.ts:221](https://github.com/bloomberg/stricli/blob/ce1268b6b86eb7d136dd0be5b9fa525173d43b19/packages/core/src/parameter/scanner.ts#L221) *** ##### input[​](#input "Direct link to input") > `readonly` **input**: `string` Command line input that triggered this error. ###### Defined in[​](#defined-in-3 "Direct link to Defined in") [packages/core/src/parameter/scanner.ts:225](https://github.com/bloomberg/stricli/blob/ce1268b6b86eb7d136dd0be5b9fa525173d43b19/packages/core/src/parameter/scanner.ts#L225) *** ##### message[​](#message "Direct link to message") > **message**: `string` ###### Inherited from[​](#inherited-from-1 "Direct link to Inherited from") [`ArgumentScannerError`](/stricli/packages/core/classes/ArgumentScannerError.md).[`message`](/stricli/packages/core/classes/ArgumentScannerError.md#message) ###### Defined in[​](#defined-in-4 "Direct link to Defined in") node\_modules/typescript/lib/lib.es5.d.ts:1077 *** ##### name[​](#name "Direct link to name") > **name**: `string` ###### Inherited from[​](#inherited-from-2 "Direct link to Inherited from") [`ArgumentScannerError`](/stricli/packages/core/classes/ArgumentScannerError.md).[`name`](/stricli/packages/core/classes/ArgumentScannerError.md#name) ###### Defined in[​](#defined-in-5 "Direct link to Defined in") node\_modules/typescript/lib/lib.es5.d.ts:1076 *** ##### stack?[​](#stack "Direct link to stack?") > `optional` **stack**: `string` ###### Inherited from[​](#inherited-from-3 "Direct link to Inherited from") [`ArgumentScannerError`](/stricli/packages/core/classes/ArgumentScannerError.md).[`stack`](/stricli/packages/core/classes/ArgumentScannerError.md#stack) ###### Defined in[​](#defined-in-6 "Direct link to Defined in") node\_modules/typescript/lib/lib.es5.d.ts:1078 *** ##### values[​](#values "Direct link to values") > `readonly` **values**: readonly `string`\[] All possible enum values. ###### Defined in[​](#defined-in-7 "Direct link to Defined in") [packages/core/src/parameter/scanner.ts:229](https://github.com/bloomberg/stricli/blob/ce1268b6b86eb7d136dd0be5b9fa525173d43b19/packages/core/src/parameter/scanner.ts#L229) --- ### Class: FlagNotFoundError Thrown when input suggests an flag, but no flag with that name was found. #### Extends[​](#extends "Direct link to Extends") * [`ArgumentScannerError`](/stricli/packages/core/classes/ArgumentScannerError.md) #### Constructors[​](#constructors "Direct link to Constructors") ##### new FlagNotFoundError()[​](#new-flagnotfounderror "Direct link to new FlagNotFoundError()") > **new FlagNotFoundError**(`input`, `corrections`, `aliasName`?): [`FlagNotFoundError`](/stricli/packages/core/classes/FlagNotFoundError.md) ###### Parameters[​](#parameters "Direct link to Parameters") • **input**: `string` • **corrections**: readonly `string`\[] • **aliasName?**: `string` ###### Returns[​](#returns "Direct link to Returns") [`FlagNotFoundError`](/stricli/packages/core/classes/FlagNotFoundError.md) ###### Overrides[​](#overrides "Direct link to Overrides") [`ArgumentScannerError`](/stricli/packages/core/classes/ArgumentScannerError.md).[`constructor`](/stricli/packages/core/classes/ArgumentScannerError.md#constructors) ###### Defined in[​](#defined-in "Direct link to Defined in") [packages/core/src/parameter/scanner.ts:115](https://github.com/bloomberg/stricli/blob/ce1268b6b86eb7d136dd0be5b9fa525173d43b19/packages/core/src/parameter/scanner.ts#L115) #### Properties[​](#properties "Direct link to Properties") ##### aliasName?[​](#aliasname "Direct link to aliasName?") > `readonly` `optional` **aliasName**: `string` Set if error was caused indirectly by an alias. This indicates that something is wrong with the command configuration itself. ###### Defined in[​](#defined-in-1 "Direct link to Defined in") [packages/core/src/parameter/scanner.ts:114](https://github.com/bloomberg/stricli/blob/ce1268b6b86eb7d136dd0be5b9fa525173d43b19/packages/core/src/parameter/scanner.ts#L114) *** ##### cause?[​](#cause "Direct link to cause?") > `optional` **cause**: `unknown` ###### Inherited from[​](#inherited-from "Direct link to Inherited from") [`ArgumentScannerError`](/stricli/packages/core/classes/ArgumentScannerError.md).[`cause`](/stricli/packages/core/classes/ArgumentScannerError.md#cause) ###### Defined in[​](#defined-in-2 "Direct link to Defined in") node\_modules/typescript/lib/lib.es2022.error.d.ts:24 *** ##### corrections[​](#corrections "Direct link to corrections") > `readonly` **corrections**: readonly `string`\[] Set of proposed suggestions that are similar to the input. ###### Defined in[​](#defined-in-3 "Direct link to Defined in") [packages/core/src/parameter/scanner.ts:109](https://github.com/bloomberg/stricli/blob/ce1268b6b86eb7d136dd0be5b9fa525173d43b19/packages/core/src/parameter/scanner.ts#L109) *** ##### input[​](#input "Direct link to input") > `readonly` **input**: `string` Command line input that triggered this error. ###### Defined in[​](#defined-in-4 "Direct link to Defined in") [packages/core/src/parameter/scanner.ts:105](https://github.com/bloomberg/stricli/blob/ce1268b6b86eb7d136dd0be5b9fa525173d43b19/packages/core/src/parameter/scanner.ts#L105) *** ##### message[​](#message "Direct link to message") > **message**: `string` ###### Inherited from[​](#inherited-from-1 "Direct link to Inherited from") [`ArgumentScannerError`](/stricli/packages/core/classes/ArgumentScannerError.md).[`message`](/stricli/packages/core/classes/ArgumentScannerError.md#message) ###### Defined in[​](#defined-in-5 "Direct link to Defined in") node\_modules/typescript/lib/lib.es5.d.ts:1077 *** ##### name[​](#name "Direct link to name") > **name**: `string` ###### Inherited from[​](#inherited-from-2 "Direct link to Inherited from") [`ArgumentScannerError`](/stricli/packages/core/classes/ArgumentScannerError.md).[`name`](/stricli/packages/core/classes/ArgumentScannerError.md#name) ###### Defined in[​](#defined-in-6 "Direct link to Defined in") node\_modules/typescript/lib/lib.es5.d.ts:1076 *** ##### stack?[​](#stack "Direct link to stack?") > `optional` **stack**: `string` ###### Inherited from[​](#inherited-from-3 "Direct link to Inherited from") [`ArgumentScannerError`](/stricli/packages/core/classes/ArgumentScannerError.md).[`stack`](/stricli/packages/core/classes/ArgumentScannerError.md#stack) ###### Defined in[​](#defined-in-7 "Direct link to Defined in") node\_modules/typescript/lib/lib.es5.d.ts:1078 --- ### Class: InvalidNegatedFlagSyntaxError Thrown when a value is provided for a negated flag. #### Extends[​](#extends "Direct link to Extends") * [`ArgumentScannerError`](/stricli/packages/core/classes/ArgumentScannerError.md) #### Constructors[​](#constructors "Direct link to Constructors") ##### new InvalidNegatedFlagSyntaxError()[​](#new-invalidnegatedflagsyntaxerror "Direct link to new InvalidNegatedFlagSyntaxError()") > **new InvalidNegatedFlagSyntaxError**(`externalFlagName`, `valueText`): [`InvalidNegatedFlagSyntaxError`](/stricli/packages/core/classes/InvalidNegatedFlagSyntaxError.md) ###### Parameters[​](#parameters "Direct link to Parameters") • **externalFlagName**: `ExternalFlagName` • **valueText**: `string` ###### Returns[​](#returns "Direct link to Returns") [`InvalidNegatedFlagSyntaxError`](/stricli/packages/core/classes/InvalidNegatedFlagSyntaxError.md) ###### Overrides[​](#overrides "Direct link to Overrides") [`ArgumentScannerError`](/stricli/packages/core/classes/ArgumentScannerError.md).[`constructor`](/stricli/packages/core/classes/ArgumentScannerError.md#constructors) ###### Defined in[​](#defined-in "Direct link to Defined in") [packages/core/src/parameter/scanner.ts:480](https://github.com/bloomberg/stricli/blob/ce1268b6b86eb7d136dd0be5b9fa525173d43b19/packages/core/src/parameter/scanner.ts#L480) #### Properties[​](#properties "Direct link to Properties") ##### cause?[​](#cause "Direct link to cause?") > `optional` **cause**: `unknown` ###### Inherited from[​](#inherited-from "Direct link to Inherited from") [`ArgumentScannerError`](/stricli/packages/core/classes/ArgumentScannerError.md).[`cause`](/stricli/packages/core/classes/ArgumentScannerError.md#cause) ###### Defined in[​](#defined-in-1 "Direct link to Defined in") node\_modules/typescript/lib/lib.es2022.error.d.ts:24 *** ##### externalFlagName[​](#externalflagname "Direct link to externalFlagName") > `readonly` **externalFlagName**: `string` External name of flag that was active when this error was thrown. ###### Defined in[​](#defined-in-2 "Direct link to Defined in") [packages/core/src/parameter/scanner.ts:475](https://github.com/bloomberg/stricli/blob/ce1268b6b86eb7d136dd0be5b9fa525173d43b19/packages/core/src/parameter/scanner.ts#L475) *** ##### message[​](#message "Direct link to message") > **message**: `string` ###### Inherited from[​](#inherited-from-1 "Direct link to Inherited from") [`ArgumentScannerError`](/stricli/packages/core/classes/ArgumentScannerError.md).[`message`](/stricli/packages/core/classes/ArgumentScannerError.md#message) ###### Defined in[​](#defined-in-3 "Direct link to Defined in") node\_modules/typescript/lib/lib.es5.d.ts:1077 *** ##### name[​](#name "Direct link to name") > **name**: `string` ###### Inherited from[​](#inherited-from-2 "Direct link to Inherited from") [`ArgumentScannerError`](/stricli/packages/core/classes/ArgumentScannerError.md).[`name`](/stricli/packages/core/classes/ArgumentScannerError.md#name) ###### Defined in[​](#defined-in-4 "Direct link to Defined in") node\_modules/typescript/lib/lib.es5.d.ts:1076 *** ##### stack?[​](#stack "Direct link to stack?") > `optional` **stack**: `string` ###### Inherited from[​](#inherited-from-3 "Direct link to Inherited from") [`ArgumentScannerError`](/stricli/packages/core/classes/ArgumentScannerError.md).[`stack`](/stricli/packages/core/classes/ArgumentScannerError.md#stack) ###### Defined in[​](#defined-in-5 "Direct link to Defined in") node\_modules/typescript/lib/lib.es5.d.ts:1078 *** ##### valueText[​](#valuetext "Direct link to valueText") > `readonly` **valueText**: `string` Input text equivalent to right hand side of input ###### Defined in[​](#defined-in-6 "Direct link to Defined in") [packages/core/src/parameter/scanner.ts:479](https://github.com/bloomberg/stricli/blob/ce1268b6b86eb7d136dd0be5b9fa525173d43b19/packages/core/src/parameter/scanner.ts#L479) --- ### Class: UnexpectedFlagError Thrown when single-valued flag encounters more than one value. #### Extends[​](#extends "Direct link to Extends") * [`ArgumentScannerError`](/stricli/packages/core/classes/ArgumentScannerError.md) #### Constructors[​](#constructors "Direct link to Constructors") ##### new UnexpectedFlagError()[​](#new-unexpectedflagerror "Direct link to new UnexpectedFlagError()") > **new UnexpectedFlagError**(`externalFlagName`, `previousInput`, `input`): [`UnexpectedFlagError`](/stricli/packages/core/classes/UnexpectedFlagError.md) ###### Parameters[​](#parameters "Direct link to Parameters") • **externalFlagName**: `ExternalFlagName` • **previousInput**: `string` • **input**: `string` ###### Returns[​](#returns "Direct link to Returns") [`UnexpectedFlagError`](/stricli/packages/core/classes/UnexpectedFlagError.md) ###### Overrides[​](#overrides "Direct link to Overrides") [`ArgumentScannerError`](/stricli/packages/core/classes/ArgumentScannerError.md).[`constructor`](/stricli/packages/core/classes/ArgumentScannerError.md#constructors) ###### Defined in[​](#defined-in "Direct link to Defined in") [packages/core/src/parameter/scanner.ts:653](https://github.com/bloomberg/stricli/blob/ce1268b6b86eb7d136dd0be5b9fa525173d43b19/packages/core/src/parameter/scanner.ts#L653) #### Properties[​](#properties "Direct link to Properties") ##### cause?[​](#cause "Direct link to cause?") > `optional` **cause**: `unknown` ###### Inherited from[​](#inherited-from "Direct link to Inherited from") [`ArgumentScannerError`](/stricli/packages/core/classes/ArgumentScannerError.md).[`cause`](/stricli/packages/core/classes/ArgumentScannerError.md#cause) ###### Defined in[​](#defined-in-1 "Direct link to Defined in") node\_modules/typescript/lib/lib.es2022.error.d.ts:24 *** ##### externalFlagName[​](#externalflagname "Direct link to externalFlagName") > `readonly` **externalFlagName**: `string` External name of flag that was parsing this input. ###### Defined in[​](#defined-in-2 "Direct link to Defined in") [packages/core/src/parameter/scanner.ts:644](https://github.com/bloomberg/stricli/blob/ce1268b6b86eb7d136dd0be5b9fa525173d43b19/packages/core/src/parameter/scanner.ts#L644) *** ##### input[​](#input "Direct link to input") > `readonly` **input**: `string` Command line input that triggered this error. ###### Defined in[​](#defined-in-3 "Direct link to Defined in") [packages/core/src/parameter/scanner.ts:652](https://github.com/bloomberg/stricli/blob/ce1268b6b86eb7d136dd0be5b9fa525173d43b19/packages/core/src/parameter/scanner.ts#L652) *** ##### message[​](#message "Direct link to message") > **message**: `string` ###### Inherited from[​](#inherited-from-1 "Direct link to Inherited from") [`ArgumentScannerError`](/stricli/packages/core/classes/ArgumentScannerError.md).[`message`](/stricli/packages/core/classes/ArgumentScannerError.md#message) ###### Defined in[​](#defined-in-4 "Direct link to Defined in") node\_modules/typescript/lib/lib.es5.d.ts:1077 *** ##### name[​](#name "Direct link to name") > **name**: `string` ###### Inherited from[​](#inherited-from-2 "Direct link to Inherited from") [`ArgumentScannerError`](/stricli/packages/core/classes/ArgumentScannerError.md).[`name`](/stricli/packages/core/classes/ArgumentScannerError.md#name) ###### Defined in[​](#defined-in-5 "Direct link to Defined in") node\_modules/typescript/lib/lib.es5.d.ts:1076 *** ##### previousInput[​](#previousinput "Direct link to previousInput") > `readonly` **previousInput**: `string` Command line input that was previously encountered by this flag. ###### Defined in[​](#defined-in-6 "Direct link to Defined in") [packages/core/src/parameter/scanner.ts:648](https://github.com/bloomberg/stricli/blob/ce1268b6b86eb7d136dd0be5b9fa525173d43b19/packages/core/src/parameter/scanner.ts#L648) *** ##### stack?[​](#stack "Direct link to stack?") > `optional` **stack**: `string` ###### Inherited from[​](#inherited-from-3 "Direct link to Inherited from") [`ArgumentScannerError`](/stricli/packages/core/classes/ArgumentScannerError.md).[`stack`](/stricli/packages/core/classes/ArgumentScannerError.md#stack) ###### Defined in[​](#defined-in-7 "Direct link to Defined in") node\_modules/typescript/lib/lib.es5.d.ts:1078 --- ### Class: UnexpectedPositionalError Thrown when too many positional arguments were encountered. #### Extends[​](#extends "Direct link to Extends") * [`ArgumentScannerError`](/stricli/packages/core/classes/ArgumentScannerError.md) #### Constructors[​](#constructors "Direct link to Constructors") ##### new UnexpectedPositionalError()[​](#new-unexpectedpositionalerror "Direct link to new UnexpectedPositionalError()") > **new UnexpectedPositionalError**(`expectedCount`, `input`): [`UnexpectedPositionalError`](/stricli/packages/core/classes/UnexpectedPositionalError.md) ###### Parameters[​](#parameters "Direct link to Parameters") • **expectedCount**: `number` • **input**: `string` ###### Returns[​](#returns "Direct link to Returns") [`UnexpectedPositionalError`](/stricli/packages/core/classes/UnexpectedPositionalError.md) ###### Overrides[​](#overrides "Direct link to Overrides") [`ArgumentScannerError`](/stricli/packages/core/classes/ArgumentScannerError.md).[`constructor`](/stricli/packages/core/classes/ArgumentScannerError.md#constructors) ###### Defined in[​](#defined-in "Direct link to Defined in") [packages/core/src/parameter/scanner.ts:290](https://github.com/bloomberg/stricli/blob/ce1268b6b86eb7d136dd0be5b9fa525173d43b19/packages/core/src/parameter/scanner.ts#L290) #### Properties[​](#properties "Direct link to Properties") ##### cause?[​](#cause "Direct link to cause?") > `optional` **cause**: `unknown` ###### Inherited from[​](#inherited-from "Direct link to Inherited from") [`ArgumentScannerError`](/stricli/packages/core/classes/ArgumentScannerError.md).[`cause`](/stricli/packages/core/classes/ArgumentScannerError.md#cause) ###### Defined in[​](#defined-in-1 "Direct link to Defined in") node\_modules/typescript/lib/lib.es2022.error.d.ts:24 *** ##### expectedCount[​](#expectedcount "Direct link to expectedCount") > `readonly` **expectedCount**: `number` Expected (maximum) count of positional arguments. ###### Defined in[​](#defined-in-2 "Direct link to Defined in") [packages/core/src/parameter/scanner.ts:285](https://github.com/bloomberg/stricli/blob/ce1268b6b86eb7d136dd0be5b9fa525173d43b19/packages/core/src/parameter/scanner.ts#L285) *** ##### input[​](#input "Direct link to input") > `readonly` **input**: `string` Command line input that triggered this error. ###### Defined in[​](#defined-in-3 "Direct link to Defined in") [packages/core/src/parameter/scanner.ts:289](https://github.com/bloomberg/stricli/blob/ce1268b6b86eb7d136dd0be5b9fa525173d43b19/packages/core/src/parameter/scanner.ts#L289) *** ##### message[​](#message "Direct link to message") > **message**: `string` ###### Inherited from[​](#inherited-from-1 "Direct link to Inherited from") [`ArgumentScannerError`](/stricli/packages/core/classes/ArgumentScannerError.md).[`message`](/stricli/packages/core/classes/ArgumentScannerError.md#message) ###### Defined in[​](#defined-in-4 "Direct link to Defined in") node\_modules/typescript/lib/lib.es5.d.ts:1077 *** ##### name[​](#name "Direct link to name") > **name**: `string` ###### Inherited from[​](#inherited-from-2 "Direct link to Inherited from") [`ArgumentScannerError`](/stricli/packages/core/classes/ArgumentScannerError.md).[`name`](/stricli/packages/core/classes/ArgumentScannerError.md#name) ###### Defined in[​](#defined-in-5 "Direct link to Defined in") node\_modules/typescript/lib/lib.es5.d.ts:1076 *** ##### stack?[​](#stack "Direct link to stack?") > `optional` **stack**: `string` ###### Inherited from[​](#inherited-from-3 "Direct link to Inherited from") [`ArgumentScannerError`](/stricli/packages/core/classes/ArgumentScannerError.md).[`stack`](/stricli/packages/core/classes/ArgumentScannerError.md#stack) ###### Defined in[​](#defined-in-6 "Direct link to Defined in") node\_modules/typescript/lib/lib.es5.d.ts:1078 --- ### Class: UnsatisfiedFlagError Thrown when flag was expecting input that was not provided. #### Extends[​](#extends "Direct link to Extends") * [`ArgumentScannerError`](/stricli/packages/core/classes/ArgumentScannerError.md) #### Constructors[​](#constructors "Direct link to Constructors") ##### new UnsatisfiedFlagError()[​](#new-unsatisfiedflagerror "Direct link to new UnsatisfiedFlagError()") > **new UnsatisfiedFlagError**(`externalFlagName`, `nextFlagName`?): [`UnsatisfiedFlagError`](/stricli/packages/core/classes/UnsatisfiedFlagError.md) ###### Parameters[​](#parameters "Direct link to Parameters") • **externalFlagName**: `ExternalFlagName` • **nextFlagName?**: `ExternalFlagName` ###### Returns[​](#returns "Direct link to Returns") [`UnsatisfiedFlagError`](/stricli/packages/core/classes/UnsatisfiedFlagError.md) ###### Overrides[​](#overrides "Direct link to Overrides") [`ArgumentScannerError`](/stricli/packages/core/classes/ArgumentScannerError.md).[`constructor`](/stricli/packages/core/classes/ArgumentScannerError.md#constructors) ###### Defined in[​](#defined-in "Direct link to Defined in") [packages/core/src/parameter/scanner.ts:267](https://github.com/bloomberg/stricli/blob/ce1268b6b86eb7d136dd0be5b9fa525173d43b19/packages/core/src/parameter/scanner.ts#L267) #### Properties[​](#properties "Direct link to Properties") ##### cause?[​](#cause "Direct link to cause?") > `optional` **cause**: `unknown` ###### Inherited from[​](#inherited-from "Direct link to Inherited from") [`ArgumentScannerError`](/stricli/packages/core/classes/ArgumentScannerError.md).[`cause`](/stricli/packages/core/classes/ArgumentScannerError.md#cause) ###### Defined in[​](#defined-in-1 "Direct link to Defined in") node\_modules/typescript/lib/lib.es2022.error.d.ts:24 *** ##### externalFlagName[​](#externalflagname "Direct link to externalFlagName") > `readonly` **externalFlagName**: `string` External name of flag that was active when this error was thrown. ###### Defined in[​](#defined-in-2 "Direct link to Defined in") [packages/core/src/parameter/scanner.ts:262](https://github.com/bloomberg/stricli/blob/ce1268b6b86eb7d136dd0be5b9fa525173d43b19/packages/core/src/parameter/scanner.ts#L262) *** ##### message[​](#message "Direct link to message") > **message**: `string` ###### Inherited from[​](#inherited-from-1 "Direct link to Inherited from") [`ArgumentScannerError`](/stricli/packages/core/classes/ArgumentScannerError.md).[`message`](/stricli/packages/core/classes/ArgumentScannerError.md#message) ###### Defined in[​](#defined-in-3 "Direct link to Defined in") node\_modules/typescript/lib/lib.es5.d.ts:1077 *** ##### name[​](#name "Direct link to name") > **name**: `string` ###### Inherited from[​](#inherited-from-2 "Direct link to Inherited from") [`ArgumentScannerError`](/stricli/packages/core/classes/ArgumentScannerError.md).[`name`](/stricli/packages/core/classes/ArgumentScannerError.md#name) ###### Defined in[​](#defined-in-4 "Direct link to Defined in") node\_modules/typescript/lib/lib.es5.d.ts:1076 *** ##### nextFlagName?[​](#nextflagname "Direct link to nextFlagName?") > `readonly` `optional` **nextFlagName**: `string` External name of flag that interrupted the original flag. ###### Defined in[​](#defined-in-5 "Direct link to Defined in") [packages/core/src/parameter/scanner.ts:266](https://github.com/bloomberg/stricli/blob/ce1268b6b86eb7d136dd0be5b9fa525173d43b19/packages/core/src/parameter/scanner.ts#L266) *** ##### stack?[​](#stack "Direct link to stack?") > `optional` **stack**: `string` ###### Inherited from[​](#inherited-from-3 "Direct link to Inherited from") [`ArgumentScannerError`](/stricli/packages/core/classes/ArgumentScannerError.md).[`stack`](/stricli/packages/core/classes/ArgumentScannerError.md#stack) ###### Defined in[​](#defined-in-6 "Direct link to Defined in") node\_modules/typescript/lib/lib.es5.d.ts:1078 --- ### Class: UnsatisfiedPositionalError Thrown when positional parameter was expecting input that was not provided. #### Extends[​](#extends "Direct link to Extends") * [`ArgumentScannerError`](/stricli/packages/core/classes/ArgumentScannerError.md) #### Constructors[​](#constructors "Direct link to Constructors") ##### new UnsatisfiedPositionalError()[​](#new-unsatisfiedpositionalerror "Direct link to new UnsatisfiedPositionalError()") > **new UnsatisfiedPositionalError**(`placeholder`, `limit`?): [`UnsatisfiedPositionalError`](/stricli/packages/core/classes/UnsatisfiedPositionalError.md) ###### Parameters[​](#parameters "Direct link to Parameters") • **placeholder**: `Placeholder` • **limit?**: \[`number`, `number`] ###### Returns[​](#returns "Direct link to Returns") [`UnsatisfiedPositionalError`](/stricli/packages/core/classes/UnsatisfiedPositionalError.md) ###### Overrides[​](#overrides "Direct link to Overrides") [`ArgumentScannerError`](/stricli/packages/core/classes/ArgumentScannerError.md).[`constructor`](/stricli/packages/core/classes/ArgumentScannerError.md#constructors) ###### Defined in[​](#defined-in "Direct link to Defined in") [packages/core/src/parameter/scanner.ts:309](https://github.com/bloomberg/stricli/blob/ce1268b6b86eb7d136dd0be5b9fa525173d43b19/packages/core/src/parameter/scanner.ts#L309) #### Properties[​](#properties "Direct link to Properties") ##### cause?[​](#cause "Direct link to cause?") > `optional` **cause**: `unknown` ###### Inherited from[​](#inherited-from "Direct link to Inherited from") [`ArgumentScannerError`](/stricli/packages/core/classes/ArgumentScannerError.md).[`cause`](/stricli/packages/core/classes/ArgumentScannerError.md#cause) ###### Defined in[​](#defined-in-1 "Direct link to Defined in") node\_modules/typescript/lib/lib.es2022.error.d.ts:24 *** ##### limit?[​](#limit "Direct link to limit?") > `readonly` `optional` **limit**: \[`number`, `number`] If specified, indicates the minimum number of arguments that are expected and the last argument count. ###### Defined in[​](#defined-in-2 "Direct link to Defined in") [packages/core/src/parameter/scanner.ts:308](https://github.com/bloomberg/stricli/blob/ce1268b6b86eb7d136dd0be5b9fa525173d43b19/packages/core/src/parameter/scanner.ts#L308) *** ##### message[​](#message "Direct link to message") > **message**: `string` ###### Inherited from[​](#inherited-from-1 "Direct link to Inherited from") [`ArgumentScannerError`](/stricli/packages/core/classes/ArgumentScannerError.md).[`message`](/stricli/packages/core/classes/ArgumentScannerError.md#message) ###### Defined in[​](#defined-in-3 "Direct link to Defined in") node\_modules/typescript/lib/lib.es5.d.ts:1077 *** ##### name[​](#name "Direct link to name") > **name**: `string` ###### Inherited from[​](#inherited-from-2 "Direct link to Inherited from") [`ArgumentScannerError`](/stricli/packages/core/classes/ArgumentScannerError.md).[`name`](/stricli/packages/core/classes/ArgumentScannerError.md#name) ###### Defined in[​](#defined-in-4 "Direct link to Defined in") node\_modules/typescript/lib/lib.es5.d.ts:1076 *** ##### placeholder[​](#placeholder "Direct link to placeholder") > `readonly` **placeholder**: `string` Placeholder for positional argument that was active when this error was thrown. ###### Defined in[​](#defined-in-5 "Direct link to Defined in") [packages/core/src/parameter/scanner.ts:304](https://github.com/bloomberg/stricli/blob/ce1268b6b86eb7d136dd0be5b9fa525173d43b19/packages/core/src/parameter/scanner.ts#L304) *** ##### stack?[​](#stack "Direct link to stack?") > `optional` **stack**: `string` ###### Inherited from[​](#inherited-from-3 "Direct link to Inherited from") [`ArgumentScannerError`](/stricli/packages/core/classes/ArgumentScannerError.md).[`stack`](/stricli/packages/core/classes/ArgumentScannerError.md#stack) ###### Defined in[​](#defined-in-6 "Direct link to Defined in") node\_modules/typescript/lib/lib.es5.d.ts:1078 --- ### Function: booleanParser() > **booleanParser**(`input`): `boolean` Parses input strings as booleans. Transforms to lowercase and then checks against "true" and "false". #### Parameters[​](#parameters "Direct link to Parameters") • **input**: `string` #### Returns[​](#returns "Direct link to Returns") `boolean` #### Defined in[​](#defined-in "Direct link to Defined in") [packages/core/src/parameter/parser/boolean.ts:8](https://github.com/bloomberg/stricli/blob/ce1268b6b86eb7d136dd0be5b9fa525173d43b19/packages/core/src/parameter/parser/boolean.ts#L8) --- ### Function: buildApplication() #### buildApplication(root, config, integrations)[​](#buildapplicationroot-config-integrations "Direct link to buildApplication(root, config, integrations)") > **buildApplication**<`CONTEXT`>(`root`, `config`, `integrations`?): [`Application`](/stricli/packages/core/interfaces/Application.md)<`CONTEXT`> Builds an application from a top-level route map [RouteMap](/stricli/packages/core/interfaces/RouteMap.md) and configuration [ApplicationConfiguration](/stricli/packages/core/interfaces/ApplicationConfiguration.md). ##### Type Parameters[​](#type-parameters "Direct link to Type Parameters") • **CONTEXT** *extends* [`CommandContext`](/stricli/packages/core/interfaces/CommandContext.md) ##### Parameters[​](#parameters "Direct link to Parameters") • **root**: [`RouteMap`](/stricli/packages/core/interfaces/RouteMap.md)<`CONTEXT`> • **config**: [`PartialApplicationConfiguration`](/stricli/packages/core/type-aliases/PartialApplicationConfiguration.md) • **integrations?**: `Readonly`<`Record`<`string`, [`StricliIntegration`](/stricli/packages/core/type-aliases/StricliIntegration.md)<`CONTEXT`>>> ##### Returns[​](#returns "Direct link to Returns") [`Application`](/stricli/packages/core/interfaces/Application.md)<`CONTEXT`> ##### Defined in[​](#defined-in "Direct link to Defined in") [packages/core/src/application/builder.ts:25](https://github.com/bloomberg/stricli/blob/ce1268b6b86eb7d136dd0be5b9fa525173d43b19/packages/core/src/application/builder.ts#L25) #### buildApplication(command, appConfig, integrations)[​](#buildapplicationcommand-appconfig-integrations "Direct link to buildApplication(command, appConfig, integrations)") > **buildApplication**<`CONTEXT`>(`command`, `appConfig`, `integrations`?): [`Application`](/stricli/packages/core/interfaces/Application.md)<`CONTEXT`> Builds an application with a single, top-level command [Command](/stricli/packages/core/interfaces/Command.md) and configuration [ApplicationConfiguration](/stricli/packages/core/interfaces/ApplicationConfiguration.md). ##### Type Parameters[​](#type-parameters-1 "Direct link to Type Parameters") • **CONTEXT** *extends* [`CommandContext`](/stricli/packages/core/interfaces/CommandContext.md) ##### Parameters[​](#parameters-1 "Direct link to Parameters") • **command**: [`Command`](/stricli/packages/core/interfaces/Command.md)<`CONTEXT`> • **appConfig**: [`PartialApplicationConfiguration`](/stricli/packages/core/type-aliases/PartialApplicationConfiguration.md) • **integrations?**: `Readonly`<`Record`<`string`, [`StricliIntegration`](/stricli/packages/core/type-aliases/StricliIntegration.md)<`CONTEXT`>>> ##### Returns[​](#returns-1 "Direct link to Returns") [`Application`](/stricli/packages/core/interfaces/Application.md)<`CONTEXT`> ##### Defined in[​](#defined-in-1 "Direct link to Defined in") [packages/core/src/application/builder.ts:34](https://github.com/bloomberg/stricli/blob/ce1268b6b86eb7d136dd0be5b9fa525173d43b19/packages/core/src/application/builder.ts#L34) --- ### Function: buildChoiceParser() > **buildChoiceParser**<`T`>(`choices`): [`InputParser`](/stricli/packages/core/type-aliases/InputParser.md)<`T`> Creates an input parser that checks if the input string is found in a list of choices. #### Type Parameters[​](#type-parameters "Direct link to Type Parameters") • **T** *extends* `string` #### Parameters[​](#parameters "Direct link to Parameters") • **choices**: readonly `T`\[] #### Returns[​](#returns "Direct link to Returns") [`InputParser`](/stricli/packages/core/type-aliases/InputParser.md)<`T`> #### Defined in[​](#defined-in "Direct link to Defined in") [packages/core/src/parameter/parser/choice.ts:12](https://github.com/bloomberg/stricli/blob/ce1268b6b86eb7d136dd0be5b9fa525173d43b19/packages/core/src/parameter/parser/choice.ts#L12) --- ### Function: buildCommand() > **buildCommand**<`FLAGS`, `ARGS`, `CONTEXT`>(`builderArgs`): [`Command`](/stricli/packages/core/interfaces/Command.md)<`CONTEXT`> Build command from loader or local function as action with associated parameters and documentation. #### Type Parameters[​](#type-parameters "Direct link to Type Parameters") • **FLAGS** *extends* `Readonly`<`Partial`<`Record`\>> = `object` • **ARGS** *extends* [`BaseArgs`](/stricli/packages/core/type-aliases/BaseArgs.md) = \[] • **CONTEXT** *extends* [`CommandContext`](/stricli/packages/core/interfaces/CommandContext.md) = [`CommandContext`](/stricli/packages/core/interfaces/CommandContext.md) #### Parameters[​](#parameters "Direct link to Parameters") • **builderArgs**: [`CommandBuilderArguments`](/stricli/packages/core/type-aliases/CommandBuilderArguments.md)<`FLAGS`, `ARGS`, `CONTEXT`> #### Returns[​](#returns "Direct link to Returns") [`Command`](/stricli/packages/core/interfaces/Command.md)<`CONTEXT`> #### Defined in[​](#defined-in "Direct link to Defined in") [packages/core/src/routing/command/builder.ts:82](https://github.com/bloomberg/stricli/blob/ce1268b6b86eb7d136dd0be5b9fa525173d43b19/packages/core/src/routing/command/builder.ts#L82) --- ### Function: buildRouteMap() > **buildRouteMap**<`R`, `CONTEXT`>(`__namedParameters`): [`RouteMap`](/stricli/packages/core/interfaces/RouteMap.md)<`CONTEXT`> Build route map from name-route mapping with documentation. #### Type Parameters[​](#type-parameters "Direct link to Type Parameters") • **R** *extends* `string` • **CONTEXT** *extends* [`CommandContext`](/stricli/packages/core/interfaces/CommandContext.md) = [`CommandContext`](/stricli/packages/core/interfaces/CommandContext.md) #### Parameters[​](#parameters "Direct link to Parameters") • **\_\_namedParameters**: [`RouteMapBuilderArguments`](/stricli/packages/core/interfaces/RouteMapBuilderArguments.md)<`R`, `CONTEXT`> #### Returns[​](#returns "Direct link to Returns") [`RouteMap`](/stricli/packages/core/interfaces/RouteMap.md)<`CONTEXT`> #### Defined in[​](#defined-in "Direct link to Defined in") [packages/core/src/routing/route-map/builder.ts:45](https://github.com/bloomberg/stricli/blob/ce1268b6b86eb7d136dd0be5b9fa525173d43b19/packages/core/src/routing/route-map/builder.ts#L45) --- ### Function: formatMessageForArgumentScannerError() > **formatMessageForArgumentScannerError**(`error`, `formatter`): `string` Utility method for customizing message of argument scanner error #### Parameters[​](#parameters "Direct link to Parameters") • **error**: [`ArgumentScannerError`](/stricli/packages/core/classes/ArgumentScannerError.md) Error thrown by argument scanner • **formatter**: `Partial`<`ArgumentScannerErrorFormatter`> For all keys specified, controls message formatting for that specific subtype of error #### Returns[​](#returns "Direct link to Returns") `string` #### Defined in[​](#defined-in "Direct link to Defined in") [packages/core/src/parameter/scanner.ts:60](https://github.com/bloomberg/stricli/blob/ce1268b6b86eb7d136dd0be5b9fa525173d43b19/packages/core/src/parameter/scanner.ts#L60) --- ### Function: generateHelpTextForAllCommands() > **generateHelpTextForAllCommands**(`__namedParameters`, `locale`?): readonly [`DocumentedCommand`](/stricli/packages/core/type-aliases/DocumentedCommand.md)\[] Generate help text in the given locale for each command in this application. Return value is an array of tuples containing the route to that command and the help text. If no locale specified, uses the defaultLocale from the application configuration. #### Parameters[​](#parameters "Direct link to Parameters") • **\_\_namedParameters**: [`Application`](/stricli/packages/core/interfaces/Application.md)<[`CommandContext`](/stricli/packages/core/interfaces/CommandContext.md)> • **locale?**: `string` #### Returns[​](#returns "Direct link to Returns") readonly [`DocumentedCommand`](/stricli/packages/core/type-aliases/DocumentedCommand.md)\[] #### Defined in[​](#defined-in "Direct link to Defined in") [packages/core/src/application/documentation.ts:44](https://github.com/bloomberg/stricli/blob/ce1268b6b86eb7d136dd0be5b9fa525173d43b19/packages/core/src/application/documentation.ts#L44) --- ### Function: help() > **help**<`CONTEXT`>(`__namedParameters`): [`StricliIntegration`](/stricli/packages/core/type-aliases/StricliIntegration.md)<`CONTEXT`> This integration provides a `--help` flag for all commands, which prints the help text for the command and exits. It can be customized to provide different behavior; see [HelpIntegrationConfiguration](/stricli/packages/core/type-aliases/HelpIntegrationConfiguration.md) for configuration options. #### Type Parameters[​](#type-parameters "Direct link to Type Parameters") • **CONTEXT** *extends* [`CommandContext`](/stricli/packages/core/interfaces/CommandContext.md) #### Parameters[​](#parameters "Direct link to Parameters") • **\_\_namedParameters**: [`HelpIntegrationConfiguration`](/stricli/packages/core/type-aliases/HelpIntegrationConfiguration.md) #### Returns[​](#returns "Direct link to Returns") [`StricliIntegration`](/stricli/packages/core/type-aliases/StricliIntegration.md)<`CONTEXT`> #### Defined in[​](#defined-in "Direct link to Defined in") [packages/core/src/application/integrations/help.ts:45](https://github.com/bloomberg/stricli/blob/ce1268b6b86eb7d136dd0be5b9fa525173d43b19/packages/core/src/application/integrations/help.ts#L45) --- ### Function: looseBooleanParser() > **looseBooleanParser**(`input`): `boolean` Parses input strings as booleans (loosely). Transforms to lowercase and then checks against the following values: * `true`: `"true"`, `"t"`, `"yes"`, `"y"`, `"on"`, `"1"`, `""` * `false`: `"false"`, `"f"`, `"no"`, `"n"`, `"off"`, `"0"` Parsers are only executed when an input is provided, so the empty string is treated as a truthy value (i.e. a flag that is present but has no value is treated as `true`). #### Parameters[​](#parameters "Direct link to Parameters") • **input**: `string` #### Returns[​](#returns "Direct link to Returns") `boolean` #### Defined in[​](#defined-in "Direct link to Defined in") [packages/core/src/parameter/parser/boolean.ts:30](https://github.com/bloomberg/stricli/blob/ce1268b6b86eb7d136dd0be5b9fa525173d43b19/packages/core/src/parameter/parser/boolean.ts#L30) --- ### Function: numberParser() > **numberParser**(`input`): `number` Parses input strings as numbers. #### Parameters[​](#parameters "Direct link to Parameters") • **input**: `string` #### Returns[​](#returns "Direct link to Returns") `number` #### Defined in[​](#defined-in "Direct link to Defined in") [packages/core/src/parameter/parser/number.ts:7](https://github.com/bloomberg/stricli/blob/ce1268b6b86eb7d136dd0be5b9fa525173d43b19/packages/core/src/parameter/parser/number.ts#L7) --- ### Function: proposeCompletions() > **proposeCompletions**<`CONTEXT`>(`__namedParameters`, `rawInputs`, `context`): `Promise`\ Propose possible completions for a partial input string. #### Type Parameters[​](#type-parameters "Direct link to Type Parameters") • **CONTEXT** *extends* [`CommandContext`](/stricli/packages/core/interfaces/CommandContext.md) #### Parameters[​](#parameters "Direct link to Parameters") • **\_\_namedParameters**: [`Application`](/stricli/packages/core/interfaces/Application.md)<`CONTEXT`> • **rawInputs**: readonly `string`\[] • **context**: [`StricliDynamicCommandContext`](/stricli/packages/core/type-aliases/StricliDynamicCommandContext.md)<`CONTEXT`> #### Returns[​](#returns "Direct link to Returns") `Promise`\ #### Defined in[​](#defined-in "Direct link to Defined in") [packages/core/src/application/propose-completions.ts:18](https://github.com/bloomberg/stricli/blob/ce1268b6b86eb7d136dd0be5b9fa525173d43b19/packages/core/src/application/propose-completions.ts#L18) --- ### Function: run() > **run**<`CONTEXT`>(`app`, `inputs`, `context`): `Promise`<`void`> #### Type Parameters[​](#type-parameters "Direct link to Type Parameters") • **CONTEXT** *extends* [`CommandContext`](/stricli/packages/core/interfaces/CommandContext.md) #### Parameters[​](#parameters "Direct link to Parameters") • **app**: [`Application`](/stricli/packages/core/interfaces/Application.md)<`CONTEXT`> • **inputs**: readonly `string`\[] • **context**: [`StricliDynamicCommandContext`](/stricli/packages/core/type-aliases/StricliDynamicCommandContext.md)<`CONTEXT`> #### Returns[​](#returns "Direct link to Returns") `Promise`<`void`> #### Defined in[​](#defined-in "Direct link to Defined in") [packages/core/src/index.ts:80](https://github.com/bloomberg/stricli/blob/ce1268b6b86eb7d136dd0be5b9fa525173d43b19/packages/core/src/index.ts#L80) --- ### Function: version() > **version**<`CONTEXT`>(`__namedParameters`): [`StricliIntegration`](/stricli/packages/core/type-aliases/StricliIntegration.md)<`CONTEXT`> This integration provides a `--version` flag on the root command, which prints the current version of the application and exits. It can be customized to provide different behavior; see [VersionIntegrationConfiguration](/stricli/packages/core/type-aliases/VersionIntegrationConfiguration.md) for configuration options. #### Type Parameters[​](#type-parameters "Direct link to Type Parameters") • **CONTEXT** *extends* [`CommandContext`](/stricli/packages/core/interfaces/CommandContext.md) #### Parameters[​](#parameters "Direct link to Parameters") • **\_\_namedParameters**: [`VersionIntegrationConfiguration`](/stricli/packages/core/type-aliases/VersionIntegrationConfiguration.md) #### Returns[​](#returns "Direct link to Returns") [`StricliIntegration`](/stricli/packages/core/type-aliases/StricliIntegration.md)<`CONTEXT`> #### Defined in[​](#defined-in "Direct link to Defined in") [packages/core/src/application/integrations/version.ts:37](https://github.com/bloomberg/stricli/blob/ce1268b6b86eb7d136dd0be5b9fa525173d43b19/packages/core/src/application/integrations/version.ts#L37) --- ### @stricli/core #### Classes[​](#classes "Direct link to Classes") * [AliasNotFoundError](/stricli/packages/core/classes/AliasNotFoundError.md) * [ArgumentParseError](/stricli/packages/core/classes/ArgumentParseError.md) * [ArgumentScannerError](/stricli/packages/core/classes/ArgumentScannerError.md) * [EnumValidationError](/stricli/packages/core/classes/EnumValidationError.md) * [FlagNotFoundError](/stricli/packages/core/classes/FlagNotFoundError.md) * [InvalidNegatedFlagSyntaxError](/stricli/packages/core/classes/InvalidNegatedFlagSyntaxError.md) * [UnexpectedFlagError](/stricli/packages/core/classes/UnexpectedFlagError.md) * [UnexpectedPositionalError](/stricli/packages/core/classes/UnexpectedPositionalError.md) * [UnsatisfiedFlagError](/stricli/packages/core/classes/UnsatisfiedFlagError.md) * [UnsatisfiedPositionalError](/stricli/packages/core/classes/UnsatisfiedPositionalError.md) #### Interfaces[​](#interfaces "Direct link to Interfaces") * [Application](/stricli/packages/core/interfaces/Application.md) * [ApplicationConfiguration](/stricli/packages/core/interfaces/ApplicationConfiguration.md) * [ApplicationContext](/stricli/packages/core/interfaces/ApplicationContext.md) * [ApplicationErrorFormatting](/stricli/packages/core/interfaces/ApplicationErrorFormatting.md) * [ApplicationText](/stricli/packages/core/interfaces/ApplicationText.md) * [Command](/stricli/packages/core/interfaces/Command.md) * [CommandContext](/stricli/packages/core/interfaces/CommandContext.md) * [CommandModule](/stricli/packages/core/interfaces/CommandModule.md) * [CompletionConfiguration](/stricli/packages/core/interfaces/CompletionConfiguration.md) * [DocumentationBriefs](/stricli/packages/core/interfaces/DocumentationBriefs.md) * [DocumentationConfiguration](/stricli/packages/core/interfaces/DocumentationConfiguration.md) * [DocumentationHeaders](/stricli/packages/core/interfaces/DocumentationHeaders.md) * [DocumentationKeywords](/stricli/packages/core/interfaces/DocumentationKeywords.md) * [FormattingConfiguration](/stricli/packages/core/interfaces/FormattingConfiguration.md) * [RouteMap](/stricli/packages/core/interfaces/RouteMap.md) * [RouteMapBuilderArguments](/stricli/packages/core/interfaces/RouteMapBuilderArguments.md) * [ScannerConfiguration](/stricli/packages/core/interfaces/ScannerConfiguration.md) * [StricliProcess](/stricli/packages/core/interfaces/StricliProcess.md) #### Type Aliases[​](#type-aliases "Direct link to Type Aliases") * [Aliases](/stricli/packages/core/type-aliases/Aliases.md) * [ApplicationFlagFunction](/stricli/packages/core/type-aliases/ApplicationFlagFunction.md) * [BaseArgs](/stricli/packages/core/type-aliases/BaseArgs.md) * [BaseFlags](/stricli/packages/core/type-aliases/BaseFlags.md) * [CommandBuilderArguments](/stricli/packages/core/type-aliases/CommandBuilderArguments.md) * [CommandFunction](/stricli/packages/core/type-aliases/CommandFunction.md) * [CommandFunctionLoader](/stricli/packages/core/type-aliases/CommandFunctionLoader.md) * [CommandInfo](/stricli/packages/core/type-aliases/CommandInfo.md) * [DisplayCaseStyle](/stricli/packages/core/type-aliases/DisplayCaseStyle.md) * [DocumentedCommand](/stricli/packages/core/type-aliases/DocumentedCommand.md) * [EnvironmentVariableName](/stricli/packages/core/type-aliases/EnvironmentVariableName.md) * [FlagParametersForType](/stricli/packages/core/type-aliases/FlagParametersForType.md) * [HelpIntegrationConfiguration](/stricli/packages/core/type-aliases/HelpIntegrationConfiguration.md) * [InputCompletion](/stricli/packages/core/type-aliases/InputCompletion.md) * [InputParser](/stricli/packages/core/type-aliases/InputParser.md) * [LifecycleHooks](/stricli/packages/core/type-aliases/LifecycleHooks.md) * [PartialApplicationConfiguration](/stricli/packages/core/type-aliases/PartialApplicationConfiguration.md) * [ScannerCaseStyle](/stricli/packages/core/type-aliases/ScannerCaseStyle.md) * [StricliCommandContextBuilder](/stricli/packages/core/type-aliases/StricliCommandContextBuilder.md) * [StricliDynamicCommandContext](/stricli/packages/core/type-aliases/StricliDynamicCommandContext.md) * [StricliIntegration](/stricli/packages/core/type-aliases/StricliIntegration.md) * [TypedCommandFlagParameters](/stricli/packages/core/type-aliases/TypedCommandFlagParameters.md) * [TypedCommandParameters](/stricli/packages/core/type-aliases/TypedCommandParameters.md) * [TypedCommandPositionalParameters](/stricli/packages/core/type-aliases/TypedCommandPositionalParameters.md) * [TypedFlagParameter](/stricli/packages/core/type-aliases/TypedFlagParameter.md) * [TypedPositionalParameter](/stricli/packages/core/type-aliases/TypedPositionalParameter.md) * [TypedPositionalParameters](/stricli/packages/core/type-aliases/TypedPositionalParameters.md) * [VersionInfo](/stricli/packages/core/type-aliases/VersionInfo.md) * [VersionIntegrationConfiguration](/stricli/packages/core/type-aliases/VersionIntegrationConfiguration.md) #### Variables[​](#variables "Direct link to Variables") * [ExitCode](/stricli/packages/core/variables/ExitCode.md) * [text\_en](/stricli/packages/core/variables/text_en.md) #### Functions[​](#functions "Direct link to Functions") * [booleanParser](/stricli/packages/core/functions/booleanParser.md) * [buildApplication](/stricli/packages/core/functions/buildApplication.md) * [buildChoiceParser](/stricli/packages/core/functions/buildChoiceParser.md) * [buildCommand](/stricli/packages/core/functions/buildCommand.md) * [buildRouteMap](/stricli/packages/core/functions/buildRouteMap.md) * [formatMessageForArgumentScannerError](/stricli/packages/core/functions/formatMessageForArgumentScannerError.md) * [generateHelpTextForAllCommands](/stricli/packages/core/functions/generateHelpTextForAllCommands.md) * [help](/stricli/packages/core/functions/help.md) * [looseBooleanParser](/stricli/packages/core/functions/looseBooleanParser.md) * [numberParser](/stricli/packages/core/functions/numberParser.md) * [proposeCompletions](/stricli/packages/core/functions/proposeCompletions.md) * [run](/stricli/packages/core/functions/run.md) * [version](/stricli/packages/core/functions/version.md) --- ### Interface: Application Interface for top-level command line application. #### Type Parameters[​](#type-parameters "Direct link to Type Parameters") • **CONTEXT** *extends* [`CommandContext`](/stricli/packages/core/interfaces/CommandContext.md) #### Properties[​](#properties "Direct link to Properties") ##### config[​](#config "Direct link to config") > `readonly` **config**: [`ApplicationConfiguration`](/stricli/packages/core/interfaces/ApplicationConfiguration.md) ###### Defined in[​](#defined-in "Direct link to Defined in") [packages/core/src/application/types.ts:14](https://github.com/bloomberg/stricli/blob/ce1268b6b86eb7d136dd0be5b9fa525173d43b19/packages/core/src/application/types.ts#L14) *** ##### defaultText[​](#defaulttext "Direct link to defaultText") > `readonly` **defaultText**: [`ApplicationText`](/stricli/packages/core/interfaces/ApplicationText.md) ###### Defined in[​](#defined-in-1 "Direct link to Defined in") [packages/core/src/application/types.ts:15](https://github.com/bloomberg/stricli/blob/ce1268b6b86eb7d136dd0be5b9fa525173d43b19/packages/core/src/application/types.ts#L15) *** ##### integrations[​](#integrations "Direct link to integrations") > `readonly` **integrations**: `Readonly`<`Record`<`string`, [`StricliIntegration`](/stricli/packages/core/type-aliases/StricliIntegration.md)<`CONTEXT`>>> ###### Defined in[​](#defined-in-2 "Direct link to Defined in") [packages/core/src/application/types.ts:16](https://github.com/bloomberg/stricli/blob/ce1268b6b86eb7d136dd0be5b9fa525173d43b19/packages/core/src/application/types.ts#L16) *** ##### root[​](#root "Direct link to root") > `readonly` **root**: `RoutingTarget`<`CONTEXT`> ###### Defined in[​](#defined-in-3 "Direct link to Defined in") [packages/core/src/application/types.ts:13](https://github.com/bloomberg/stricli/blob/ce1268b6b86eb7d136dd0be5b9fa525173d43b19/packages/core/src/application/types.ts#L13) --- ### Interface: ApplicationConfiguration Configuration for controlling the runtime behavior of the application. #### Properties[​](#properties "Direct link to Properties") ##### completion[​](#completion "Direct link to completion") > `readonly` **completion**: [`CompletionConfiguration`](/stricli/packages/core/interfaces/CompletionConfiguration.md) If supplied, customizes command completion proposal behavior. See documentation of inner types for default values. ###### Defined in[​](#defined-in "Direct link to Defined in") [packages/core/src/config.ts:248](https://github.com/bloomberg/stricli/blob/ce1268b6b86eb7d136dd0be5b9fa525173d43b19/packages/core/src/config.ts#L248) *** ##### determineExitCode()?[​](#determineexitcode "Direct link to determineExitCode()?") > `readonly` `optional` **determineExitCode**: (`exc`) => `number` In the case where a command function throws some value unexpectedly or safely returns an Error, this function will translate that into an exit code. If unspecified, the exit code will default to 1 when a command function throws some value. ###### Parameters[​](#parameters "Direct link to Parameters") • **exc**: `unknown` ###### Returns[​](#returns "Direct link to Returns") `number` ###### Defined in[​](#defined-in-1 "Direct link to Defined in") [packages/core/src/config.ts:261](https://github.com/bloomberg/stricli/blob/ce1268b6b86eb7d136dd0be5b9fa525173d43b19/packages/core/src/config.ts#L261) *** ##### documentation[​](#documentation "Direct link to documentation") > `readonly` **documentation**: [`DocumentationConfiguration`](/stricli/packages/core/interfaces/DocumentationConfiguration.md) If supplied, customizes the formatting of documentation lines in help text. See documentation of inner types for default values. ###### Defined in[​](#defined-in-2 "Direct link to Defined in") [packages/core/src/config.ts:242](https://github.com/bloomberg/stricli/blob/ce1268b6b86eb7d136dd0be5b9fa525173d43b19/packages/core/src/config.ts#L242) *** ##### localization[​](#localization "Direct link to localization") > `readonly` **localization**: `LocalizationConfiguration` If supplied, customizes text localization. See documentation of inner types for default values. ###### Defined in[​](#defined-in-3 "Direct link to Defined in") [packages/core/src/config.ts:254](https://github.com/bloomberg/stricli/blob/ce1268b6b86eb7d136dd0be5b9fa525173d43b19/packages/core/src/config.ts#L254) *** ##### name[​](#name "Direct link to name") > `readonly` **name**: `string` Unique name for this application. It should match the command that is used to run the application. ###### Defined in[​](#defined-in-4 "Direct link to Defined in") [packages/core/src/config.ts:221](https://github.com/bloomberg/stricli/blob/ce1268b6b86eb7d136dd0be5b9fa525173d43b19/packages/core/src/config.ts#L221) *** ##### scanner[​](#scanner "Direct link to scanner") > `readonly` **scanner**: [`ScannerConfiguration`](/stricli/packages/core/interfaces/ScannerConfiguration.md) If supplied, customizes the command/argument scanning behavior of the application. See documentation of inner types for default values. ###### Defined in[​](#defined-in-5 "Direct link to Defined in") [packages/core/src/config.ts:236](https://github.com/bloomberg/stricli/blob/ce1268b6b86eb7d136dd0be5b9fa525173d43b19/packages/core/src/config.ts#L236) *** ##### ~~versionInfo?~~[​](#versioninfo "Direct link to versioninfo") > `readonly` `optional` **versionInfo**: [`VersionInfo`](/stricli/packages/core/type-aliases/VersionInfo.md) If supplied, application will be aware of version info at runtime. Before every run, the application will fetch the latest version and warn if it differs from the current version. As well, a new flag `--version` (with alias `-v`) will be available on the base route, which will print the current version to stdout. ###### Deprecated[​](#deprecated "Direct link to Deprecated") Use the [version](/stricli/packages/core/functions/version.md) integration directly instead, which provides more control over the behavior of the version flag. ###### Defined in[​](#defined-in-6 "Direct link to Defined in") [packages/core/src/config.ts:230](https://github.com/bloomberg/stricli/blob/ce1268b6b86eb7d136dd0be5b9fa525173d43b19/packages/core/src/config.ts#L230) --- ### Interface: ApplicationContext Top-level context that provides necessary process information to Stricli internals. #### Extends[​](#extends "Direct link to Extends") * [`CommandContext`](/stricli/packages/core/interfaces/CommandContext.md) #### Properties[​](#properties "Direct link to Properties") ##### locale?[​](#locale "Direct link to locale?") > `readonly` `optional` **locale**: `string` A string that represents the current user's locale. It is passed to LocalizationConfiguration.loadText which provides the text for Stricli to use when formatting built-in output. ###### Defined in[​](#defined-in "Direct link to Defined in") [packages/core/src/context.ts:84](https://github.com/bloomberg/stricli/blob/ce1268b6b86eb7d136dd0be5b9fa525173d43b19/packages/core/src/context.ts#L84) *** ##### process[​](#process "Direct link to process") > `readonly` **process**: [`StricliProcess`](/stricli/packages/core/interfaces/StricliProcess.md) ###### Overrides[​](#overrides "Direct link to Overrides") [`CommandContext`](/stricli/packages/core/interfaces/CommandContext.md).[`process`](/stricli/packages/core/interfaces/CommandContext.md#process) ###### Defined in[​](#defined-in-1 "Direct link to Defined in") [packages/core/src/context.ts:78](https://github.com/bloomberg/stricli/blob/ce1268b6b86eb7d136dd0be5b9fa525173d43b19/packages/core/src/context.ts#L78) --- ### Interface: ApplicationErrorFormatting Methods to customize the formatting of stderr messages handled by application execution. #### Extends[​](#extends "Direct link to Extends") * `CommandErrorFormatting` #### Extended by[​](#extended-by "Direct link to Extended by") * [`ApplicationText`](/stricli/packages/core/interfaces/ApplicationText.md) #### Properties[​](#properties "Direct link to Properties") ##### commandErrorResult()[​](#commanderrorresult "Direct link to commandErrorResult()") > `readonly` **commandErrorResult**: (`this`, `err`, `ansiColor`) => `string` Formatted error message for the case where an Error was safely returned from the command. Users are most likely to hit this case, so make sure that the error text provides practical, usable feedback. If `ansiColor` is true, this string can use ANSI terminal codes. Codes may have already been applied so be aware you may have to reset to achieve the desired output. ###### Parameters[​](#parameters "Direct link to Parameters") • **this**: `ExceptionFormatting` • **err**: `Error` • **ansiColor**: `boolean` ###### Returns[​](#returns "Direct link to Returns") `string` ###### Inherited from[​](#inherited-from "Direct link to Inherited from") `CommandErrorFormatting.commandErrorResult` ###### Defined in[​](#defined-in "Direct link to Defined in") [packages/core/src/text.ts:179](https://github.com/bloomberg/stricli/blob/ce1268b6b86eb7d136dd0be5b9fa525173d43b19/packages/core/src/text.ts#L179) *** ##### exceptionWhileLoadingCommandContext()[​](#exceptionwhileloadingcommandcontext "Direct link to exceptionWhileLoadingCommandContext()") > `readonly` **exceptionWhileLoadingCommandContext**: (`this`, `exc`, `ansiColor`) => `string` Formatted error message for the case where some exception was thrown while loading the context for the command run. This likely indicates an issue with the application itself or possibly the user's installation of the application. If `ansiColor` is true, this string can use ANSI terminal codes. Codes may have already been applied so be aware you may have to reset to achieve the desired output. ###### Parameters[​](#parameters-1 "Direct link to Parameters") • **this**: `ExceptionFormatting` • **exc**: `unknown` • **ansiColor**: `boolean` ###### Returns[​](#returns-1 "Direct link to Returns") `string` ###### Inherited from[​](#inherited-from-1 "Direct link to Inherited from") `CommandErrorFormatting.exceptionWhileLoadingCommandContext` ###### Defined in[​](#defined-in-1 "Direct link to Defined in") [packages/core/src/text.ts:159](https://github.com/bloomberg/stricli/blob/ce1268b6b86eb7d136dd0be5b9fa525173d43b19/packages/core/src/text.ts#L159) *** ##### exceptionWhileLoadingCommandFunction()[​](#exceptionwhileloadingcommandfunction "Direct link to exceptionWhileLoadingCommandFunction()") > `readonly` **exceptionWhileLoadingCommandFunction**: (`this`, `exc`, `ansiColor`) => `string` Formatted error message for the case where some exception was thrown while loading the command function. This likely indicates an issue with the application itself or possibly the user's installation of the application. If `ansiColor` is true, this string can use ANSI terminal codes. Codes may have already been applied so be aware you may have to reset to achieve the desired output. ###### Parameters[​](#parameters-2 "Direct link to Parameters") • **this**: `ExceptionFormatting` • **exc**: `unknown` • **ansiColor**: `boolean` ###### Returns[​](#returns-2 "Direct link to Returns") `string` ###### Inherited from[​](#inherited-from-2 "Direct link to Inherited from") `CommandErrorFormatting.exceptionWhileLoadingCommandFunction` ###### Defined in[​](#defined-in-2 "Direct link to Defined in") [packages/core/src/text.ts:147](https://github.com/bloomberg/stricli/blob/ce1268b6b86eb7d136dd0be5b9fa525173d43b19/packages/core/src/text.ts#L147) *** ##### exceptionWhileParsingArguments()[​](#exceptionwhileparsingarguments "Direct link to exceptionWhileParsingArguments()") > `readonly` **exceptionWhileParsingArguments**: (`this`, `exc`, `ansiColor`) => `string` Formatted error message for the case where some exception was thrown while parsing the arguments. Exceptions intentionally thrown by this library while parsing arguments will extend from ArgumentScannerError. These subclasses provide additional context about the specific error. Use the [formatMessageForArgumentScannerError](/stricli/packages/core/functions/formatMessageForArgumentScannerError.md) helper to handle the different error types. If `ansiColor` is true, this string can use ANSI terminal codes. Codes may have already been applied so be aware you may have to reset to achieve the desired output. ###### Parameters[​](#parameters-3 "Direct link to Parameters") • **this**: `ExceptionFormatting` • **exc**: `unknown` • **ansiColor**: `boolean` ###### Returns[​](#returns-3 "Direct link to Returns") `string` ###### Inherited from[​](#inherited-from-3 "Direct link to Inherited from") `CommandErrorFormatting.exceptionWhileParsingArguments` ###### Defined in[​](#defined-in-3 "Direct link to Defined in") [packages/core/src/text.ts:139](https://github.com/bloomberg/stricli/blob/ce1268b6b86eb7d136dd0be5b9fa525173d43b19/packages/core/src/text.ts#L139) *** ##### exceptionWhileRunningCommand()[​](#exceptionwhilerunningcommand "Direct link to exceptionWhileRunningCommand()") > `readonly` **exceptionWhileRunningCommand**: (`this`, `exc`, `ansiColor`) => `string` Formatted error message for the case where some exception was thrown while running the command. Users are most likely to hit this case, so make sure that the error text provides practical, usable feedback. If `ansiColor` is true, this string can use ANSI terminal codes. Codes may have already been applied so be aware you may have to reset to achieve the desired output. ###### Parameters[​](#parameters-4 "Direct link to Parameters") • **this**: `ExceptionFormatting` • **exc**: `unknown` • **ansiColor**: `boolean` ###### Returns[​](#returns-4 "Direct link to Returns") `string` ###### Inherited from[​](#inherited-from-4 "Direct link to Inherited from") `CommandErrorFormatting.exceptionWhileRunningCommand` ###### Defined in[​](#defined-in-4 "Direct link to Defined in") [packages/core/src/text.ts:171](https://github.com/bloomberg/stricli/blob/ce1268b6b86eb7d136dd0be5b9fa525173d43b19/packages/core/src/text.ts#L171) *** ##### exceptionWhileRunningIntegrationFlag()[​](#exceptionwhilerunningintegrationflag "Direct link to exceptionWhileRunningIntegrationFlag()") > `readonly` **exceptionWhileRunningIntegrationFlag**: (`this`, `args`) => `string` Formatted error message for the case where some exception was thrown while running an integration flag. If `ansiColor` is true, this string can use ANSI terminal codes. Codes may have already been applied so be aware you may have to reset to achieve the desired output. ###### Parameters[​](#parameters-5 "Direct link to Parameters") • **this**: `ExceptionFormatting` • **args** • **args.ansiColor**: `boolean` • **args.exception**: `unknown` • **args.integration**: `string` ###### Returns[​](#returns-5 "Direct link to Returns") `string` ###### Defined in[​](#defined-in-5 "Direct link to Defined in") [packages/core/src/text.ts:232](https://github.com/bloomberg/stricli/blob/ce1268b6b86eb7d136dd0be5b9fa525173d43b19/packages/core/src/text.ts#L232) *** ##### exceptionWhileRunningIntegrationHook()[​](#exceptionwhilerunningintegrationhook "Direct link to exceptionWhileRunningIntegrationHook()") > `readonly` **exceptionWhileRunningIntegrationHook**: (`this`, `args`) => `string` Formatted error message for the case where some exception was thrown while running the command. Users are most likely to hit this case, so make sure that the error text provides practical, usable feedback. If `ansiColor` is true, this string can use ANSI terminal codes. Codes may have already been applied so be aware you may have to reset to achieve the desired output. ###### Parameters[​](#parameters-6 "Direct link to Parameters") • **this**: `ExceptionFormatting` • **args** • **args.ansiColor**: `boolean` • **args.exception**: `unknown` • **args.hook**: `string` • **args.integration**: `string` ###### Returns[​](#returns-6 "Direct link to Returns") `string` ###### Defined in[​](#defined-in-6 "Direct link to Defined in") [packages/core/src/text.ts:217](https://github.com/bloomberg/stricli/blob/ce1268b6b86eb7d136dd0be5b9fa525173d43b19/packages/core/src/text.ts#L217) *** ##### formatException()?[​](#formatexception "Direct link to formatException()?") > `readonly` `optional` **formatException**: (`exc`) => `string` Formatted message to display this thrown exception in the terminal. The default behavior returns the `stack` property if the object extends from `Error`, and otherwise calls `String()`. This method should never throw and should not include any ANSI terminal codes in the resulting string. ###### Parameters[​](#parameters-7 "Direct link to Parameters") • **exc**: `unknown` ###### Returns[​](#returns-7 "Direct link to Returns") `string` ###### Inherited from[​](#inherited-from-5 "Direct link to Inherited from") `CommandErrorFormatting.formatException` ###### Defined in[​](#defined-in-7 "Direct link to Defined in") [packages/core/src/text.ts:122](https://github.com/bloomberg/stricli/blob/ce1268b6b86eb7d136dd0be5b9fa525173d43b19/packages/core/src/text.ts#L122) *** ##### noCommandRegisteredForInput()[​](#nocommandregisteredforinput "Direct link to noCommandRegisteredForInput()") > `readonly` **noCommandRegisteredForInput**: (`args`) => `string` Formatted error message for the case where the supplied command line inputs do not resolve to a registered command. Supplied with arguments for the argument in question, and several possible corrections based on registered commands. If `ansiColor` is true, this string can use ANSI terminal codes. Codes may have already been applied so be aware you may have to reset to achieve the desired output. ###### Parameters[​](#parameters-8 "Direct link to Parameters") • **args** • **args.ansiColor**: `boolean` • **args.corrections**: readonly `string`\[] • **args.input**: `string` ###### Returns[​](#returns-8 "Direct link to Returns") `string` ###### Defined in[​](#defined-in-8 "Direct link to Defined in") [packages/core/src/text.ts:193](https://github.com/bloomberg/stricli/blob/ce1268b6b86eb7d136dd0be5b9fa525173d43b19/packages/core/src/text.ts#L193) *** ##### noTextAvailableForLocale()[​](#notextavailableforlocale "Direct link to noTextAvailableForLocale()") > `readonly` **noTextAvailableForLocale**: (`args`) => `string` Formatted error message for the case where the application does not provide text for the current requested locale. Should indicate that the default locale will be used instead. If `ansiColor` is true, this string can use ANSI terminal codes. Codes may have already been applied so be aware you may have to reset to achieve the desired output. ###### Parameters[​](#parameters-9 "Direct link to Parameters") • **args** • **args.ansiColor**: `boolean` • **args.defaultLocale**: `string` • **args.requestedLocale**: `string` ###### Returns[​](#returns-9 "Direct link to Returns") `string` ###### Defined in[​](#defined-in-9 "Direct link to Defined in") [packages/core/src/text.ts:205](https://github.com/bloomberg/stricli/blob/ce1268b6b86eb7d136dd0be5b9fa525173d43b19/packages/core/src/text.ts#L205) --- ### Interface: ApplicationText The full set of static text and text-returning callbacks that are necessary for Stricli to write the necessary output. #### Extends[​](#extends "Direct link to Extends") * [`ApplicationErrorFormatting`](/stricli/packages/core/interfaces/ApplicationErrorFormatting.md).`DocumentationText` #### Properties[​](#properties "Direct link to Properties") ##### briefs[​](#briefs "Direct link to briefs") > `readonly` **briefs**: [`DocumentationBriefs`](/stricli/packages/core/interfaces/DocumentationBriefs.md) Short documentation brief strings used to build help text. ###### Inherited from[​](#inherited-from "Direct link to Inherited from") `DocumentationText.briefs` ###### Defined in[​](#defined-in "Direct link to Defined in") [packages/core/src/text.ts:109](https://github.com/bloomberg/stricli/blob/ce1268b6b86eb7d136dd0be5b9fa525173d43b19/packages/core/src/text.ts#L109) *** ##### commandErrorResult()[​](#commanderrorresult "Direct link to commandErrorResult()") > `readonly` **commandErrorResult**: (`this`, `err`, `ansiColor`) => `string` Formatted error message for the case where an Error was safely returned from the command. Users are most likely to hit this case, so make sure that the error text provides practical, usable feedback. If `ansiColor` is true, this string can use ANSI terminal codes. Codes may have already been applied so be aware you may have to reset to achieve the desired output. ###### Parameters[​](#parameters "Direct link to Parameters") • **this**: `ExceptionFormatting` • **err**: `Error` • **ansiColor**: `boolean` ###### Returns[​](#returns "Direct link to Returns") `string` ###### Inherited from[​](#inherited-from-1 "Direct link to Inherited from") [`ApplicationErrorFormatting`](/stricli/packages/core/interfaces/ApplicationErrorFormatting.md).[`commandErrorResult`](/stricli/packages/core/interfaces/ApplicationErrorFormatting.md#commanderrorresult) ###### Defined in[​](#defined-in-1 "Direct link to Defined in") [packages/core/src/text.ts:179](https://github.com/bloomberg/stricli/blob/ce1268b6b86eb7d136dd0be5b9fa525173d43b19/packages/core/src/text.ts#L179) *** ##### currentVersionIsNotLatest()[​](#currentversionisnotlatest "Direct link to currentVersionIsNotLatest()") > `readonly` **currentVersionIsNotLatest**: (`args`) => `string` Generate warning text to be written to stdout when the latest version is not installed. Should include brief instructions for how to update to that version. If `ansiColor` is true, this string can use ANSI terminal codes. Codes may have already been applied so be aware you may have to reset to achieve the desired output. ###### Parameters[​](#parameters-1 "Direct link to Parameters") • **args** • **args.ansiColor**: `boolean` • **args.currentVersion**: `string` • **args.latestVersion**: `string` • **args.upgradeCommand?**: `string` ###### Returns[​](#returns-1 "Direct link to Returns") `string` ###### Defined in[​](#defined-in-2 "Direct link to Defined in") [packages/core/src/text.ts:253](https://github.com/bloomberg/stricli/blob/ce1268b6b86eb7d136dd0be5b9fa525173d43b19/packages/core/src/text.ts#L253) *** ##### exceptionWhileLoadingCommandContext()[​](#exceptionwhileloadingcommandcontext "Direct link to exceptionWhileLoadingCommandContext()") > `readonly` **exceptionWhileLoadingCommandContext**: (`this`, `exc`, `ansiColor`) => `string` Formatted error message for the case where some exception was thrown while loading the context for the command run. This likely indicates an issue with the application itself or possibly the user's installation of the application. If `ansiColor` is true, this string can use ANSI terminal codes. Codes may have already been applied so be aware you may have to reset to achieve the desired output. ###### Parameters[​](#parameters-2 "Direct link to Parameters") • **this**: `ExceptionFormatting` • **exc**: `unknown` • **ansiColor**: `boolean` ###### Returns[​](#returns-2 "Direct link to Returns") `string` ###### Inherited from[​](#inherited-from-2 "Direct link to Inherited from") [`ApplicationErrorFormatting`](/stricli/packages/core/interfaces/ApplicationErrorFormatting.md).[`exceptionWhileLoadingCommandContext`](/stricli/packages/core/interfaces/ApplicationErrorFormatting.md#exceptionwhileloadingcommandcontext) ###### Defined in[​](#defined-in-3 "Direct link to Defined in") [packages/core/src/text.ts:159](https://github.com/bloomberg/stricli/blob/ce1268b6b86eb7d136dd0be5b9fa525173d43b19/packages/core/src/text.ts#L159) *** ##### exceptionWhileLoadingCommandFunction()[​](#exceptionwhileloadingcommandfunction "Direct link to exceptionWhileLoadingCommandFunction()") > `readonly` **exceptionWhileLoadingCommandFunction**: (`this`, `exc`, `ansiColor`) => `string` Formatted error message for the case where some exception was thrown while loading the command function. This likely indicates an issue with the application itself or possibly the user's installation of the application. If `ansiColor` is true, this string can use ANSI terminal codes. Codes may have already been applied so be aware you may have to reset to achieve the desired output. ###### Parameters[​](#parameters-3 "Direct link to Parameters") • **this**: `ExceptionFormatting` • **exc**: `unknown` • **ansiColor**: `boolean` ###### Returns[​](#returns-3 "Direct link to Returns") `string` ###### Inherited from[​](#inherited-from-3 "Direct link to Inherited from") [`ApplicationErrorFormatting`](/stricli/packages/core/interfaces/ApplicationErrorFormatting.md).[`exceptionWhileLoadingCommandFunction`](/stricli/packages/core/interfaces/ApplicationErrorFormatting.md#exceptionwhileloadingcommandfunction) ###### Defined in[​](#defined-in-4 "Direct link to Defined in") [packages/core/src/text.ts:147](https://github.com/bloomberg/stricli/blob/ce1268b6b86eb7d136dd0be5b9fa525173d43b19/packages/core/src/text.ts#L147) *** ##### exceptionWhileParsingArguments()[​](#exceptionwhileparsingarguments "Direct link to exceptionWhileParsingArguments()") > `readonly` **exceptionWhileParsingArguments**: (`this`, `exc`, `ansiColor`) => `string` Formatted error message for the case where some exception was thrown while parsing the arguments. Exceptions intentionally thrown by this library while parsing arguments will extend from ArgumentScannerError. These subclasses provide additional context about the specific error. Use the [formatMessageForArgumentScannerError](/stricli/packages/core/functions/formatMessageForArgumentScannerError.md) helper to handle the different error types. If `ansiColor` is true, this string can use ANSI terminal codes. Codes may have already been applied so be aware you may have to reset to achieve the desired output. ###### Parameters[​](#parameters-4 "Direct link to Parameters") • **this**: `ExceptionFormatting` • **exc**: `unknown` • **ansiColor**: `boolean` ###### Returns[​](#returns-4 "Direct link to Returns") `string` ###### Inherited from[​](#inherited-from-4 "Direct link to Inherited from") [`ApplicationErrorFormatting`](/stricli/packages/core/interfaces/ApplicationErrorFormatting.md).[`exceptionWhileParsingArguments`](/stricli/packages/core/interfaces/ApplicationErrorFormatting.md#exceptionwhileparsingarguments) ###### Defined in[​](#defined-in-5 "Direct link to Defined in") [packages/core/src/text.ts:139](https://github.com/bloomberg/stricli/blob/ce1268b6b86eb7d136dd0be5b9fa525173d43b19/packages/core/src/text.ts#L139) *** ##### exceptionWhileRunningCommand()[​](#exceptionwhilerunningcommand "Direct link to exceptionWhileRunningCommand()") > `readonly` **exceptionWhileRunningCommand**: (`this`, `exc`, `ansiColor`) => `string` Formatted error message for the case where some exception was thrown while running the command. Users are most likely to hit this case, so make sure that the error text provides practical, usable feedback. If `ansiColor` is true, this string can use ANSI terminal codes. Codes may have already been applied so be aware you may have to reset to achieve the desired output. ###### Parameters[​](#parameters-5 "Direct link to Parameters") • **this**: `ExceptionFormatting` • **exc**: `unknown` • **ansiColor**: `boolean` ###### Returns[​](#returns-5 "Direct link to Returns") `string` ###### Inherited from[​](#inherited-from-5 "Direct link to Inherited from") [`ApplicationErrorFormatting`](/stricli/packages/core/interfaces/ApplicationErrorFormatting.md).[`exceptionWhileRunningCommand`](/stricli/packages/core/interfaces/ApplicationErrorFormatting.md#exceptionwhilerunningcommand) ###### Defined in[​](#defined-in-6 "Direct link to Defined in") [packages/core/src/text.ts:171](https://github.com/bloomberg/stricli/blob/ce1268b6b86eb7d136dd0be5b9fa525173d43b19/packages/core/src/text.ts#L171) *** ##### exceptionWhileRunningIntegrationFlag()[​](#exceptionwhilerunningintegrationflag "Direct link to exceptionWhileRunningIntegrationFlag()") > `readonly` **exceptionWhileRunningIntegrationFlag**: (`this`, `args`) => `string` Formatted error message for the case where some exception was thrown while running an integration flag. If `ansiColor` is true, this string can use ANSI terminal codes. Codes may have already been applied so be aware you may have to reset to achieve the desired output. ###### Parameters[​](#parameters-6 "Direct link to Parameters") • **this**: `ExceptionFormatting` • **args** • **args.ansiColor**: `boolean` • **args.exception**: `unknown` • **args.integration**: `string` ###### Returns[​](#returns-6 "Direct link to Returns") `string` ###### Inherited from[​](#inherited-from-6 "Direct link to Inherited from") [`ApplicationErrorFormatting`](/stricli/packages/core/interfaces/ApplicationErrorFormatting.md).[`exceptionWhileRunningIntegrationFlag`](/stricli/packages/core/interfaces/ApplicationErrorFormatting.md#exceptionwhilerunningintegrationflag) ###### Defined in[​](#defined-in-7 "Direct link to Defined in") [packages/core/src/text.ts:232](https://github.com/bloomberg/stricli/blob/ce1268b6b86eb7d136dd0be5b9fa525173d43b19/packages/core/src/text.ts#L232) *** ##### exceptionWhileRunningIntegrationHook()[​](#exceptionwhilerunningintegrationhook "Direct link to exceptionWhileRunningIntegrationHook()") > `readonly` **exceptionWhileRunningIntegrationHook**: (`this`, `args`) => `string` Formatted error message for the case where some exception was thrown while running the command. Users are most likely to hit this case, so make sure that the error text provides practical, usable feedback. If `ansiColor` is true, this string can use ANSI terminal codes. Codes may have already been applied so be aware you may have to reset to achieve the desired output. ###### Parameters[​](#parameters-7 "Direct link to Parameters") • **this**: `ExceptionFormatting` • **args** • **args.ansiColor**: `boolean` • **args.exception**: `unknown` • **args.hook**: `string` • **args.integration**: `string` ###### Returns[​](#returns-7 "Direct link to Returns") `string` ###### Inherited from[​](#inherited-from-7 "Direct link to Inherited from") [`ApplicationErrorFormatting`](/stricli/packages/core/interfaces/ApplicationErrorFormatting.md).[`exceptionWhileRunningIntegrationHook`](/stricli/packages/core/interfaces/ApplicationErrorFormatting.md#exceptionwhilerunningintegrationhook) ###### Defined in[​](#defined-in-8 "Direct link to Defined in") [packages/core/src/text.ts:217](https://github.com/bloomberg/stricli/blob/ce1268b6b86eb7d136dd0be5b9fa525173d43b19/packages/core/src/text.ts#L217) *** ##### formatException()?[​](#formatexception "Direct link to formatException()?") > `readonly` `optional` **formatException**: (`exc`) => `string` Formatted message to display this thrown exception in the terminal. The default behavior returns the `stack` property if the object extends from `Error`, and otherwise calls `String()`. This method should never throw and should not include any ANSI terminal codes in the resulting string. ###### Parameters[​](#parameters-8 "Direct link to Parameters") • **exc**: `unknown` ###### Returns[​](#returns-8 "Direct link to Returns") `string` ###### Inherited from[​](#inherited-from-8 "Direct link to Inherited from") [`ApplicationErrorFormatting`](/stricli/packages/core/interfaces/ApplicationErrorFormatting.md).[`formatException`](/stricli/packages/core/interfaces/ApplicationErrorFormatting.md#formatexception) ###### Defined in[​](#defined-in-9 "Direct link to Defined in") [packages/core/src/text.ts:122](https://github.com/bloomberg/stricli/blob/ce1268b6b86eb7d136dd0be5b9fa525173d43b19/packages/core/src/text.ts#L122) *** ##### headers[​](#headers "Direct link to headers") > `readonly` **headers**: [`DocumentationHeaders`](/stricli/packages/core/interfaces/DocumentationHeaders.md) Section header strings used to build help text. ###### Inherited from[​](#inherited-from-9 "Direct link to Inherited from") `DocumentationText.headers` ###### Defined in[​](#defined-in-10 "Direct link to Defined in") [packages/core/src/text.ts:105](https://github.com/bloomberg/stricli/blob/ce1268b6b86eb7d136dd0be5b9fa525173d43b19/packages/core/src/text.ts#L105) *** ##### keywords[​](#keywords "Direct link to keywords") > `readonly` **keywords**: [`DocumentationKeywords`](/stricli/packages/core/interfaces/DocumentationKeywords.md) Keyword strings used to build help text. ###### Inherited from[​](#inherited-from-10 "Direct link to Inherited from") `DocumentationText.keywords` ###### Defined in[​](#defined-in-11 "Direct link to Defined in") [packages/core/src/text.ts:101](https://github.com/bloomberg/stricli/blob/ce1268b6b86eb7d136dd0be5b9fa525173d43b19/packages/core/src/text.ts#L101) *** ##### noCommandRegisteredForInput()[​](#nocommandregisteredforinput "Direct link to noCommandRegisteredForInput()") > `readonly` **noCommandRegisteredForInput**: (`args`) => `string` Formatted error message for the case where the supplied command line inputs do not resolve to a registered command. Supplied with arguments for the argument in question, and several possible corrections based on registered commands. If `ansiColor` is true, this string can use ANSI terminal codes. Codes may have already been applied so be aware you may have to reset to achieve the desired output. ###### Parameters[​](#parameters-9 "Direct link to Parameters") • **args** • **args.ansiColor**: `boolean` • **args.corrections**: readonly `string`\[] • **args.input**: `string` ###### Returns[​](#returns-9 "Direct link to Returns") `string` ###### Inherited from[​](#inherited-from-11 "Direct link to Inherited from") [`ApplicationErrorFormatting`](/stricli/packages/core/interfaces/ApplicationErrorFormatting.md).[`noCommandRegisteredForInput`](/stricli/packages/core/interfaces/ApplicationErrorFormatting.md#nocommandregisteredforinput) ###### Defined in[​](#defined-in-12 "Direct link to Defined in") [packages/core/src/text.ts:193](https://github.com/bloomberg/stricli/blob/ce1268b6b86eb7d136dd0be5b9fa525173d43b19/packages/core/src/text.ts#L193) *** ##### noTextAvailableForLocale()[​](#notextavailableforlocale "Direct link to noTextAvailableForLocale()") > `readonly` **noTextAvailableForLocale**: (`args`) => `string` Formatted error message for the case where the application does not provide text for the current requested locale. Should indicate that the default locale will be used instead. If `ansiColor` is true, this string can use ANSI terminal codes. Codes may have already been applied so be aware you may have to reset to achieve the desired output. ###### Parameters[​](#parameters-10 "Direct link to Parameters") • **args** • **args.ansiColor**: `boolean` • **args.defaultLocale**: `string` • **args.requestedLocale**: `string` ###### Returns[​](#returns-10 "Direct link to Returns") `string` ###### Inherited from[​](#inherited-from-12 "Direct link to Inherited from") [`ApplicationErrorFormatting`](/stricli/packages/core/interfaces/ApplicationErrorFormatting.md).[`noTextAvailableForLocale`](/stricli/packages/core/interfaces/ApplicationErrorFormatting.md#notextavailableforlocale) ###### Defined in[​](#defined-in-13 "Direct link to Defined in") [packages/core/src/text.ts:205](https://github.com/bloomberg/stricli/blob/ce1268b6b86eb7d136dd0be5b9fa525173d43b19/packages/core/src/text.ts#L205) --- ### Interface: Command Parsed and validated command instance. #### Extends[​](#extends "Direct link to Extends") * `DocumentedTarget` #### Type Parameters[​](#type-parameters "Direct link to Type Parameters") • **CONTEXT** *extends* [`CommandContext`](/stricli/packages/core/interfaces/CommandContext.md) #### Properties[​](#properties "Direct link to Properties") ##### brief[​](#brief "Direct link to brief") > `readonly` **brief**: `string` ###### Inherited from[​](#inherited-from "Direct link to Inherited from") `DocumentedTarget.brief` ###### Defined in[​](#defined-in "Direct link to Defined in") [packages/core/src/routing/types.ts:19](https://github.com/bloomberg/stricli/blob/ce1268b6b86eb7d136dd0be5b9fa525173d43b19/packages/core/src/routing/types.ts#L19) *** ##### formatHelp()[​](#formathelp "Direct link to formatHelp()") > `readonly` **formatHelp**: (`args`) => `string` ###### Parameters[​](#parameters "Direct link to Parameters") • **args**: `HelpFormattingArguments` ###### Returns[​](#returns "Direct link to Returns") `string` ###### Inherited from[​](#inherited-from-1 "Direct link to Inherited from") `DocumentedTarget.formatHelp` ###### Defined in[​](#defined-in-1 "Direct link to Defined in") [packages/core/src/routing/types.ts:22](https://github.com/bloomberg/stricli/blob/ce1268b6b86eb7d136dd0be5b9fa525173d43b19/packages/core/src/routing/types.ts#L22) *** ##### formatUsageLine()[​](#formatusageline "Direct link to formatUsageLine()") > `readonly` **formatUsageLine**: (`args`) => `string` ###### Parameters[​](#parameters-1 "Direct link to Parameters") • **args**: `UsageFormattingArguments` ###### Returns[​](#returns-1 "Direct link to Returns") `string` ###### Inherited from[​](#inherited-from-2 "Direct link to Inherited from") `DocumentedTarget.formatUsageLine` ###### Defined in[​](#defined-in-2 "Direct link to Defined in") [packages/core/src/routing/types.ts:21](https://github.com/bloomberg/stricli/blob/ce1268b6b86eb7d136dd0be5b9fa525173d43b19/packages/core/src/routing/types.ts#L21) *** ##### fullDescription[​](#fulldescription "Direct link to fullDescription") > `readonly` **fullDescription**: `undefined` | `string` ###### Inherited from[​](#inherited-from-3 "Direct link to Inherited from") `DocumentedTarget.fullDescription` ###### Defined in[​](#defined-in-3 "Direct link to Defined in") [packages/core/src/routing/types.ts:20](https://github.com/bloomberg/stricli/blob/ce1268b6b86eb7d136dd0be5b9fa525173d43b19/packages/core/src/routing/types.ts#L20) *** ##### kind[​](#kind "Direct link to kind") > `readonly` **kind**: *typeof* `CommandSymbol` ###### Defined in[​](#defined-in-4 "Direct link to Defined in") [packages/core/src/routing/command/types.ts:48](https://github.com/bloomberg/stricli/blob/ce1268b6b86eb7d136dd0be5b9fa525173d43b19/packages/core/src/routing/command/types.ts#L48) *** ##### loader[​](#loader "Direct link to loader") > `readonly` **loader**: [`CommandFunctionLoader`](/stricli/packages/core/type-aliases/CommandFunctionLoader.md)<`Readonly`<`Record`<`string`, `unknown`>>, [`BaseArgs`](/stricli/packages/core/type-aliases/BaseArgs.md), `CONTEXT`> ###### Defined in[​](#defined-in-5 "Direct link to Defined in") [packages/core/src/routing/command/types.ts:49](https://github.com/bloomberg/stricli/blob/ce1268b6b86eb7d136dd0be5b9fa525173d43b19/packages/core/src/routing/command/types.ts#L49) *** ##### parameters[​](#parameters-2 "Direct link to parameters") > `readonly` **parameters**: `CommandParameters` ###### Defined in[​](#defined-in-6 "Direct link to Defined in") [packages/core/src/routing/command/types.ts:50](https://github.com/bloomberg/stricli/blob/ce1268b6b86eb7d136dd0be5b9fa525173d43b19/packages/core/src/routing/command/types.ts#L50) *** ##### usesFlag()[​](#usesflag "Direct link to usesFlag()") > `readonly` **usesFlag**: (`flagName`, `caseStyle`) => `boolean` ###### Parameters[​](#parameters-3 "Direct link to Parameters") • **flagName**: `string` • **caseStyle**: [`ScannerCaseStyle`](/stricli/packages/core/type-aliases/ScannerCaseStyle.md) ###### Returns[​](#returns-2 "Direct link to Returns") `boolean` ###### Defined in[​](#defined-in-7 "Direct link to Defined in") [packages/core/src/routing/command/types.ts:51](https://github.com/bloomberg/stricli/blob/ce1268b6b86eb7d136dd0be5b9fa525173d43b19/packages/core/src/routing/command/types.ts#L51) --- ### Interface: CommandContext Command-level context that provides necessary process information and is available to all command runs. This type should be extended to include context specific to your command implementations. #### Extended by[​](#extended-by "Direct link to Extended by") * [`ApplicationContext`](/stricli/packages/core/interfaces/ApplicationContext.md) #### Properties[​](#properties "Direct link to Properties") ##### process[​](#process "Direct link to process") > `readonly` **process**: `WritableStreams` ###### Defined in[​](#defined-in "Direct link to Defined in") [packages/core/src/context.ts:39](https://github.com/bloomberg/stricli/blob/ce1268b6b86eb7d136dd0be5b9fa525173d43b19/packages/core/src/context.ts#L39) --- ### Interface: CommandModule A command module exposes the target function as the default export. #### Type Parameters[​](#type-parameters "Direct link to Type Parameters") • **FLAGS** *extends* [`BaseFlags`](/stricli/packages/core/type-aliases/BaseFlags.md) • **ARGS** *extends* [`BaseArgs`](/stricli/packages/core/type-aliases/BaseArgs.md) • **CONTEXT** *extends* [`CommandContext`](/stricli/packages/core/interfaces/CommandContext.md) #### Properties[​](#properties "Direct link to Properties") ##### default[​](#default "Direct link to default") > `readonly` **default**: [`CommandFunction`](/stricli/packages/core/type-aliases/CommandFunction.md)<`FLAGS`, `ARGS`, `CONTEXT`> ###### Defined in[​](#defined-in "Direct link to Defined in") [packages/core/src/routing/command/types.ts:30](https://github.com/bloomberg/stricli/blob/ce1268b6b86eb7d136dd0be5b9fa525173d43b19/packages/core/src/routing/command/types.ts#L30) --- ### Interface: CompletionConfiguration Configuration for controlling the behavior of completion proposals. #### Properties[​](#properties "Direct link to Properties") ##### includeAliases[​](#includealiases "Direct link to includeAliases") > `readonly` **includeAliases**: `boolean` This flag controls whether or not to include aliases of routes and flags. Defaults to match value of [DocumentationConfiguration.useAliasInUsageLine](/stricli/packages/core/interfaces/DocumentationConfiguration.md#usealiasinusageline). ###### Defined in[​](#defined-in "Direct link to Defined in") [packages/core/src/config.ts:176](https://github.com/bloomberg/stricli/blob/ce1268b6b86eb7d136dd0be5b9fa525173d43b19/packages/core/src/config.ts#L176) *** ##### includeHiddenRoutes[​](#includehiddenroutes "Direct link to includeHiddenRoutes") > `readonly` **includeHiddenRoutes**: `boolean` This flag controls whether or not to include hidden routes. Defaults to `false`. ###### Defined in[​](#defined-in-1 "Direct link to Defined in") [packages/core/src/config.ts:182](https://github.com/bloomberg/stricli/blob/ce1268b6b86eb7d136dd0be5b9fa525173d43b19/packages/core/src/config.ts#L182) --- ### Interface: DocumentationBriefs Short documentation brief strings used to build help text. #### Properties[​](#properties "Direct link to Properties") ##### argumentEscapeSequence[​](#argumentescapesequence "Direct link to argumentEscapeSequence") > `readonly` **argumentEscapeSequence**: `string` Documentation brief to be included alongside `--` escape sequence in help text. Only present when `scanner.allowArgumentEscapeSequence` is `true`. Defaults to `"All subsequent inputs should be interpreted as arguments"`. ###### Defined in[​](#defined-in "Direct link to Defined in") [packages/core/src/text.ts:91](https://github.com/bloomberg/stricli/blob/ce1268b6b86eb7d136dd0be5b9fa525173d43b19/packages/core/src/text.ts#L91) *** ##### help[​](#help "Direct link to help") > `readonly` **help**: `string` Documentation brief to be included alongside `--help` flag in help text. Defaults to `"Print help information and exit"`. ###### Defined in[​](#defined-in-1 "Direct link to Defined in") [packages/core/src/text.ts:72](https://github.com/bloomberg/stricli/blob/ce1268b6b86eb7d136dd0be5b9fa525173d43b19/packages/core/src/text.ts#L72) *** ##### helpAll[​](#helpall "Direct link to helpAll") > `readonly` **helpAll**: `string` Documentation brief to be included alongside `--helpAll` flag in help text. Defaults to `"Print help information (including hidden commands/flags) and exit"`. ###### Defined in[​](#defined-in-2 "Direct link to Defined in") [packages/core/src/text.ts:78](https://github.com/bloomberg/stricli/blob/ce1268b6b86eb7d136dd0be5b9fa525173d43b19/packages/core/src/text.ts#L78) *** ##### version[​](#version "Direct link to version") > `readonly` **version**: `string` Documentation brief to be included alongside `--version` flag in help text. Defaults to `"Print version information and exit"`. ###### Defined in[​](#defined-in-3 "Direct link to Defined in") [packages/core/src/text.ts:84](https://github.com/bloomberg/stricli/blob/ce1268b6b86eb7d136dd0be5b9fa525173d43b19/packages/core/src/text.ts#L84) --- ### Interface: DocumentationConfiguration Configuration for controlling the content of the printed documentation. #### Properties[​](#properties "Direct link to Properties") ##### ~~alwaysShowHelpAllFlag~~[​](#alwaysshowhelpallflag "Direct link to alwaysshowhelpallflag") > `readonly` **alwaysShowHelpAllFlag**: `boolean` In addition to the `--help` flag, there is a `--helpAll`/`--help-all` flag that shows all documentation including entries for hidden commands/arguments. The `--helpAll` flag cannot be functionally disabled, but it is hidden when listing the built-in flags by default. Setting this option to `true` forces the output to always include this flag in the list of built-in flags. Defaults to `false`. ###### Deprecated[​](#deprecated "Direct link to Deprecated") Use the [help](/stricli/packages/core/functions/help.md) integration directly instead, which provides more control over the behavior of the help flag. ###### Defined in[​](#defined-in "Direct link to Defined in") [packages/core/src/config.ts:157](https://github.com/bloomberg/stricli/blob/ce1268b6b86eb7d136dd0be5b9fa525173d43b19/packages/core/src/config.ts#L157) *** ##### ~~caseStyle~~[​](#casestyle "Direct link to casestyle") > `readonly` **caseStyle**: [`DisplayCaseStyle`](/stricli/packages/core/type-aliases/DisplayCaseStyle.md) Case style configuration for displaying route and flag names. Cannot be `convert-camel-to-kebab` if [ScannerConfiguration.caseStyle](/stricli/packages/core/interfaces/ScannerConfiguration.md#casestyle) is `original`. Default value is derived from value for [ScannerConfiguration.caseStyle](/stricli/packages/core/interfaces/ScannerConfiguration.md#casestyle): * Defaults to `original` for `original`. * Defaults to `convert-camel-to-kebab` for `allow-kebab-for-camel`. ###### Deprecated[​](#deprecated-1 "Direct link to Deprecated") Specify [FormattingConfiguration.caseStyle](/stricli/packages/core/interfaces/FormattingConfiguration.md#casestyle) via the [help](/stricli/packages/core/functions/help.md) integration instead. ###### Defined in[​](#defined-in-1 "Direct link to Defined in") [packages/core/src/config.ts:147](https://github.com/bloomberg/stricli/blob/ce1268b6b86eb7d136dd0be5b9fa525173d43b19/packages/core/src/config.ts#L147) *** ##### disableAnsiColor[​](#disableansicolor "Direct link to disableAnsiColor") > `readonly` **disableAnsiColor**: `boolean` By default, if the color depth of the stdout stream is greater than 4, ANSI terminal colors will be used. If this value is `true`, disables all ANSI terminal color output. Defaults to `false`. ###### Defined in[​](#defined-in-2 "Direct link to Defined in") [packages/core/src/config.ts:164](https://github.com/bloomberg/stricli/blob/ce1268b6b86eb7d136dd0be5b9fa525173d43b19/packages/core/src/config.ts#L164) *** ##### ~~onlyRequiredInUsageLine~~[​](#onlyrequiredinusageline "Direct link to onlyrequiredinusageline") > `readonly` **onlyRequiredInUsageLine**: `boolean` Controls whether or not to include optional flags and positional parameters in the usage line. If enabled, all parameters that are optional at runtime (including parameters with defaults) will be hidden. Defaults to `false`. ###### Deprecated[​](#deprecated-2 "Direct link to Deprecated") Specify [FormattingConfiguration.onlyRequiredInUsageLine](/stricli/packages/core/interfaces/FormattingConfiguration.md#onlyrequiredinusageline) via the [help](/stricli/packages/core/functions/help.md) integration instead. ###### Defined in[​](#defined-in-3 "Direct link to Defined in") [packages/core/src/config.ts:136](https://github.com/bloomberg/stricli/blob/ce1268b6b86eb7d136dd0be5b9fa525173d43b19/packages/core/src/config.ts#L136) *** ##### ~~useAliasInUsageLine~~[​](#usealiasinusageline "Direct link to usealiasinusageline") > `readonly` **useAliasInUsageLine**: `boolean` Controls whether or not to include alias of flags in the usage line. Only replaces name with alias when a single alias exists. Defaults to `false`. ###### Deprecated[​](#deprecated-3 "Direct link to Deprecated") Specify [FormattingConfiguration.useAliasInUsageLine](/stricli/packages/core/interfaces/FormattingConfiguration.md#usealiasinusageline) via the [help](/stricli/packages/core/functions/help.md) integration instead. ###### Defined in[​](#defined-in-4 "Direct link to Defined in") [packages/core/src/config.ts:128](https://github.com/bloomberg/stricli/blob/ce1268b6b86eb7d136dd0be5b9fa525173d43b19/packages/core/src/config.ts#L128) --- ### Interface: DocumentationHeaders Section header strings used to build help text. #### Properties[​](#properties "Direct link to Properties") ##### aliases[​](#aliases "Direct link to aliases") > `readonly` **aliases**: `string` Header for help text section that lists all aliases for the route. Defaults to `"ALIASES"`. ###### Defined in[​](#defined-in "Direct link to Defined in") [packages/core/src/text.ts:42](https://github.com/bloomberg/stricli/blob/ce1268b6b86eb7d136dd0be5b9fa525173d43b19/packages/core/src/text.ts#L42) *** ##### arguments[​](#arguments "Direct link to arguments") > `readonly` **arguments**: `string` Header for help text section that lists all arguments accepted by the command. Defaults to `"ARGUMENTS"`. ###### Defined in[​](#defined-in-1 "Direct link to Defined in") [packages/core/src/text.ts:60](https://github.com/bloomberg/stricli/blob/ce1268b6b86eb7d136dd0be5b9fa525173d43b19/packages/core/src/text.ts#L60) *** ##### commands[​](#commands "Direct link to commands") > `readonly` **commands**: `string` Header for help text section that lists all commands in a route map. Defaults to `"COMMANDS"`. ###### Defined in[​](#defined-in-2 "Direct link to Defined in") [packages/core/src/text.ts:48](https://github.com/bloomberg/stricli/blob/ce1268b6b86eb7d136dd0be5b9fa525173d43b19/packages/core/src/text.ts#L48) *** ##### flags[​](#flags "Direct link to flags") > `readonly` **flags**: `string` Header for help text section that lists all flags accepted by the route. Defaults to `"FLAGS"`. ###### Defined in[​](#defined-in-3 "Direct link to Defined in") [packages/core/src/text.ts:54](https://github.com/bloomberg/stricli/blob/ce1268b6b86eb7d136dd0be5b9fa525173d43b19/packages/core/src/text.ts#L54) *** ##### usage[​](#usage "Direct link to usage") > `readonly` **usage**: `string` Header for help text section that lists all usage lines. Defaults to `"USAGE"`. ###### Defined in[​](#defined-in-4 "Direct link to Defined in") [packages/core/src/text.ts:36](https://github.com/bloomberg/stricli/blob/ce1268b6b86eb7d136dd0be5b9fa525173d43b19/packages/core/src/text.ts#L36) --- ### Interface: DocumentationKeywords Keyword strings used to build help text. #### Properties[​](#properties "Direct link to Properties") ##### default[​](#default "Direct link to default") > `readonly` **default**: `string` Keyword to be included when flags or arguments have a default value. Defaults to `"default ="`. ###### Defined in[​](#defined-in "Direct link to Defined in") [packages/core/src/text.ts:18](https://github.com/bloomberg/stricli/blob/ce1268b6b86eb7d136dd0be5b9fa525173d43b19/packages/core/src/text.ts#L18) *** ##### separator[​](#separator "Direct link to separator") > `readonly` **separator**: `string` Keyword to be included when flags are variadic and have a defined separator. Defaults to `"separator ="`. ###### Defined in[​](#defined-in-1 "Direct link to Defined in") [packages/core/src/text.ts:24](https://github.com/bloomberg/stricli/blob/ce1268b6b86eb7d136dd0be5b9fa525173d43b19/packages/core/src/text.ts#L24) --- ### Interface: FormattingConfiguration Configuration for controlling how printed documentation is formatted. #### Properties[​](#properties "Direct link to Properties") ##### caseStyle[​](#casestyle "Direct link to caseStyle") > `readonly` **caseStyle**: [`DisplayCaseStyle`](/stricli/packages/core/type-aliases/DisplayCaseStyle.md) Case style configuration for displaying route and flag names. Cannot be `convert-camel-to-kebab` if [ScannerConfiguration.caseStyle](/stricli/packages/core/interfaces/ScannerConfiguration.md#casestyle) is `original`. ###### Defined in[​](#defined-in "Direct link to Defined in") [packages/core/src/parameter/formatting.ts:29](https://github.com/bloomberg/stricli/blob/ce1268b6b86eb7d136dd0be5b9fa525173d43b19/packages/core/src/parameter/formatting.ts#L29) *** ##### onlyRequiredInUsageLine[​](#onlyrequiredinusageline "Direct link to onlyRequiredInUsageLine") > `readonly` **onlyRequiredInUsageLine**: `boolean` Controls whether or not to include optional flags and positional parameters in the usage line. If enabled, all parameters that are optional at runtime (including parameters with defaults) will be hidden. ###### Defined in[​](#defined-in-1 "Direct link to Defined in") [packages/core/src/parameter/formatting.ts:24](https://github.com/bloomberg/stricli/blob/ce1268b6b86eb7d136dd0be5b9fa525173d43b19/packages/core/src/parameter/formatting.ts#L24) *** ##### useAliasInUsageLine[​](#usealiasinusageline "Direct link to useAliasInUsageLine") > `readonly` **useAliasInUsageLine**: `boolean` Controls whether or not to include alias of flags in the usage line. Only replaces name with alias when a single alias exists. ###### Defined in[​](#defined-in-2 "Direct link to Defined in") [packages/core/src/parameter/formatting.ts:19](https://github.com/bloomberg/stricli/blob/ce1268b6b86eb7d136dd0be5b9fa525173d43b19/packages/core/src/parameter/formatting.ts#L19) --- ### Interface: RouteMap Route map that stores multiple routes. #### Extends[​](#extends "Direct link to Extends") * `DocumentedTarget` #### Type Parameters[​](#type-parameters "Direct link to Type Parameters") • **CONTEXT** *extends* [`CommandContext`](/stricli/packages/core/interfaces/CommandContext.md) #### Properties[​](#properties "Direct link to Properties") ##### brief[​](#brief "Direct link to brief") > `readonly` **brief**: `string` ###### Inherited from[​](#inherited-from "Direct link to Inherited from") `DocumentedTarget.brief` ###### Defined in[​](#defined-in "Direct link to Defined in") [packages/core/src/routing/types.ts:19](https://github.com/bloomberg/stricli/blob/ce1268b6b86eb7d136dd0be5b9fa525173d43b19/packages/core/src/routing/types.ts#L19) *** ##### formatHelp()[​](#formathelp "Direct link to formatHelp()") > `readonly` **formatHelp**: (`args`) => `string` ###### Parameters[​](#parameters "Direct link to Parameters") • **args**: `HelpFormattingArguments` ###### Returns[​](#returns "Direct link to Returns") `string` ###### Inherited from[​](#inherited-from-1 "Direct link to Inherited from") `DocumentedTarget.formatHelp` ###### Defined in[​](#defined-in-1 "Direct link to Defined in") [packages/core/src/routing/types.ts:22](https://github.com/bloomberg/stricli/blob/ce1268b6b86eb7d136dd0be5b9fa525173d43b19/packages/core/src/routing/types.ts#L22) *** ##### formatUsageLine()[​](#formatusageline "Direct link to formatUsageLine()") > `readonly` **formatUsageLine**: (`args`) => `string` ###### Parameters[​](#parameters-1 "Direct link to Parameters") • **args**: `UsageFormattingArguments` ###### Returns[​](#returns-1 "Direct link to Returns") `string` ###### Inherited from[​](#inherited-from-2 "Direct link to Inherited from") `DocumentedTarget.formatUsageLine` ###### Defined in[​](#defined-in-2 "Direct link to Defined in") [packages/core/src/routing/types.ts:21](https://github.com/bloomberg/stricli/blob/ce1268b6b86eb7d136dd0be5b9fa525173d43b19/packages/core/src/routing/types.ts#L21) *** ##### fullDescription[​](#fulldescription "Direct link to fullDescription") > `readonly` **fullDescription**: `undefined` | `string` ###### Inherited from[​](#inherited-from-3 "Direct link to Inherited from") `DocumentedTarget.fullDescription` ###### Defined in[​](#defined-in-3 "Direct link to Defined in") [packages/core/src/routing/types.ts:20](https://github.com/bloomberg/stricli/blob/ce1268b6b86eb7d136dd0be5b9fa525173d43b19/packages/core/src/routing/types.ts#L20) *** ##### getAllEntries()[​](#getallentries "Direct link to getAllEntries()") > `readonly` **getAllEntries**: () => readonly `RouteMapEntry`<`CONTEXT`>\[] ###### Returns[​](#returns-2 "Direct link to Returns") readonly `RouteMapEntry`<`CONTEXT`>\[] ###### Defined in[​](#defined-in-4 "Direct link to Defined in") [packages/core/src/routing/route-map/types.ts:28](https://github.com/bloomberg/stricli/blob/ce1268b6b86eb7d136dd0be5b9fa525173d43b19/packages/core/src/routing/route-map/types.ts#L28) *** ##### getDefaultCommand()[​](#getdefaultcommand "Direct link to getDefaultCommand()") > `readonly` **getDefaultCommand**: () => `undefined` | [`Command`](/stricli/packages/core/interfaces/Command.md)<`CONTEXT`> ###### Returns[​](#returns-3 "Direct link to Returns") `undefined` | [`Command`](/stricli/packages/core/interfaces/Command.md)<`CONTEXT`> ###### Defined in[​](#defined-in-5 "Direct link to Defined in") [packages/core/src/routing/route-map/types.ts:23](https://github.com/bloomberg/stricli/blob/ce1268b6b86eb7d136dd0be5b9fa525173d43b19/packages/core/src/routing/route-map/types.ts#L23) *** ##### getOtherAliasesForInput()[​](#getotheraliasesforinput "Direct link to getOtherAliasesForInput()") > `readonly` **getOtherAliasesForInput**: (`input`, `caseStyle`) => `Readonly`<`Record`<[`DisplayCaseStyle`](/stricli/packages/core/type-aliases/DisplayCaseStyle.md), readonly `string`\[]>> ###### Parameters[​](#parameters-2 "Direct link to Parameters") • **input**: `string` • **caseStyle**: [`ScannerCaseStyle`](/stricli/packages/core/type-aliases/ScannerCaseStyle.md) ###### Returns[​](#returns-4 "Direct link to Returns") `Readonly`<`Record`<[`DisplayCaseStyle`](/stricli/packages/core/type-aliases/DisplayCaseStyle.md), readonly `string`\[]>> ###### Defined in[​](#defined-in-6 "Direct link to Defined in") [packages/core/src/routing/route-map/types.ts:24](https://github.com/bloomberg/stricli/blob/ce1268b6b86eb7d136dd0be5b9fa525173d43b19/packages/core/src/routing/route-map/types.ts#L24) *** ##### getRoutingTargetForInput()[​](#getroutingtargetforinput "Direct link to getRoutingTargetForInput()") > `readonly` **getRoutingTargetForInput**: (`input`) => `undefined` | `RoutingTarget`<`CONTEXT`> ###### Parameters[​](#parameters-3 "Direct link to Parameters") • **input**: `string` ###### Returns[​](#returns-5 "Direct link to Returns") `undefined` | `RoutingTarget`<`CONTEXT`> ###### Defined in[​](#defined-in-7 "Direct link to Defined in") [packages/core/src/routing/route-map/types.ts:22](https://github.com/bloomberg/stricli/blob/ce1268b6b86eb7d136dd0be5b9fa525173d43b19/packages/core/src/routing/route-map/types.ts#L22) *** ##### kind[​](#kind "Direct link to kind") > `readonly` **kind**: *typeof* `RouteMapSymbol` ###### Defined in[​](#defined-in-8 "Direct link to Defined in") [packages/core/src/routing/route-map/types.ts:21](https://github.com/bloomberg/stricli/blob/ce1268b6b86eb7d136dd0be5b9fa525173d43b19/packages/core/src/routing/route-map/types.ts#L21) --- ### Interface: RouteMapBuilderArguments #### Type Parameters[​](#type-parameters "Direct link to Type Parameters") • **R** *extends* `string` • **CONTEXT** *extends* [`CommandContext`](/stricli/packages/core/interfaces/CommandContext.md) #### Properties[​](#properties "Direct link to Properties") ##### aliases?[​](#aliases "Direct link to aliases?") > `readonly` `optional` **aliases**: `Readonly`<`Record`<`Exclude`<`string`, `R`>, `R`>> If specified, aliases can be used instead of the original route name to resolve to a given route. ###### Defined in[​](#defined-in "Direct link to Defined in") [packages/core/src/routing/route-map/builder.ts:39](https://github.com/bloomberg/stricli/blob/ce1268b6b86eb7d136dd0be5b9fa525173d43b19/packages/core/src/routing/route-map/builder.ts#L39) *** ##### defaultCommand?[​](#defaultcommand "Direct link to defaultCommand?") > `readonly` `optional` **defaultCommand**: `NoInfer`<`R`> When the command line inputs navigate directly to a route map, the default behavior is to print the help text. If this value is present, the command at the specified route will be run instead. This means that otherwise invalid routes will not throw an error and will be considered as arguments/flags to that command. The type checking for this property requires it must be a valid route, but it does not type check that this route points to a command. If this value is a route for a route map instead of a command, that is invalid and `buildRouteMap` will throw an error. ###### Defined in[​](#defined-in-1 "Direct link to Defined in") [packages/core/src/routing/route-map/builder.ts:31](https://github.com/bloomberg/stricli/blob/ce1268b6b86eb7d136dd0be5b9fa525173d43b19/packages/core/src/routing/route-map/builder.ts#L31) *** ##### docs[​](#docs "Direct link to docs") > `readonly` **docs**: `RouteMapDocumentation`<`R`> Help documentation for route map. ###### Defined in[​](#defined-in-2 "Direct link to Defined in") [packages/core/src/routing/route-map/builder.ts:35](https://github.com/bloomberg/stricli/blob/ce1268b6b86eb7d136dd0be5b9fa525173d43b19/packages/core/src/routing/route-map/builder.ts#L35) *** ##### routes[​](#routes "Direct link to routes") > `readonly` **routes**: `Readonly`<`Record`<`R`, `RoutingTarget`<`CONTEXT`>>> Mapping of names to routing targets (commands or other route maps). Must contain at least one route to be a valid route map. ###### Defined in[​](#defined-in-3 "Direct link to Defined in") [packages/core/src/routing/route-map/builder.ts:21](https://github.com/bloomberg/stricli/blob/ce1268b6b86eb7d136dd0be5b9fa525173d43b19/packages/core/src/routing/route-map/builder.ts#L21) --- ### Interface: ScannerConfiguration Configuration for controlling the behavior of the command and argument scanners. #### Properties[​](#properties "Direct link to Properties") ##### allowArgumentEscapeSequence[​](#allowargumentescapesequence "Direct link to allowArgumentEscapeSequence") > `readonly` **allowArgumentEscapeSequence**: `boolean` If true, when scanning inputs for a command will treat `--` as an escape sequence. This will force the scanner to treat all remaining inputs as arguments. Example for `false` ```shell $ cli --foo -- --bar # { foo: true, bar: true }, ["--"] ``` Example for `true` ```shell $ cli --foo -- --bar # { foo: true }, ["--bar"] ``` Default value is `false` ###### Defined in[​](#defined-in "Direct link to Defined in") [packages/core/src/config.ts:74](https://github.com/bloomberg/stricli/blob/ce1268b6b86eb7d136dd0be5b9fa525173d43b19/packages/core/src/config.ts#L74) *** ##### caseStyle[​](#casestyle "Direct link to caseStyle") > `readonly` **caseStyle**: [`ScannerCaseStyle`](/stricli/packages/core/type-aliases/ScannerCaseStyle.md) Case style configuration for scanning route and flag names. Default value is `original` ###### Defined in[​](#defined-in-1 "Direct link to Defined in") [packages/core/src/config.ts:55](https://github.com/bloomberg/stricli/blob/ce1268b6b86eb7d136dd0be5b9fa525173d43b19/packages/core/src/config.ts#L55) *** ##### distanceOptions[​](#distanceoptions "Direct link to distanceOptions") > `readonly` **distanceOptions**: `DamerauLevenshteinOptions` Options used when calculating distance for alternative inputs ("did you mean?"). Default value is equivalent to the empirically determined values used by git: ```json { "threshold": 7, "weights": { "insertion": 1, "deletion": 3, "substitution": 2, "transposition": 0 } } ``` ###### Defined in[​](#defined-in-2 "Direct link to Defined in") [packages/core/src/config.ts:91](https://github.com/bloomberg/stricli/blob/ce1268b6b86eb7d136dd0be5b9fa525173d43b19/packages/core/src/config.ts#L91) --- ### Interface: StricliProcess Simple interface that mirrors NodeJS.Process but only requires the minimum API required by Stricli. #### Extends[​](#extends "Direct link to Extends") * `WritableStreams` #### Properties[​](#properties "Direct link to Properties") ##### env?[​](#env "Direct link to env?") > `readonly` `optional` **env**: `Readonly`<`Partial`<`Record`<`string`, `string`>>> Object that stores all available environment variables. ###### See[​](#see "Direct link to See") [EnvironmentVariableName](/stricli/packages/core/type-aliases/EnvironmentVariableName.md) for variable names used by Stricli. ###### Defined in[​](#defined-in "Direct link to Defined in") [packages/core/src/context.ts:51](https://github.com/bloomberg/stricli/blob/ce1268b6b86eb7d136dd0be5b9fa525173d43b19/packages/core/src/context.ts#L51) *** ##### exitCode?[​](#exitcode "Direct link to exitCode?") > `optional` **exitCode**: `null` | `string` | `number` A number which will be the process exit code. ###### Defined in[​](#defined-in-1 "Direct link to Defined in") [packages/core/src/context.ts:55](https://github.com/bloomberg/stricli/blob/ce1268b6b86eb7d136dd0be5b9fa525173d43b19/packages/core/src/context.ts#L55) *** ##### stderr[​](#stderr "Direct link to stderr") > `readonly` **stderr**: `Writable` Contains a writable stream connected to stderr (fd 2). ###### Inherited from[​](#inherited-from "Direct link to Inherited from") `WritableStreams.stderr` ###### Defined in[​](#defined-in-2 "Direct link to Defined in") [packages/core/src/context.ts:31](https://github.com/bloomberg/stricli/blob/ce1268b6b86eb7d136dd0be5b9fa525173d43b19/packages/core/src/context.ts#L31) *** ##### stdout[​](#stdout "Direct link to stdout") > `readonly` **stdout**: `Writable` Contains a writable stream connected to stdout (fd 1). ###### Inherited from[​](#inherited-from-1 "Direct link to Inherited from") `WritableStreams.stdout` ###### Defined in[​](#defined-in-3 "Direct link to Defined in") [packages/core/src/context.ts:27](https://github.com/bloomberg/stricli/blob/ce1268b6b86eb7d136dd0be5b9fa525173d43b19/packages/core/src/context.ts#L27) --- ### Type Alias: Aliases > **Aliases**<`T`>: `Readonly`<`Partial`<`Record`<`AvailableAlias`, `T`>>> #### Type Parameters[​](#type-parameters "Direct link to Type Parameters") • **T** #### Defined in[​](#defined-in "Direct link to Defined in") [packages/core/src/parameter/types.ts:58](https://github.com/bloomberg/stricli/blob/ce1268b6b86eb7d136dd0be5b9fa525173d43b19/packages/core/src/parameter/types.ts#L58) --- ### Type Alias: ApplicationFlagFunction() > **ApplicationFlagFunction**<`CONTEXT`>: (`this`, `app`, `args`) => `void` | `Promise`<`void`> Function signature for an application flag that can be provided by an integration. #### Type Parameters[​](#type-parameters "Direct link to Type Parameters") • **CONTEXT** *extends* [`CommandContext`](/stricli/packages/core/interfaces/CommandContext.md) #### Parameters[​](#parameters "Direct link to Parameters") • **this**: [`ApplicationContext`](/stricli/packages/core/interfaces/ApplicationContext.md) • **app**: [`Application`](/stricli/packages/core/interfaces/Application.md)<`CONTEXT`> • **args**: `ApplicationFlagArguments`<`CONTEXT`> #### Returns[​](#returns "Direct link to Returns") `void` | `Promise`<`void`> #### Defined in[​](#defined-in "Direct link to Defined in") [packages/core/src/application/integration.ts:151](https://github.com/bloomberg/stricli/blob/ce1268b6b86eb7d136dd0be5b9fa525173d43b19/packages/core/src/application/integration.ts#L151) --- ### Type Alias: BaseArgs > **BaseArgs**: readonly `unknown`\[] Root constraint for all positional argument type parameters. This is used to ensure that positional parameters are always defined as an array or tuple. #### Defined in[​](#defined-in "Direct link to Defined in") [packages/core/src/parameter/positional/types.ts:67](https://github.com/bloomberg/stricli/blob/ce1268b6b86eb7d136dd0be5b9fa525173d43b19/packages/core/src/parameter/positional/types.ts#L67) --- ### Type Alias: BaseFlags > **BaseFlags**: `Readonly`<`Record`<`string`, `unknown`>> Root constraint for all flag type parameters. #### Defined in[​](#defined-in "Direct link to Defined in") [packages/core/src/parameter/types.ts:63](https://github.com/bloomberg/stricli/blob/ce1268b6b86eb7d136dd0be5b9fa525173d43b19/packages/core/src/parameter/types.ts#L63) --- ### Type Alias: CommandBuilderArguments > **CommandBuilderArguments**<`FLAGS`, `ARGS`, `CONTEXT`>: `LazyCommandBuilderArguments`<`FLAGS`, `ARGS`, `CONTEXT`> | `LocalCommandBuilderArguments`<`FLAGS`, `ARGS`, `CONTEXT`> #### Type Parameters[​](#type-parameters "Direct link to Type Parameters") • **FLAGS** *extends* [`BaseFlags`](/stricli/packages/core/type-aliases/BaseFlags.md) • **ARGS** *extends* [`BaseArgs`](/stricli/packages/core/type-aliases/BaseArgs.md) • **CONTEXT** *extends* [`CommandContext`](/stricli/packages/core/interfaces/CommandContext.md) #### Defined in[​](#defined-in "Direct link to Defined in") [packages/core/src/routing/command/builder.ts:38](https://github.com/bloomberg/stricli/blob/ce1268b6b86eb7d136dd0be5b9fa525173d43b19/packages/core/src/routing/command/builder.ts#L38) --- ### Type Alias: CommandFunction() > **CommandFunction**<`FLAGS`, `ARGS`, `CONTEXT`>: (`this`, `flags`, ...`args`) => `void` | `Error` | `Promise`<`void` | `Error`> All command functions are required to have a general signature: ```ts (flags: {...}, ...args: [...]) => void | Promise ``` * `args` should be an array/tuple of any length or type. * `flags` should be an object with any key-value pairs. The specific types of `args` and `flags` are customizable to the individual use case and will be used to determine the structure of the positional arguments and flags. #### Type Parameters[​](#type-parameters "Direct link to Type Parameters") • **FLAGS** *extends* [`BaseFlags`](/stricli/packages/core/type-aliases/BaseFlags.md) • **ARGS** *extends* [`BaseArgs`](/stricli/packages/core/type-aliases/BaseArgs.md) • **CONTEXT** *extends* [`CommandContext`](/stricli/packages/core/interfaces/CommandContext.md) #### Parameters[​](#parameters "Direct link to Parameters") • **this**: `CONTEXT` • **flags**: `FLAGS` • ...**args**: `ARGS` #### Returns[​](#returns "Direct link to Returns") `void` | `Error` | `Promise`<`void` | `Error`> #### Defined in[​](#defined-in "Direct link to Defined in") [packages/core/src/routing/command/types.ts:20](https://github.com/bloomberg/stricli/blob/ce1268b6b86eb7d136dd0be5b9fa525173d43b19/packages/core/src/routing/command/types.ts#L20) --- ### Type Alias: CommandFunctionLoader() > **CommandFunctionLoader**<`FLAGS`, `ARGS`, `CONTEXT`>: () => `Promise`<[`CommandModule`](/stricli/packages/core/interfaces/CommandModule.md)<`FLAGS`, `ARGS`, `CONTEXT`> | [`CommandFunction`](/stricli/packages/core/type-aliases/CommandFunction.md)<`FLAGS`, `ARGS`, `CONTEXT`>> Asynchronously loads a function or a module containing a function to be executed by a command. #### Type Parameters[​](#type-parameters "Direct link to Type Parameters") • **FLAGS** *extends* [`BaseFlags`](/stricli/packages/core/type-aliases/BaseFlags.md) • **ARGS** *extends* [`BaseArgs`](/stricli/packages/core/type-aliases/BaseArgs.md) • **CONTEXT** *extends* [`CommandContext`](/stricli/packages/core/interfaces/CommandContext.md) #### Returns[​](#returns "Direct link to Returns") `Promise`<[`CommandModule`](/stricli/packages/core/interfaces/CommandModule.md)<`FLAGS`, `ARGS`, `CONTEXT`> | [`CommandFunction`](/stricli/packages/core/type-aliases/CommandFunction.md)<`FLAGS`, `ARGS`, `CONTEXT`>> #### Defined in[​](#defined-in "Direct link to Defined in") [packages/core/src/routing/command/types.ts:36](https://github.com/bloomberg/stricli/blob/ce1268b6b86eb7d136dd0be5b9fa525173d43b19/packages/core/src/routing/command/types.ts#L36) --- ### Type Alias: CommandInfo > **CommandInfo**<`CONTEXT`>: `RouteScanResult`<`CONTEXT`> & `object` Contextual information about the current command. #### Type declaration[​](#type-declaration "Direct link to Type declaration") ##### target[​](#target "Direct link to target") > `readonly` **target**: [`Command`](/stricli/packages/core/interfaces/Command.md)<`CONTEXT`> The target that was found by the scanner for the given inputs. When provided as part of CommandInfo, this will always be a command. #### Type Parameters[​](#type-parameters "Direct link to Type Parameters") • **CONTEXT** *extends* [`CommandContext`](/stricli/packages/core/interfaces/CommandContext.md) = [`CommandContext`](/stricli/packages/core/interfaces/CommandContext.md) #### Defined in[​](#defined-in "Direct link to Defined in") [packages/core/src/context.ts:90](https://github.com/bloomberg/stricli/blob/ce1268b6b86eb7d136dd0be5b9fa525173d43b19/packages/core/src/context.ts#L90) --- ### Type Alias: DisplayCaseStyle > **DisplayCaseStyle**: `"original"` | `"convert-camel-to-kebab"` Case style configuration for displaying route and flag names in documentation text. Each value has the following behavior: * `original` - Displays the original names unchanged. * `convert-camel-to-kebab` - Converts all camelCase names to kebab-case in output. Only allowed if `scannerCaseStyle` is set to `allow-kebab-for-camel`. #### Defined in[​](#defined-in "Direct link to Defined in") [packages/core/src/config.ts:100](https://github.com/bloomberg/stricli/blob/ce1268b6b86eb7d136dd0be5b9fa525173d43b19/packages/core/src/config.ts#L100) --- ### Type Alias: DocumentedCommand > **DocumentedCommand**: readonly \[`string`, `string`] #### Defined in[​](#defined-in "Direct link to Defined in") [packages/core/src/application/documentation.ts:11](https://github.com/bloomberg/stricli/blob/ce1268b6b86eb7d136dd0be5b9fa525173d43b19/packages/core/src/application/documentation.ts#L11) --- ### Type Alias: EnvironmentVariableName > **EnvironmentVariableName**: `"STRICLI_SKIP_VERSION_CHECK"` | `"STRICLI_NO_COLOR"` Environment variable names used by Stricli. * `STRICLI_SKIP_VERSION_CHECK` - If specified and non-0, skips the latest version check. * `STRICLI_NO_COLOR` - If specified and non-0, disables ANSI terminal coloring. #### Defined in[​](#defined-in "Direct link to Defined in") [packages/core/src/context.ts:64](https://github.com/bloomberg/stricli/blob/ce1268b6b86eb7d136dd0be5b9fa525173d43b19/packages/core/src/context.ts#L64) --- ### Type Alias: FlagParametersForType > **FlagParametersForType**<`T`, `CONTEXT`>: `{ readonly [K in keyof T]-?: TypedFlagParameter }` Definition of flags for each named parameter. #### Type Parameters[​](#type-parameters "Direct link to Type Parameters") • **T** • **CONTEXT** *extends* [`CommandContext`](/stricli/packages/core/interfaces/CommandContext.md) = [`CommandContext`](/stricli/packages/core/interfaces/CommandContext.md) #### Defined in[​](#defined-in "Direct link to Defined in") [packages/core/src/parameter/flag/types.ts:383](https://github.com/bloomberg/stricli/blob/ce1268b6b86eb7d136dd0be5b9fa525173d43b19/packages/core/src/parameter/flag/types.ts#L383) --- ### Type Alias: HelpIntegrationConfiguration > **HelpIntegrationConfiguration**: `Omit`<`ApplicationFlag`<[`CommandContext`](/stricli/packages/core/interfaces/CommandContext.md)>, `"name"` | `"aliases"` | `"global"` | `"run"`> & `object` Options for customizing the behavior of the `help` integration. #### Type declaration[​](#type-declaration "Direct link to Type declaration") ##### alias?[​](#alias "Direct link to alias?") > `readonly` `optional` **alias**: `AvailableAlias` | `false` Single-character shorthand alias for this flag, defaults to `h` if not provided. Set to `false` to disable the alias entirely. ##### formatting[​](#formatting "Direct link to formatting") > `readonly` **formatting**: [`FormattingConfiguration`](/stricli/packages/core/interfaces/FormattingConfiguration.md) Configuration for controlling how printed documentation is formatted. ##### includeHidden?[​](#includehidden "Direct link to includeHidden?") > `readonly` `optional` **includeHidden**: `boolean` When printing help text, if this flag is set to `true`, hidden flags and routes will be included in the output. Defaults to `false`. #### Defined in[​](#defined-in "Direct link to Defined in") [packages/core/src/application/integrations/help.ts:12](https://github.com/bloomberg/stricli/blob/ce1268b6b86eb7d136dd0be5b9fa525173d43b19/packages/core/src/application/integrations/help.ts#L12) --- ### Type Alias: InputCompletion > **InputCompletion**: `ArgumentCompletion` | `RoutingTargetCompletion` #### Defined in[​](#defined-in "Direct link to Defined in") [packages/core/src/application/propose-completions.ts:13](https://github.com/bloomberg/stricli/blob/ce1268b6b86eb7d136dd0be5b9fa525173d43b19/packages/core/src/application/propose-completions.ts#L13) --- ### Type Alias: InputParser() > **InputParser**<`T`, `CONTEXT`>: (`this`, `input`) => `T` | `Promise`<`T`> Generic function that synchronously or asynchronously parses a string to an arbitrary type. #### Type Parameters[​](#type-parameters "Direct link to Type Parameters") • **T** • **CONTEXT** *extends* [`CommandContext`](/stricli/packages/core/interfaces/CommandContext.md) = [`CommandContext`](/stricli/packages/core/interfaces/CommandContext.md) #### Parameters[​](#parameters "Direct link to Parameters") • **this**: `CONTEXT` • **input**: `string` #### Returns[​](#returns "Direct link to Returns") `T` | `Promise`<`T`> #### Defined in[​](#defined-in "Direct link to Defined in") [packages/core/src/parameter/types.ts:10](https://github.com/bloomberg/stricli/blob/ce1268b6b86eb7d136dd0be5b9fa525173d43b19/packages/core/src/parameter/types.ts#L10) --- ### Type Alias: LifecycleHooks > **LifecycleHooks**<`CONTEXT`>: `ApplicationHooks` & `CommandHooks`<`CONTEXT`> All supported lifecycle hooks that can be registered by an integration. This includes both application-level hooks and command-level hooks. Stricli will execute the provided callbacks at the appropriate time during the application lifecycle. #### Type Parameters[​](#type-parameters "Direct link to Type Parameters") • **CONTEXT** *extends* [`CommandContext`](/stricli/packages/core/interfaces/CommandContext.md) #### Defined in[​](#defined-in "Direct link to Defined in") [packages/core/src/application/integration.ts:90](https://github.com/bloomberg/stricli/blob/ce1268b6b86eb7d136dd0be5b9fa525173d43b19/packages/core/src/application/integration.ts#L90) --- ### Type Alias: PartialApplicationConfiguration > **PartialApplicationConfiguration**: `Pick`<[`ApplicationConfiguration`](/stricli/packages/core/interfaces/ApplicationConfiguration.md), `"name"` | `"versionInfo"` | `"determineExitCode"`> & { \[K in "scanner" | "documentation" | "completion" | "localization"]?: Partial\ } Partial configuration for application, see individual description for behavior when each value is unspecified. #### Defined in[​](#defined-in "Direct link to Defined in") [packages/core/src/config.ts:267](https://github.com/bloomberg/stricli/blob/ce1268b6b86eb7d136dd0be5b9fa525173d43b19/packages/core/src/config.ts#L267) --- ### Type Alias: ScannerCaseStyle > **ScannerCaseStyle**: `"original"` | `"allow-kebab-for-camel"` Case style configuration for parsing route and flag names from the command line. Each value has the following behavior: * `original` - Only accepts exact matches. * `allow-kebab-for-camel` - In addition to exact matches, allows kebab-case input for camelCase. #### Defined in[​](#defined-in "Direct link to Defined in") [packages/core/src/config.ts:44](https://github.com/bloomberg/stricli/blob/ce1268b6b86eb7d136dd0be5b9fa525173d43b19/packages/core/src/config.ts#L44) --- ### Type Alias: StricliCommandContextBuilder() > **StricliCommandContextBuilder**<`CONTEXT`>: (`info`) => `CONTEXT` | `Promise`<`CONTEXT`> Function to build a generic CommandContext given the current command information. #### Type Parameters[​](#type-parameters "Direct link to Type Parameters") • **CONTEXT** *extends* [`CommandContext`](/stricli/packages/core/interfaces/CommandContext.md) #### Parameters[​](#parameters "Direct link to Parameters") • **info**: [`CommandInfo`](/stricli/packages/core/type-aliases/CommandInfo.md)<`CONTEXT`> #### Returns[​](#returns "Direct link to Returns") `CONTEXT` | `Promise`<`CONTEXT`> #### Defined in[​](#defined-in "Direct link to Defined in") [packages/core/src/context.ts:101](https://github.com/bloomberg/stricli/blob/ce1268b6b86eb7d136dd0be5b9fa525173d43b19/packages/core/src/context.ts#L101) --- ### Type Alias: StricliDynamicCommandContext > **StricliDynamicCommandContext**<`CONTEXT`>: [`ApplicationContext`](/stricli/packages/core/interfaces/ApplicationContext.md) & `CONTEXT` | `object` Dynamic context for command that contains either the generic CommandContext or simply the more limited ApplicationContext and a method that builds a specific instance of the generic CommandContext. #### Type Parameters[​](#type-parameters "Direct link to Type Parameters") • **CONTEXT** *extends* [`CommandContext`](/stricli/packages/core/interfaces/CommandContext.md) #### Defined in[​](#defined-in "Direct link to Defined in") [packages/core/src/context.ts:109](https://github.com/bloomberg/stricli/blob/ce1268b6b86eb7d136dd0be5b9fa525173d43b19/packages/core/src/context.ts#L109) --- ### Type Alias: StricliIntegration > **StricliIntegration**<`CONTEXT`>: `object` An integration is a set of additional functionality that can apply to application runs without modifying the structure of the application itself. #### Type Parameters[​](#type-parameters "Direct link to Type Parameters") • **CONTEXT** *extends* [`CommandContext`](/stricli/packages/core/interfaces/CommandContext.md) #### Type declaration[​](#type-declaration "Direct link to Type declaration") ##### flag?[​](#flag "Direct link to flag?") > `readonly` `optional` **flag**: `Omit`<`ApplicationFlag`<`CONTEXT`>, `"name"`> If provided, registers an additional flag in the application to provide custom functionality. ##### hooks?[​](#hooks "Direct link to hooks?") > `readonly` `optional` **hooks**: [`LifecycleHooks`](/stricli/packages/core/type-aliases/LifecycleHooks.md)<`CONTEXT`> Lifecycle hooks provided by the integration that should be executed at the appropriate times during the application lifecycle. ##### validate()?[​](#validate "Direct link to validate()?") > `readonly` `optional` **validate**: (`root`, `config`) => `void` Additional validation that can be performed by the integration when the application is built. This can be used to ensure that the integration is compatible with the application configuration. If the validation fails, an error should be thrown. The integration name will be included in the error message, so it is not necessary to include it in the error message thrown by the integration. ###### Parameters[​](#parameters "Direct link to Parameters") • **root**: `RoutingTarget`<`CONTEXT`> • **config**: [`ApplicationConfiguration`](/stricli/packages/core/interfaces/ApplicationConfiguration.md) ###### Returns[​](#returns "Direct link to Returns") `void` #### Defined in[​](#defined-in "Direct link to Defined in") [packages/core/src/application/integration.ts:315](https://github.com/bloomberg/stricli/blob/ce1268b6b86eb7d136dd0be5b9fa525173d43b19/packages/core/src/application/integration.ts#L315) --- ### Type Alias: TypedCommandFlagParameters > **TypedCommandFlagParameters**<`FLAGS`, `CONTEXT`>: \[keyof `FLAGS`] *extends* \[`never`] ? `Partial`<`TypedCommandFlagParameters_`<`FLAGS`, `CONTEXT`>> : `TypedCommandFlagParameters_`<`FLAGS`, `CONTEXT`> #### Type Parameters[​](#type-parameters "Direct link to Type Parameters") • **FLAGS** *extends* [`BaseFlags`](/stricli/packages/core/type-aliases/BaseFlags.md) • **CONTEXT** *extends* [`CommandContext`](/stricli/packages/core/interfaces/CommandContext.md) #### Defined in[​](#defined-in "Direct link to Defined in") [packages/core/src/parameter/types.ts:76](https://github.com/bloomberg/stricli/blob/ce1268b6b86eb7d136dd0be5b9fa525173d43b19/packages/core/src/parameter/types.ts#L76) --- ### Type Alias: TypedCommandParameters > **TypedCommandParameters**<`FLAGS`, `ARGS`, `CONTEXT`>: [`TypedCommandFlagParameters`](/stricli/packages/core/type-aliases/TypedCommandFlagParameters.md)<`FLAGS`, `CONTEXT`> & [`TypedCommandPositionalParameters`](/stricli/packages/core/type-aliases/TypedCommandPositionalParameters.md)<`ARGS`, `CONTEXT`> Definitions for all parameters requested by the corresponding command. #### Type Parameters[​](#type-parameters "Direct link to Type Parameters") • **FLAGS** *extends* [`BaseFlags`](/stricli/packages/core/type-aliases/BaseFlags.md) • **ARGS** *extends* [`BaseArgs`](/stricli/packages/core/type-aliases/BaseArgs.md) • **CONTEXT** *extends* [`CommandContext`](/stricli/packages/core/interfaces/CommandContext.md) #### Defined in[​](#defined-in "Direct link to Defined in") [packages/core/src/parameter/types.ts:96](https://github.com/bloomberg/stricli/blob/ce1268b6b86eb7d136dd0be5b9fa525173d43b19/packages/core/src/parameter/types.ts#L96) --- ### Type Alias: TypedCommandPositionalParameters > **TypedCommandPositionalParameters**<`ARGS`, `CONTEXT`>: \[] *extends* `ARGS` ? `Partial`<`TypedCommandPositionalParameters_`<`ARGS`, `CONTEXT`>> : `TypedCommandPositionalParameters_`<`ARGS`, `CONTEXT`> #### Type Parameters[​](#type-parameters "Direct link to Type Parameters") • **ARGS** *extends* [`BaseArgs`](/stricli/packages/core/type-aliases/BaseArgs.md) • **CONTEXT** *extends* [`CommandContext`](/stricli/packages/core/interfaces/CommandContext.md) #### Defined in[​](#defined-in "Direct link to Defined in") [packages/core/src/parameter/types.ts:89](https://github.com/bloomberg/stricli/blob/ce1268b6b86eb7d136dd0be5b9fa525173d43b19/packages/core/src/parameter/types.ts#L89) --- ### Type Alias: TypedFlagParameter > **TypedFlagParameter**<`T`, `CONTEXT`>: `undefined` *extends* `T` ? `TypedFlagParameter_Optional`<`NonNullable`<`T`>, `CONTEXT`> : `TypedFlagParameter_Required`<`T`, `CONTEXT`> Definition of a flag parameter that will eventually be parsed as a flag. Required properties may vary depending on the type argument `T`. #### Type Parameters[​](#type-parameters "Direct link to Type Parameters") • **T** • **CONTEXT** *extends* [`CommandContext`](/stricli/packages/core/interfaces/CommandContext.md) = [`CommandContext`](/stricli/packages/core/interfaces/CommandContext.md) #### Defined in[​](#defined-in "Direct link to Defined in") [packages/core/src/parameter/flag/types.ts:370](https://github.com/bloomberg/stricli/blob/ce1268b6b86eb7d136dd0be5b9fa525173d43b19/packages/core/src/parameter/flag/types.ts#L370) --- ### Type Alias: TypedPositionalParameter > **TypedPositionalParameter**<`T`, `CONTEXT`>: `undefined` *extends* `T` ? `OptionalPositionalParameter`<`NonNullable`<`T`>, `CONTEXT`> : `RequiredPositionalParameter`<`T`, `CONTEXT`> Definition of a positional parameter that will eventually be parsed to an argument. Required properties may vary depending on the type argument `T`. #### Type Parameters[​](#type-parameters "Direct link to Type Parameters") • **T** • **CONTEXT** *extends* [`CommandContext`](/stricli/packages/core/interfaces/CommandContext.md) = [`CommandContext`](/stricli/packages/core/interfaces/CommandContext.md) #### Defined in[​](#defined-in "Direct link to Defined in") [packages/core/src/parameter/positional/types.ts:41](https://github.com/bloomberg/stricli/blob/ce1268b6b86eb7d136dd0be5b9fa525173d43b19/packages/core/src/parameter/positional/types.ts#L41) --- ### Type Alias: TypedPositionalParameters > **TypedPositionalParameters**<`T`, `CONTEXT`>: \[`T`] *extends* \[readonly infer E\[]] ? `number` *extends* `T`\[`"length"`] ? `PositionalParameterArray`<`E`, `CONTEXT`> : `PositionalParameterTuple`<`PositionalParametersForTuple`<`T`, `CONTEXT`>> : `PositionalParameterTuple`<`PositionalParametersForTuple`<`T`, `CONTEXT`>> Definition of all positional parameters. Required properties may vary depending on the type argument `T`. #### Type Parameters[​](#type-parameters "Direct link to Type Parameters") • **T** • **CONTEXT** *extends* [`CommandContext`](/stricli/packages/core/interfaces/CommandContext.md) #### Defined in[​](#defined-in "Direct link to Defined in") [packages/core/src/parameter/positional/types.ts:73](https://github.com/bloomberg/stricli/blob/ce1268b6b86eb7d136dd0be5b9fa525173d43b19/packages/core/src/parameter/positional/types.ts#L73) --- ### Type Alias: VersionInfo > **VersionInfo**: `object` | `object` & `object` Methods to determine application version information for `--version` flag or latest version check. #### Type declaration[​](#type-declaration "Direct link to Type declaration") ##### getLatestVersion()?[​](#getlatestversion "Direct link to getLatestVersion()?") > `readonly` `optional` **getLatestVersion**: (`this`, `currentVersion`) => `Promise`<`string` | `undefined`> Asynchonously determine the latest version of this application. If value is retrieved from cache, a change to the current version should invalidate that cache. ###### Parameters[​](#parameters "Direct link to Parameters") • **this**: [`CommandContext`](/stricli/packages/core/interfaces/CommandContext.md) • **currentVersion**: `string` ###### Returns[​](#returns "Direct link to Returns") `Promise`<`string` | `undefined`> ##### upgradeCommand?[​](#upgradecommand "Direct link to upgradeCommand?") > `readonly` `optional` **upgradeCommand**: `string` Command to display to the end user that will upgrade this application. Passed to [ApplicationText.currentVersionIsNotLatest](/stricli/packages/core/interfaces/ApplicationText.md#currentversionisnotlatest) to format/localize. #### Defined in[​](#defined-in "Direct link to Defined in") [packages/core/src/config.ts:12](https://github.com/bloomberg/stricli/blob/ce1268b6b86eb7d136dd0be5b9fa525173d43b19/packages/core/src/config.ts#L12) --- ### Type Alias: VersionIntegrationConfiguration > **VersionIntegrationConfiguration**: `Omit`<`ApplicationFlag`<[`CommandContext`](/stricli/packages/core/interfaces/CommandContext.md)>, `"name"` | `"aliases"` | `"global"` | `"run"`> & `object` Options for customizing the behavior of the `version` integration. #### Type declaration[​](#type-declaration "Direct link to Type declaration") ##### alias?[​](#alias "Direct link to alias?") > `readonly` `optional` **alias**: `AvailableAlias` | `false` Single-character shorthand alias for this flag, defaults to `v` if not provided. Set to `false` to disable the alias entirely. ##### hook?[​](#hook "Direct link to hook?") > `readonly` `optional` **hook**: keyof [`LifecycleHooks`](/stricli/packages/core/type-aliases/LifecycleHooks.md)<[`CommandContext`](/stricli/packages/core/interfaces/CommandContext.md)> If `getLatestVersion` is provided in VersionIntegrationConfiguration.info, this option specifies when version check should run. Defaults to `app:start`. ##### info[​](#info "Direct link to info") > `readonly` **info**: [`VersionInfo`](/stricli/packages/core/type-aliases/VersionInfo.md) Values or callbacks to provide the version information for this application. See [VersionInfo](/stricli/packages/core/type-aliases/VersionInfo.md) for more details. If `getLatestVersion` is provided, this integration will register a lifecycle hook (see VersionIntegrationConfiguration.hook) to check for the latest version of the application and print a warning to stderr if the current version is not the latest. #### Defined in[​](#defined-in "Direct link to Defined in") [packages/core/src/application/integrations/version.ts:11](https://github.com/bloomberg/stricli/blob/ce1268b6b86eb7d136dd0be5b9fa525173d43b19/packages/core/src/application/integrations/version.ts#L11) --- ### Variable: ExitCode > `const` **ExitCode**: `object` Enumeration of all possible exit codes returned by an application. #### Type declaration[​](#type-declaration "Direct link to Type declaration") ##### CommandLoadError[​](#commandloaderror "Direct link to CommandLoadError") > `readonly` **CommandLoadError**: `-2` = `-2` Failed to load command module. ##### CommandRunError[​](#commandrunerror "Direct link to CommandRunError") > `readonly` **CommandRunError**: `1` = `1` Command module unexpectedly threw an error. ##### ContextLoadError[​](#contextloaderror "Direct link to ContextLoadError") > `readonly` **ContextLoadError**: `-3` = `-3` An error was thrown while loading the context for a command run. ##### IntegrationError[​](#integrationerror "Direct link to IntegrationError") > `readonly` **IntegrationError**: `-10` = `-10` Error was thrown by or otherwise caused by an integration. ##### InternalError[​](#internalerror "Direct link to InternalError") > `readonly` **InternalError**: `-1` = `-1` An unexpected error was thrown by or not caught by this library. ##### InvalidArgument[​](#invalidargument "Direct link to InvalidArgument") > `readonly` **InvalidArgument**: `-4` = `-4` Unable to parse the specified arguments. ##### Success[​](#success "Direct link to Success") > `readonly` **Success**: `0` = `0` Command executed successfully. ##### UnknownCommand[​](#unknowncommand "Direct link to UnknownCommand") > `readonly` **UnknownCommand**: `-5` = `-5` Unable to find a command in the application with the given command line arguments. #### Defined in[​](#defined-in "Direct link to Defined in") [packages/core/src/exit-code.ts:7](https://github.com/bloomberg/stricli/blob/ce1268b6b86eb7d136dd0be5b9fa525173d43b19/packages/core/src/exit-code.ts#L7) --- ### Variable: text_en > `const` **text\_en**: [`ApplicationText`](/stricli/packages/core/interfaces/ApplicationText.md) Default English text implementation of [ApplicationText](/stricli/packages/core/interfaces/ApplicationText.md). #### Defined in[​](#defined-in "Direct link to Defined in") [packages/core/src/text.ts:264](https://github.com/bloomberg/stricli/blob/ce1268b6b86eb7d136dd0be5b9fa525173d43b19/packages/core/src/text.ts#L264) ---