Cherry.CLI.Registry (cherry v0.3.0)

Copy Markdown View Source

Maps CLI verbs to their Cherry.CLI.Command modules.

Deliberately a compile-time map: the verb surface is part of Cherry's public API and changes to it belong in code review, not runtime plugins.

Summary

Functions

Whether a verb stays resident after a successful run.

Looks up the command module for a verb.

All known verbs, sorted, for help and error output.

Functions

blocking?(arg1)

@spec blocking?(String.t()) :: boolean()

Whether a verb stays resident after a successful run.

Both frontends consult this — the mix task and the binary must agree on which commands hold the VM open, or cherry serve exits the moment the banner prints (the standalone binary shipped exactly that bug in 0.1.0-rc.1).

fetch(verb)

@spec fetch(String.t()) :: {:ok, module()} | :error

Looks up the command module for a verb.

verbs()

@spec verbs() :: [String.t()]

All known verbs, sorted, for help and error output.