pluginhints

package
v1.50.6 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 26, 2026 License: Apache-2.0 Imports: 18 Imported by: 0

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

View Source
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

type PluginRunner func(cmd *cobra.Command, name string, args []string) error

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL