initialize

package
v0.2.0 Latest Latest
Warning

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

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

Documentation

Overview

Package initialize implements the deployah init command.

The interactive init flow walks through project name, environments, components, and resource settings, then writes a deployah.yaml manifest with schema defaults applied. Dry-run mode previews the file without saving.

Register the command with Register on a nabat.dev/nabat.App instance.

Index

Constants

View Source
const (
	// DefaultOutputFile is the default manifest path written by init.
	DefaultOutputFile = "deployah.yaml"
	// DefaultCPUThreshold is the default HPA CPU target percentage.
	DefaultCPUThreshold = 75
	// DefaultMinReplicas is the default minimum replica count for HPA.
	DefaultMinReplicas = 2
	// DefaultMaxReplicas is the default maximum replica count for HPA.
	DefaultMaxReplicas = 5
)
View Source
const (
	// DryRunPreviewHeader prefixes the dry-run manifest preview output.
	DryRunPreviewHeader = "=== DRY RUN MODE - PREVIEW OF GENERATED MANIFEST ===\n"
	// DryRunPreviewFooter suffixes the dry-run manifest preview output.
	DryRunPreviewFooter = "\n=== END PREVIEW ===\n\nThis is a preview. Use --dry-run=false to actually save the configuration."
)
View Source
const (
	// StepProjectName is the prompt title for the project name step.
	StepProjectName = "Step 1/4: Project Name"
	// StepEnvironments is the prompt title for the environments step.
	StepEnvironments = "Step 2/4: Environments"
	// StepComponents is the prompt title for the components step.
	StepComponents = "Step 3/4: Components"
	// StepSummary is the prompt title for the final summary step.
	StepSummary = "Step 4/4: Summary"
)

Variables

This section is empty.

Functions

func Register

func Register(app *nabat.App)

Register adds the init command to app.

Types

type Options

type Options struct {
	Output string `nabat:"output"`
	DryRun bool   `nabat:"dry-run"`
}

Options holds command-line flags for init.

type ProjectConfig

type ProjectConfig struct {
	Name         string
	Environments []manifest.Environment
	Components   map[string]manifest.Component
	OutputPath   string
	DryRun       bool
}

ProjectConfig holds the collected configuration data

Jump to

Keyboard shortcuts

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