generate

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Mar 18, 2026 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrCommandNameRequired  = errors.New("command name is required")
	ErrFlagNameRequired     = errors.New("flag name is required")
	ErrNameRequired         = errors.New("name is required")
	ErrRepositoryRequired   = errors.New("repository is required")
	ErrHostRequired         = errors.New("host is required")
	ErrEmptyCommandPath     = errors.New("empty command path")
	ErrCommandNotFound      = errors.New("command not found in manifest")
	ErrUpdateManifestFailed = errors.New("failed to update manifest")
	ErrNonInteractive       = errors.New("non-interactive mode detected, missing required flags")
)

Functions

func NewCmdAddFlag

func NewCmdAddFlag(p *props.Props) *cobra.Command

func NewCmdCommand

func NewCmdCommand(p *props.Props) *cobra.Command

func NewCmdDocs

func NewCmdDocs(p *props.Props) *cobra.Command

func NewCmdGenerate

func NewCmdGenerate(p *props.Props) *cobra.Command

func NewCmdProtect

func NewCmdProtect(p *props.Props) *cobra.Command

func NewCmdSkeleton

func NewCmdSkeleton(p *props.Props) *cobra.Command

func NewCmdUnprotect

func NewCmdUnprotect(p *props.Props) *cobra.Command

Types

type AddFlagOptions

type AddFlagOptions struct {
	CommandName string
	FlagName    string
	FlagType    string
	Description string
	Persistent  bool
	Path        string
}

func (*AddFlagOptions) Run

func (o *AddFlagOptions) Run(ctx context.Context, p *props.Props) error

func (*AddFlagOptions) ValidateOrPrompt

func (o *AddFlagOptions) ValidateOrPrompt(p *props.Props) error

type CommandOptions

type CommandOptions struct {
	Name             string
	Short            string
	Long             string
	Path             string
	WithAssets       bool
	Parent           string
	Args             string
	Flags            []string
	FlagsInput       string // For form input
	Aliases          []string
	AliasesInput     string // For form input
	ScriptPath       string
	Prompt           string
	Agentless        bool
	PersistentPreRun bool
	PreRun           bool
	Force            bool
	WithInitializer  bool
	Protected        *bool
	Options          []string // For MultiSelect
}

func (*CommandOptions) Run

func (o *CommandOptions) Run(ctx context.Context, p *props.Props) error

func (*CommandOptions) ValidateOrPrompt

func (o *CommandOptions) ValidateOrPrompt() error

type DocsOptions

type DocsOptions struct {
	Name        string
	Path        string
	Parent      string
	CommandName string
	PackagePath string
	LegacySrc   string
}

func (*DocsOptions) Run

func (o *DocsOptions) Run(ctx context.Context, p *props.Props) error

type SkeletonOptions

type SkeletonOptions struct {
	Name         string
	GitBackend   string
	Repo         string
	Host         string
	Description  string
	Path         string
	GoVersion    string
	Features     []string
	HelpType     string
	SlackChannel string
	SlackTeam    string
	TeamsChannel string
	TeamsTeam    string
}

func (*SkeletonOptions) Run

func (o *SkeletonOptions) Run(ctx context.Context, p *props.Props) error

func (*SkeletonOptions) ValidateOrPrompt

func (o *SkeletonOptions) ValidateOrPrompt(p *props.Props) error

Jump to

Keyboard shortcuts

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