Documentation
¶
Index ¶
- Constants
- func GetAllTools() []string
- func GetToolRegistry() map[string]ToolInfo
- func GetToolToRepoMap() map[string]string
- func MigrateFromSingleVersion() error
- func SaveAliases(config *AliasConfig) error
- type AliasConfig
- type GitHubRelease
- type Manager
- func (m *Manager) EnsureDirs() error
- func (m *Manager) GetActiveVersion() (string, error)
- func (m *Manager) GetLatestPrereleaseVersionTag(toolName string) (string, error)
- func (m *Manager) GetLatestVersionTag(toolName string) (string, error)
- func (m *Manager) GetRelease(toolName, version string) (*GitHubRelease, error)
- func (m *Manager) GetToolVersion(tool string) (string, error)
- func (m *Manager) InstallAllToolsFromSource() error
- func (m *Manager) InstallTool(toolName, versionTag string) error
- func (m *Manager) InstallToolFromSource(toolName string) (string, error)
- func (m *Manager) ListInstalledVersions() ([]string, error)
- func (m *Manager) ResolveDependencies(initialToolSpecs []string) ([]string, error)
- func (m *Manager) SetActiveVersion(version string) error
- func (m *Manager) SetToolVersion(tool, version string) error
- func (m *Manager) SetUseGH(useGH bool)
- func (m *Manager) UninstallVersion(versionTag string) error
- func (m *Manager) UseToolVersion(tool, versionTag string) error
- func (m *Manager) UseVersion(versionTag string) error
- type ToolInfo
- type ToolVersions
Constants ¶
const ( // Directory structure constants VersionsDir = "versions" BinDir = "bin" // GitHub API constants GitHubOwner = "grovetools" GitHubAPI = "https://api.github.com" )
Variables ¶
This section is empty.
Functions ¶
func GetAllTools ¶
func GetAllTools() []string
GetAllTools returns all registered tool repository names
func GetToolRegistry ¶
GetToolRegistry returns the tool registry map
func GetToolToRepoMap ¶
GetToolToRepoMap returns the alias to repository name mapping
func MigrateFromSingleVersion ¶
func MigrateFromSingleVersion() error
MigrateFromSingleVersion migrates from old single version format
func SaveAliases ¶
func SaveAliases(config *AliasConfig) error
SaveAliases saves the user's custom alias configuration
Types ¶
type AliasConfig ¶
AliasConfig represents the structure of the aliases.json file
func LoadAliases ¶
func LoadAliases() (*AliasConfig, error)
LoadAliases loads the user's custom alias configuration
type GitHubRelease ¶
type GitHubRelease struct {
TagName string `json:"tag_name"`
Prerelease bool `json:"prerelease"`
Assets []struct {
Name string `json:"name"`
BrowserDownloadURL string `json:"browser_download_url"`
} `json:"assets"`
}
GitHubRelease represents a GitHub release
type Manager ¶
type Manager struct {
// contains filtered or unexported fields
}
Manager handles SDK installation and version management
func (*Manager) EnsureDirs ¶
EnsureDirs creates the necessary directory structure
func (*Manager) GetActiveVersion ¶
GetActiveVersion returns the currently active version (DEPRECATED) This method is kept for backward compatibility but should not be used
func (*Manager) GetLatestPrereleaseVersionTag ¶
GetLatestPrereleaseVersionTag fetches the latest pre-release (RC/nightly) tag from GitHub
func (*Manager) GetLatestVersionTag ¶
GetLatestVersionTag fetches the latest release tag from GitHub for a specific tool
func (*Manager) GetRelease ¶
func (m *Manager) GetRelease(toolName, version string) (*GitHubRelease, error)
GetRelease fetches release information for a specific tool and version
func (*Manager) GetToolVersion ¶
GetToolVersion returns the active version for a specific tool
func (*Manager) InstallAllToolsFromSource ¶
InstallAllToolsFromSource clones all Grove tools and builds them in a shared workspace
func (*Manager) InstallTool ¶
InstallTool installs a specific tool at a specific version
func (*Manager) InstallToolFromSource ¶
InstallToolFromSource clones and builds a tool from its main branch using a Go workspace
func (*Manager) ListInstalledVersions ¶
ListInstalledVersions returns all installed versions
func (*Manager) ResolveDependencies ¶
ResolveDependencies takes a list of user-specified tools and returns a complete list of tools to install, including all dependencies
func (*Manager) SetActiveVersion ¶
SetActiveVersion sets the active version (DEPRECATED) This method is kept for backward compatibility but should not be used
func (*Manager) SetToolVersion ¶
SetToolVersion sets the active version for a specific tool
func (*Manager) UninstallVersion ¶
UninstallVersion removes a specific version
func (*Manager) UseToolVersion ¶
UseToolVersion switches a specific tool to a specific version
func (*Manager) UseVersion ¶
UseVersion switches to a specific version (DEPRECATED)
type ToolInfo ¶
type ToolInfo struct {
Alias string // Default alias and binary name
Description string // Short description of the tool
Dependencies []string // List of canonical RepoNames this tool depends on
}
ToolInfo contains information about a tool
type ToolVersions ¶
type ToolVersions struct {
Versions map[string]string `json:"versions"` // tool -> version mapping
}
ToolVersions tracks the active version for each tool independently
func LoadToolVersions ¶
func LoadToolVersions() (*ToolVersions, error)
LoadToolVersions loads the active versions for all tools
func (*ToolVersions) GetToolVersion ¶
func (tv *ToolVersions) GetToolVersion(tool string) string
GetToolVersion returns the active version for a specific tool
func (*ToolVersions) Save ¶
func (tv *ToolVersions) Save() error
Save saves the tool versions to disk
func (*ToolVersions) SetToolVersion ¶
func (tv *ToolVersions) SetToolVersion(tool, version string)
SetToolVersion sets the active version for a specific tool