cli

package
v0.11.0 Latest Latest
Warning

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

Go to latest
Published: Aug 23, 2026 License: MIT Imports: 38 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const (
	SeverityInfo    = "info"
	SeverityWarning = "warning"
	SeverityError   = "error"
)

Finding severities are deliberately separate from lifecycle or check status.

View Source
const ReportVersion = 1

ReportVersion is the version of the machine-readable CLI result contracts. Individual reports may evolve independently, but all current reports use version one.

Variables

View Source
var ErrNotARepo = vcs.ErrNotARepo

ErrNotARepo is returned when the current directory is not inside a repository wtf can manage.

View Source
var Version = "0.10.0"

Version is set at build time via ldflags.

Functions

func Execute

func Execute() error

Execute runs the root command.

func FormatError

func FormatError(err error) string

FormatError returns a user-friendly, WTF-themed error string.

func IsJSONOutput added in v0.4.0

func IsJSONOutput() bool

IsJSONOutput reports whether the global --json flag was set.

Types

type CleanupPlan added in v0.9.0

type CleanupPlan struct {
	Version       int                 `json:"version"`
	PlanID        string              `json:"plan_id"`
	Workspace     identity.Workspace  `json:"workspace"`
	Repository    identity.Repository `json:"repository"`
	Observed      *vcs.Worktree       `json:"observed,omitempty"`
	Preconditions []string            `json:"preconditions"`
	Actions       []string            `json:"actions"`
	Risks         []string            `json:"risks"`
}

CleanupPlan is the deliberately small, serializable contract for destructive workspace cleanup. It contains a snapshot, not an instruction to discover a workspace again at apply time.

type Finding added in v0.11.0

type Finding struct {
	Code          string `json:"code"`
	Severity      string `json:"severity"`
	RepositoryID  string `json:"repository_id"`
	WorkspaceID   string `json:"workspace_id"`
	Message       string `json:"message"`
	RepairCommand string `json:"repair_command,omitempty"`
}

Finding is the shared diagnostic shape used by doctor and resource reports. IDs are always durable WTF UUIDs; callers must not substitute paths or names.

Jump to

Keyboard shortcuts

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