Skip to main content
Mark options as deprecated with .meta({ deprecated: true }). Deprecated flags show [deprecated] in --help, **Deprecated.** in skill docs, deprecated: true in JSON Schema (--llms), and emit a stderr warning when used in TTY mode.

Basic Usage

Help Text

Deprecated options show [deprecated] in help output:

Skill Documentation

Skill files (generated by skills add) include **Deprecated.** for deprecated options:

JSON Schema

--llms output includes deprecated: true in the JSON Schema:

Runtime Warnings

When a deprecated flag is used in human/TTY mode, incur emits a warning to stderr:
Warnings are only shown in TTY mode. Agent invocations (--json, piped output, MCP) do not emit warnings.

Migration Patterns

Renaming an Option

Removing an Option

Deprecate first, remove later:

Replacing with a Different Type

Short Aliases

Deprecated options also apply to their short aliases:

Boolean Flags

Deprecation warnings apply to both --flag and --no-flag forms:

Documentation Flow

Deprecation annotations flow through all output formats:
FormatAnnotation
--help[deprecated] suffix
skills add**Deprecated.** prefix
--llms --format json"deprecated": true
--llms --format md**Deprecated.** prefix
TTY usagestderr warning

Best Practices

Do

  • Mark options as deprecated before removing them
  • Provide migration guidance in the description
  • Support both old and new options during the transition period
  • Remove deprecated options in a major version bump

Don’t

  • Don’t mark required options as deprecated — make them optional first
  • Don’t remove deprecated options without a deprecation period
  • Don’t rely on deprecated options in examples or documentation

Example: Full Migration

  • See Schemas for defining options
  • See Commands for command definition patterns