Documentation
¶
Overview ¶
Package pluginhints provides placeholder Cobra commands for known plugins that are not yet installed, guiding users to install or request access.
Index ¶
Constants ¶
const AutoInstallOptOutEnvVar = "STRIPE_CLI_NO_PLUGIN_AUTO_INSTALL"
AutoInstallOptOutEnvVar disables auto-installing plugins on first use when set to a truthy value. Environments that don't want the CLI fetching binaries on demand (locked-down CI, air-gapped hosts) set this and install explicitly with `stripe plugin install <name>`.
Variables ¶
This section is empty.
Functions ¶
func AddHintCommands ¶
func AddHintCommands(rootCmd *cobra.Command, cfg *config.Config, installedPluginSet map[string]bool, runPlugin PluginRunner)
AddHintCommands registers a hint command for each known plugin that is not present in installedPluginSet. runPlugin dispatches to a plugin binary that was installed during this invocation; plugins configured with withAutoInstall use it to run the user's original command once the install finishes. A nil runPlugin degrades auto-install to install-then-print-next-steps.
Types ¶
type PluginRunner ¶ added in v1.50.6
PluginRunner dispatches to an installed plugin binary. cmd is the command that triggered the run (used for its context), name is the plugin shortname, and args are the arguments to forward to the plugin process.