Versions in this module Expand all Collapse all v0 v0.0.3 Mar 19, 2026 Changes in this version type StepStatus + const StepStreaming v0.0.2 Mar 19, 2026 Changes in this version + func ExecuteCoreHook(ctx context.Context, hookScript string, declaredOutputs []string, env []string, ...) (map[string]string, error) + func ParseComposeFile(path string) (map[string]InfraService, error) + func WorktreeBasePath() string type CoreConfig + Services map[string]CoreServiceConfig + type CoreServiceConfig struct + Hooks *CoreServiceHooks + Outputs []string + type CoreServiceHooks struct + Destroy string + Init string + Reset string + Seed string type EnvironmentEntry + CoreOutputs map[string]map[string]string type HookContext + CoreOutputs map[string]map[string]string + type InfraService struct + EnvVar string + Image string + Name string + Port int + type InfrastructureConfig struct + ComposeFile string type Manager + func (m *Manager) CoreInit(ctx context.Context, svcName string) error + func (m *Manager) CoreReset(ctx context.Context, svcName, envName string) error + func (m *Manager) RunCoreHook(ctx context.Context, svcName, action, envName string) (map[string]string, error) type PortMap + func AllocatePortBlock(envName string, serviceNames []string) (PortMap, error) type ProjectConfig + InfraServices map[string]InfraService + Mode string + func LoadConfigWithOverlay(basePath, mode string) (*ProjectConfig, error) + func (c *ProjectConfig) ServiceNames() []string type ServiceConfig + EnvFile string + func (s ServiceConfig) ResolvedEnvFile() string type TemplateContext + CoreOutputs map[string]map[string]string + CurrentService string + InfraPorts PortMap + ServicePorts PortMap v0.0.1 Mar 18, 2026 Changes in this version + func AllocatePortOffset(envName string) int + func RenderEnvMap(envMap map[string]string, ctx *TemplateContext) (map[string]string, error) + func RenderTemplate(tmpl string, ctx *TemplateContext) (string, error) + func ResolveEnvironmentFromCwd(cwd string, environments map[string]*EnvironmentEntry) (string, error) + func TopologicalSort(services map[string]ServiceConfig) ([]string, error) + func ValidateConfig(cfg *ProjectConfig) error + func ValidateConfigWithFS(cfg *ProjectConfig, projectRoot string, fileExists func(string) bool) error + type ComputePort interface + Create func(ctx context.Context, envName string, branch string) (*ComputeResources, error) + Destroy func(ctx context.Context, envName string) error + IsRunning func(ctx context.Context, envName string) (bool, error) + Start func(ctx context.Context, envName string, ports PortMap) error + Stop func(ctx context.Context, envName string) error + type ComputeResources struct + ExternalIP string + VMId string + WorktreePath string + type CoreConfig struct + Databases map[string]DatabaseConfig + type DatabaseConfig struct + Engine string + Image string + Password string + Port int + Seed *SeedConfig + TemplateDb string + User string + type DatabaseInfo struct + ConnectionString string + Database string + Host string + Password string + Port int + User string + type DatabasePort interface + CreateDatabase func(ctx context.Context, envName string) (*DatabaseInfo, error) + DatabaseExists func(ctx context.Context, envName string) (bool, error) + DestroyDatabase func(ctx context.Context, envName string) error + EnsureInfrastructure func(ctx context.Context) error + ResetDatabase func(ctx context.Context, envName string) (*DatabaseInfo, error) + SeedTemplate func(ctx context.Context, snapshotPath string) error + type DatabaseRef struct + Name string + Provider string + type EnvPort interface + Cleanup func(ctx context.Context, workdir string) error + Generate func(ctx context.Context, envName string, workdir string, ports PortMap, ...) error + SymlinkSharedEnvFiles func(ctx context.Context, workdir string) error + type EnvironmentDetail struct + DatabaseExists map[string]bool + Entry *EnvironmentEntry + InfraRunning bool + SnapshotInfo map[string]*SnapshotState + type EnvironmentEntry struct + Branch string + CreatedAt time.Time + Databases map[string]DatabaseRef + Local *LocalMeta + Mode EnvironmentMode + Name string + Ports PortMap + Remote *RemoteMeta + Status EnvironmentStatus + UpdatedAt time.Time + type EnvironmentMode string + const ModeLocal + const ModePreview + const ModeSandbox + type EnvironmentStatus string + const StatusCreating + const StatusError + const StatusRunning + const StatusStopped + type HookContext struct + Branch string + Databases map[string]*DatabaseInfo + EnvName string + Phase string + Ports PortMap + ProjectName string + ProjectRoot string + Step string + WorktreePath string + type HookDef struct + ContinueOnError bool + Run string + type HookRunner struct + func NewHookRunner(hooks HooksConfig, progress ProgressReporter) *HookRunner + func (r *HookRunner) RunAfter(ctx context.Context, step string, hctx *HookContext) error + func (r *HookRunner) RunBefore(ctx context.Context, step string, hctx *HookContext) error + type HooksConfig map[string]StepHooks + type InfraServiceConfig struct + Image string + Port int + type LocalConfig struct + ComposeFile string + Worktree WorktreeConfig + type LocalMeta struct + ComposeProjectName string + WorktreePath string + type Manager struct + func NewManager(deps ManagerDeps) *Manager + func (m *Manager) Destroy(ctx context.Context, envName string) error + func (m *Manager) Init(ctx context.Context, envName string, branch string) (*EnvironmentEntry, error) + func (m *Manager) List(ctx context.Context) ([]*EnvironmentEntry, error) + func (m *Manager) ResetDatabase(ctx context.Context, envName string, dbName string) error + func (m *Manager) SeedTemplate(ctx context.Context, dbName string, snapshotPath string) error + func (m *Manager) Status(ctx context.Context, envName string) (*EnvironmentDetail, error) + type ManagerDeps struct + Compute ComputePort + Config *ProjectConfig + Databases map[string]DatabasePort + EnvGen EnvPort + Networking NetworkingPort + Progress ProgressReporter + ProjectRoot string + State StatePort + type NetworkingPort interface + AllocatePorts func(envName string) PortMap + GetServiceURL func(envName string, service string) (string, error) + type NoopReporter struct + func (NoopReporter) OnStep(StepEvent) + type PortMap map[string]int + func AllocatePorts(envName string, basePorts map[string]int) PortMap + type ProgressReporter interface + OnStep func(event StepEvent) + type ProjectConfig struct + Core CoreConfig + Hooks HooksConfig + Infrastructure map[string]InfraServiceConfig + Local *LocalConfig + Name string + PackageManager string + Services map[string]ServiceConfig + Version int + func LoadConfig(path string) (*ProjectConfig, error) + func ParseConfig(data []byte) (*ProjectConfig, error) + func (c *ProjectConfig) AllBasePorts() map[string]int + type ProvisionerPort interface + Deprovision func(ctx context.Context, vmID string) error + Provision func(ctx context.Context, envName string, spec VMSpec) (*VMInfo, error) + Status func(ctx context.Context, vmID string) (*VMInfo, error) + type RemoteMeta struct + ExternalIP string + VMId string + type SeedConfig struct + Script string + Snapshot *SnapshotConfig + Strategy string + type ServiceConfig struct + Command string + DependsOn []string + Env map[string]string + Path string + Port int + type SnapshotConfig struct + Bucket string + Prefix string + Region string + Source string + type SnapshotState struct + LastSeeded *time.Time + TemplateReady bool + type SnapshotUpdate struct + LastSeeded *time.Time + TemplateReady *bool + type State struct + Environments map[string]*EnvironmentEntry + Snapshots map[string]*SnapshotState + Version int + func NewState() *State + type StatePort interface + GetEnvironment func(ctx context.Context, name string) (*EnvironmentEntry, error) + Load func(ctx context.Context) (*State, error) + RemoveEnvironment func(ctx context.Context, name string) error + Save func(ctx context.Context, state *State) error + SetEnvironment func(ctx context.Context, name string, entry *EnvironmentEntry) error + UpdateSnapshot func(ctx context.Context, dbName string, info *SnapshotUpdate) error + type StepEvent struct + Error error + Message string + Status StepStatus + Step string + type StepHooks struct + After []HookDef + Before []HookDef + type StepStatus string + const StepCompleted + const StepFailed + const StepSkipped + const StepStarted + type TemplateContext struct + Databases map[string]*DatabaseInfo + Ports PortMap + type VMInfo struct + ExternalIP string + ID string + Status string + type VMSpec struct + DiskSizeGB int + Image string + MachineType string + Region string + type ValidationError struct + Errors []string + func (e *ValidationError) Error() string + type WorktreeConfig struct + BasePath string + SymlinkPatterns []string