cmd

package
v0.0.0-...-552a595 Latest Latest
Warning

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

Go to latest
Published: Jan 30, 2026 License: MIT Imports: 132 Imported by: 0

Documentation

Index

Constants

View Source
const TelemetryCommandFlag = "telemetry"
View Source
const TelemetryUploadCommandFlag = "upload"

Variables

This section is empty.

Functions

func CreateGlobalFlagSet

func CreateGlobalFlagSet() *pflag.FlagSet

CreateGlobalFlagSet creates a new flag set with all global flags defined. This is the single source of truth for global flag definitions.

func ExecuteWithAutoInstall

func ExecuteWithAutoInstall(ctx context.Context, rootContainer *ioc.NestedContainer) error

ExecuteWithAutoInstall executes the command and handles auto-installation of extensions for unknown commands.

func NewRootCmd

func NewRootCmd(
	staticHelp bool,
	middlewareChain []*actions.MiddlewareRegistration,
	rootContainer *ioc.NestedContainer,
) *cobra.Command

Creates the root Cobra command for AZD. staticHelp - False, except for running for doc generation middlewareChain - nil, except for running unit tests rootContainer - The IoC container to use for registering and resolving dependencies. If nil is provided, a new container empty will be created.

func ParseGlobalFlags

func ParseGlobalFlags(args []string, opts *internal.GlobalCommandOptions) error

ParseGlobalFlags parses global flags from the provided arguments and populates the GlobalCommandOptions. Uses ParseErrorsAllowlist to gracefully ignore unknown flags (like extension-specific flags). This function is designed to be called BEFORE Cobra command tree construction to enable early access to global flag values for auto-install and other pre-execution logic.

Agent Detection: If --no-prompt is not explicitly set and an AI coding agent (like Claude Code, GitHub Copilot CLI, Cursor, etc.) is detected as the caller, NoPrompt is automatically enabled.

Types

type ArmClientInitializer

type ArmClientInitializer[T comparable] func(
	subscriptionId string,
	credentials azcore.TokenCredential,
	armClientOptions *arm.ClientOptions,
) (T, error)

ArmClientInitializer is a function definition for all Azure SDK ARM Client

type Asker

type Asker func(p survey.Prompt, response interface{}) error

type BuildResult

type BuildResult struct {
	Timestamp time.Time                              `json:"timestamp"`
	Services  map[string]*project.ServiceBuildResult `json:"services"`
}

type CmdAnnotations

type CmdAnnotations map[string]string

CmdAnnotations on a command

type CmdCalledAs

type CmdCalledAs string

CmdCalledAs provides access to the cmd.CalledAs() value through dependency injection

type CobraBuilder

type CobraBuilder struct {
	// contains filtered or unexported fields
}

CobraBuilder manages the construction of the cobra command tree from nested ActionDescriptors

func NewCobraBuilder

func NewCobraBuilder(container *ioc.NestedContainer) *CobraBuilder

Creates a new instance of the Cobra builder

func (*CobraBuilder) BuildCommand

func (cb *CobraBuilder) BuildCommand(descriptor *actions.ActionDescriptor) (*cobra.Command, error)

Builds a cobra Command for the specified action descriptor

type PackageResult

type PackageResult struct {
	Timestamp time.Time                                `json:"timestamp"`
	Services  map[string]*project.ServicePackageResult `json:"services"`
}

type RestoreResult

type RestoreResult struct {
	Timestamp time.Time                                `json:"timestamp"`
	Services  map[string]*project.ServiceRestoreResult `json:"services"`
}

Directories

Path Synopsis
Package actions contains the application logic that handles azd CLI commands.
Package actions contains the application logic that handles azd CLI commands.

Jump to

Keyboard shortcuts

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