Versions in this module Expand all Collapse all v1 v1.0.0 Aug 23, 2026 Changes in this version + func CompareVersions(actual, min string) error + func DefaultRunner(ctx context.Context, name string, args ...string) ([]byte, error) + func DefaultVersionParser(name, output string) string + func DownloadAndExtractGoBinary(ctx context.Context, owner, repo, binName, targetDir string) error + func DownloadDirectBinary(ctx context.Context, downloadURL, binName, targetDir string) error + func EnsureManagedBinDir(appName string) (string, error) + func GetManagedBinDir(appName string) (string, error) + func InitManagedPath(appName string) error + func InstallPackage(ctx context.Context, packageName string, runner CommandRunner) error + func InstallYtDlp(ctx context.Context, targetDir string) error + func InstallYtDlpForPlatform(ctx context.Context, goos, goarch, targetDir string) error + func IsAgentMode() bool + func ResolveLatestTag(ctx context.Context, owner, repo string) (string, error) + func ResolveLatestTagWithBaseURL(ctx context.Context, baseURL, owner, repo string) (string, error) + func SanitizeStderr(stderr string) string + func UpdateYtDlp(ctx context.Context, runner CommandRunner, targetDir string) error + func UpgradeSelf(ctx context.Context, owner, repo, currentVersion string) (string, error) + func UpgradeSelfToPath(ctx context.Context, owner, repo, currentVersion, destPath string) (string, error) + type Cache interface + Delete func(key string) error + Get func(key string, target any) bool + Put func(key string, val any) error + type CommandRunner func(ctx context.Context, name string, args ...string) ([]byte, error) + type Config struct + AppName string + Cache Cache + Dependencies []Dependency + Runner CommandRunner + type Dependency struct + InstallURL string + Installer Installer + MinVersion string + Name string + ParseVersion func(name, output string) string + VersionArgs []string + type DependencyReport struct + DetectedVersion string + Error string + Installed bool + MinVersion string + Name string + Satisfied bool + func (r DependencyReport) Summary() string + type EnsureOptions struct + AutoInstall bool + type Installer interface + Install func(ctx context.Context, targetDir string) error + Update func(ctx context.Context, targetDir string) error + func GitHubReleaseGoBinary(owner, repo, binName string) Installer + func SystemPackageManager(packageName string) Installer + func YtDlp() Installer + type InstallerFunc func(ctx context.Context, targetDir string) error + func (f InstallerFunc) Install(ctx context.Context, targetDir string) error + func (f InstallerFunc) Update(ctx context.Context, targetDir string) error + type Manager struct + func New(cfg Config) *Manager + func (m *Manager) Ensure(ctx context.Context, opts ...EnsureOptions) error + func (m *Manager) Install(ctx context.Context, depName string) error + func (m *Manager) InstallUnsatisfied(ctx context.Context) ([]string, error) + func (m *Manager) Update(ctx context.Context, depName string) error + func (m *Manager) UpdateAll(ctx context.Context) ([]string, error) + func (m *Manager) Verify(ctx context.Context) ([]DependencyReport, error)