cmd

package
v1.40.5 Latest Latest
Warning

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

Go to latest
Published: Apr 13, 2026 License: Apache-2.0 Imports: 51 Imported by: 0

Documentation

Overview

Package cmd implements all Stripe CLI commands.

Index

Constants

View Source
const AIAgentHelpAnnotationKey = "ai_agent_help"

AIAgentHelpAnnotationKey is the Cobra annotation key used to store per-command help text shown only when an AI agent is detected. Set it on any command via cmd.Annotations["ai_agent_help"] = "your text".

Variables

Config is the cli configuration for the user

Functions

func Execute

func Execute(ctx context.Context)

Execute adds all child commands to the root command and sets flags appropriately. This is called by main.main(). It only needs to happen once to the rootCmd.

func ReBindKeys added in v1.13.1

func ReBindKeys()

ReBindKeys applies the value found in viper config to the cobra flag when viper has a value (possibly from env)

func WrappedInheritedFlagUsages added in v0.5.0

func WrappedInheritedFlagUsages(cmd *cobra.Command) string

WrappedInheritedFlagUsages returns a string containing the usage information for all flags which were inherited from parent commands, wrapped to the terminal's width.

func WrappedLocalFlagUsages added in v0.5.0

func WrappedLocalFlagUsages(cmd *cobra.Command) string

WrappedLocalFlagUsages returns a string containing the usage information for all flags specifically set in the current command, wrapped to the terminal's width.

func WrappedNonRequestParamsFlagUsages added in v0.7.0

func WrappedNonRequestParamsFlagUsages(cmd *cobra.Command) string

WrappedNonRequestParamsFlagUsages returns a string containing the usage information for all non-request parameters flags. The string is wrapped to the terminal's width.

func WrappedRequestParamsFlagUsages added in v0.7.0

func WrappedRequestParamsFlagUsages(cmd *cobra.Command) string

WrappedRequestParamsFlagUsages returns a string containing the usage information for all request parameters flags, i.e. flags used in operation commands to set values for request parameters.

By default, only flags annotated "required" or "mostcommon" are shown, followed by a "N more parameters" message. If fullHelpMode is set (via `stripe help <command>`), or if no flags have either annotation, all flags are shown.

For enum parameters, the possible values are shown inline (e.g. --status complete|expired|open), truncated with "..." if they would exceed the terminal width. For other parameters, the API type is shown in angle brackets (e.g. --amount <integer>).

Types

type FixturesCmd added in v0.9.0

type FixturesCmd struct {
	Cmd *cobra.Command
	Cfg *config.Config
	// contains filtered or unexported fields
}

FixturesCmd prints a list of all the available sample projects that users can generate

type LogsCmd added in v0.4.0

type LogsCmd struct {
	Cmd *cobra.Command
	// contains filtered or unexported fields
}

LogsCmd is a wrapper for the base logs command

Directories

Path Synopsis
Package logs provides the logs tail command.
Package logs provides the logs tail command.
Package plugin provides plugin management commands.
Package plugin provides plugin management commands.
Package pluginhints provides placeholder Cobra commands for known plugins that are not yet installed, guiding users to install or request access.
Package pluginhints provides placeholder Cobra commands for known plugins that are not yet installed, guiding users to install or request access.
Package resource provides auto-generated API resource commands.
Package resource provides auto-generated API resource commands.
Package samples provides CLI commands for managing Stripe samples.
Package samples provides CLI commands for managing Stripe samples.

Jump to

Keyboard shortcuts

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