cmd

package
v0.0.9 Latest Latest
Warning

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

Go to latest
Published: Jul 7, 2026 License: MIT Imports: 40 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Execute

func Execute() error

func MigrateProject added in v0.0.8

func MigrateProject(opts MigrateProjectOptions) error

MigrateProject is the daemon-free implementation of `boid project migrate`. It can be called in-process from the boid start auto-migrate path or from cobra's runProjectMigrate (which is now a thin wrapper).

Types

type KitCleanupResult added in v0.0.8

type KitCleanupResult struct {
	Renamed []KitRename `json:"renamed,omitempty"`
	Deleted []KitDelete `json:"deleted,omitempty"`
}

KitCleanupResult is the on-disk record the boid-kit-init skill writes when it has reorganised legacy-* kits. cmd/kit.go reads it after the sandbox exits and rewrites the matching workspace.kits entries.

type KitDelete added in v0.0.8

type KitDelete struct {
	Name       string `json:"name"`
	ReplacedBy string `json:"replaced_by,omitempty"`
}

KitDelete describes a kit-directory removal. workspace.kits entries equal to Name are dropped. When ReplacedBy is non-empty it is appended (idempotent: only added when the slug is not already present in the same workspace).

type KitRename added in v0.0.8

type KitRename struct {
	From string `json:"from"`
	To   string `json:"to"`
}

KitRename describes a kit-directory rename. workspace.kits entries equal to From are rewritten to To.

type MigrateProjectOptions added in v0.0.8

type MigrateProjectOptions struct {
	// Dir is the absolute project root path (parent of .boid/).
	Dir string
	// Workspace overrides the workspace slug. Empty falls back to the
	// project's existing project_workspaces entry, then to the implicit
	// default workspace.
	Workspace string
	// Apply switches from dry-run (false) to actually writing files.
	Apply bool
	// OnCollision controls secret-key collisions when copying from the old
	// namespace into the new one. Empty defaults to "refuse".
	OnCollision string
	// DBPath / KeyFilePath override the XDG-derived defaults; empty uses
	// the defaults so production callers can pass zero-value options.
	DBPath      string
	KeyFilePath string
	// Out receives the dry-run / progress text. nil → io.Discard.
	Out io.Writer
}

MigrateProjectOptions controls a single project migration run. It is the daemon-free surface that `cmd/start.go --auto-migrate` calls in-process once per affected project, and that `runProjectMigrate` populates from cobra flags.

Jump to

Keyboard shortcuts

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