Documentation
¶
Overview ¶
Package cli provides the command-line interface for Tinct.
Package cli provides the command-line interface for Tinct.
Package cli provides the command-line interface for Tinct.
Package cli provides the command-line interface for Tinct.
Package cli provides the command-line interface for Tinct.
Package cli provides the command-line interface for Tinct.
Package cli provides the command-line interface for Tinct.
Package cli provides the command-line interface for Tinct.
Package cli provides the command-line interface for Tinct.
Package cli provides the command-line interface for Tinct.
Package cli provides the command-line interface for Tinct.
Package cli provides the command-line interface for Tinct.
Package cli provides the command-line interface for Tinct.
Package cli provides the command-line interface for Tinct.
Package cli provides command-line interface utilities.
Index ¶
Constants ¶
const (
// PluginLockFile is the name of the plugin lock file.
PluginLockFile = ".tinct-plugins.json"
)
Variables ¶
var ( // RootCmd represents the base command when called without any subcommands. RootCmd = &cobra.Command{ Use: "tinct", Short: "A modern color palette generator", Long: `Tinct is a modern, extensible CLI tool that extracts color palettes from images and generates configuration files for your favorite applications. Extract vibrant color schemes from wallpapers and apply them system-wide to terminal emulators, window managers, application launchers, and more.`, Version: version.Short(), SilenceUsage: true, } )
Functions ¶
func NewRootCmd ¶
NewRootCmd adds all child commands to the root command and sets flags appropriately. This is called by main.main(). It only needs to happen once to the RootCmd.
Types ¶
type ExternalPluginMeta ¶
type ExternalPluginMeta struct {
// Name is the plugin's actual name (from --plugin-info).
Name string `json:"name"`
// Path is the absolute path to the plugin executable.
Path string `json:"path"`
// Type is the plugin type (input or output).
Type string `json:"type"`
// Version is the plugin version if available.
Version string `json:"version,omitempty"`
// Description is the plugin description if available.
Description string `json:"description,omitempty"`
// Source contains structured information about where the plugin came from.
Source *repository.PluginSource `json:"source,omitempty"`
// SourceLegacy is the old string-based source field for backward compatibility.
SourceLegacy string `json:"source_legacy,omitempty"`
// InstalledAt is the timestamp when the plugin was installed.
InstalledAt string `json:"installed_at,omitempty"`
// Config holds plugin-specific configuration (optional).
Config map[string]any `json:"config,omitempty"`
}
ExternalPluginMeta contains metadata about an external plugin.
type PluginLock ¶
type PluginLock struct {
// Version of the lock file format.
Version string `json:"version,omitempty"`
// EnabledPlugins is a list of explicitly enabled plugins.
EnabledPlugins []string `json:"enabled_plugins,omitempty"`
// DisabledPlugins is a list of explicitly disabled plugins.
DisabledPlugins []string `json:"disabled_plugins,omitempty"`
// ExternalPlugins maps plugin names to their metadata.
ExternalPlugins map[string]*ExternalPluginMeta `json:"external_plugins,omitempty"`
}
PluginLock represents the plugin lock file structure.
type PluginSourceInfo ¶
type PluginSourceInfo struct {
URL string
FilePath string // For git repos, path to file within repo
Ref string // For git repos, branch/tag/commit
}
PluginSourceInfo represents the type of plugin source.
type Table ¶
type Table struct {
// contains filtered or unexported fields
}
Table represents a simple table formatter with dynamic column widths.
func (*Table) EnableTerminalAwareWidth ¶
EnableTerminalAwareWidth enables terminal-aware width calculation for a column. The specified column will size to fit available terminal width (after other columns). minWidth specifies the minimum width for the column.
func (*Table) SetColumnMaxWidth ¶
SetColumnMaxWidth sets a maximum width for a specific column. Text longer than this will be wrapped to multiple lines.