prerequisites

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Apr 4, 2026 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	CoreTools = []Tool{
		{
			Name:        "mise",
			DisplayName: "mise (version manager)",
			Category:    metadata.ToolCategoryCore,
			VersionFlag: "--version",
			InstallURL:  "https://mise.jdx.dev/getting-started.html",
		},
	}
)

Functions

func AllCoreToolsInstalled

func AllCoreToolsInstalled() bool

AllCoreToolsInstalled returns true if all core tools are installed

func EnsurePrerequisites

func EnsurePrerequisites(interactive bool) error

EnsurePrerequisites checks for prerequisites and optionally prompts for installation If interactive is false (CI mode), it just reports status without prompting

func FormatToolStatus

func FormatToolStatus(result ToolCheckResult) string

FormatToolStatus formats a tool check result for display

func GetInstallInstructions

func GetInstallInstructions(missing []Tool) string

GetInstallInstructions returns human-readable install instructions for missing tools

func IsCommandAvailable

func IsCommandAvailable(command string) bool

IsCommandAvailable checks if any command is available in PATH

func IsMiseInstalled

func IsMiseInstalled() bool

IsMiseInstalled checks specifically if mise is installed

Types

type PrerequisiteCheck

type PrerequisiteCheck struct {
	AllCoreInstalled bool
	MissingCore      []Tool
	CoreResults      []ToolCheckResult
	Instructions     string
}

PrerequisiteCheck represents the result of a prerequisite check

func CheckPrerequisites

func CheckPrerequisites() PrerequisiteCheck

CheckPrerequisites performs a comprehensive check of all tools

type Tool

type Tool struct {
	Name        string
	DisplayName string
	Category    metadata.ToolCategory
	VersionFlag string // Flag to get version (usually --version or -v)
	InstallCmd  string // Command to install via mise
	InstallURL  string // URL for manual installation instructions
}

Tool represents a required or optional tool

func GetMissingCoreTools

func GetMissingCoreTools() []Tool

GetMissingCoreTools returns a list of missing core tools

type ToolCheckResult

type ToolCheckResult struct {
	Tool      Tool
	Installed bool
	Version   string
	Path      string
	Error     error
}

ToolCheckResult contains the result of checking a tool's installation status

func CheckAllTools

func CheckAllTools() []ToolCheckResult

CheckAllTools checks core tools

func CheckCoreTools

func CheckCoreTools() []ToolCheckResult

CheckCoreTools checks only core required tools

func CheckTool

func CheckTool(tool Tool) ToolCheckResult

CheckTool checks if a tool is installed and gets its version

Jump to

Keyboard shortcuts

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