中文

Glossary

Look up terms across CLI input, Func definitions, and runtime structure.

Updated

These terms belong to different layers and should not be used interchangeably. Start with Core concepts when learning how to define commands; use this page when you need a precise definition.

Ordinary CLI input terms

TermMeaningLocation or API
InvocationOne complete run from starting the executable until it exits, such as ship project --help.Complete argv
ExecutableThe program name users type, such as ship; package.json#bin normally maps it to a built artifact.package.json#bin
TokenOne ordered piece of command-line input before parsing, such as project, --role, or owner.process.argv
OptionGeneral CLI term for --name, -n, and their values; Func distinguishes field options from Handler flags.@Flag / @Value / @Handler({ flag })
Positional inputData identified by position rather than an option name, such as alice.@Args().inputs

Concepts that define a Func CLI

TermMeaningAPI
Named commandA Command class whose one-or-more path tokens match a canonical path or alias.@Command()
Major commandA special Command with default, path, or flag entries when no named Command matches.@CommandMajor()
Missing commandOptional fallback Command for positional input that matches no named path.@CommandMissing()
HandlerMethod that performs an action in a Command class; one invocation selects one Handler.@Handler()
Default HandlerMethod used when no path or action option is selected at the current command node.@Handler()
Handler pathOne or more fixed tokens appended to a Command path.@Handler(path)
Handler flagAn option such as --version that selects another mutually exclusive Handler.@Handler({ flag, alias })
Module actionA reusable, mutually exclusive action option available within a Module scope.@OptionCommand()
Field optionA flag, scalar, or repeated value parsed onto a Command or option Provider.@Flag / @Value / @ArrayString / @ArrayNumber
InputPositional tokens left after matching the Command and Handler paths.Args.inputs

Runtime and application-structure terms

TermMeaningAPI
Command graphImmutable routing structure compiled from Command paths, Handler paths, and aliases.Internal runtime structure
Runtime contextCommand metadata, IO, cwd, signal, and exit code for the current invocation.Context
ModuleApplication boundary that organizes Commands, options, Providers, and imported Modules.@Module()
ProviderModule-registered class, value, or factory that usually supplies a reusable capability through DI.@Injectable / Module.providers
Option ProviderInjectable class with CLI fields, registered by a Module for the root or directly owned Commands.@Option / Module.options

See Modules for dependency visibility and project boundaries, Runtime execution model for how these definitions select classes, methods, and dependencies, and API reference for the complete decorator parameters.