CommandOptions
Interface: CommandOptions
Defined in: packages/core/src/services/command.ts:12
Options for the
Command
decorator
Example
@Command("serve", { description: "Start the HTTP server" })
async serve(port: number = 18080): Promise<void> { ... }
Properties
description
description:
string
Defined in: packages/core/src/services/command.ts:17
Human-readable description of the command, displayed in --help output
and shell tab completion
phase?
optionalphase?:"resolved"|"application"|"initialized"
Defined in: packages/core/src/services/command.ts:33
Lifecycle phase at which this command runs.
"initialized"(default): runs afterCore.init()— full runtime including service.init() (DB, network)."resolved": runs afterCore.resolve()only — services are constructed and resolve()d but init() is skipped. Use for build-time codegen hooks that shouldn't touch the network."application": runs with the loaded application only — no Core, no service, the configuration is not decrypted. The method must be static. Use for tooling on the configuration files, likewebda config encrypt.
requires?
optionalrequires?:string[]
Defined in: packages/core/src/services/command.ts:24
Capabilities required by this command. Each string names a capability that must be provided by a configured service. If not configured, the CLI auto-injects the default provider from the capabilities map in webda.module.json.