Skip to content

Hide global --preset option when no presets are configured #242

@kamilio

Description

@kamilio

Summary

Toolcraft root help always shows the global option:

--preset <path>  Load parameter defaults from a JSON file

For CLIs that do not define or document any presets, this is confusing. It looks like there is a first-class preset system available for the app, even when the CLI author has not opted into it.

Expected

Either:

  • Hide --preset unless presets are configured/enabled, or
  • Provide a runCLI option to disable it, for example:
runCLI(root, { presets: false })

Why this matters

Small wrapper CLIs can end up with global help that advertises features the CLI author did not intentionally expose. This makes help output noisier and raises questions about where presets live and what format users should use.

Current behavior

The global options section includes --preset <path> alongside --yes, --output, and --help by default.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions