generate

package
v1.0.6 Latest Latest
Warning

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

Go to latest
Published: Mar 19, 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")
	ErrRepositoryInvalidFormat = errors.New("repository must contain at least one '/' (e.g. org/repo)")
	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
	AliasesInput     string // For form input
	Aliases          []string
	ScriptPath       string
	Prompt           string
	Agentless        bool
	PersistentPreRun bool
	PreRun           bool
	Force            bool
	WithInitializer  bool
	Protected        *bool
	Options          []string // For MultiSelect
	AddFlags         bool     // Whether to show the flag entry stage
	AddPrompt        bool     // Whether to show the AI prompt stage
}

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 FlagFormInput added in v1.0.6

type FlagFormInput struct {
	Name          string
	Type          string
	Description   string
	Persistent    bool
	Shorthand     string
	Required      bool
	Default       string
	DefaultIsCode bool
	AddAnother    bool
}

FlagFormInput holds data for a single flag collected via the interactive form.

type SkeletonOptions

type SkeletonOptions struct {
	Name         string
	GitBackend   string
	Repo         string
	Host         string
	Private      bool
	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