Documentation
¶
Index ¶
- Constants
- Variables
- func BootstrapSystem() error
- func EnsureDirs() error
- func EnsureProjectInitialized(tikiSkillMdContent, dokiSkillMdContent string) (bool, error)
- func GenerateRandomID() string
- func GetArtTView() string
- func GetBoardViewMode() string
- func GetBool(key string) bool
- func GetCacheDir() string
- func GetConfigDir() string
- func GetConfigFile() string
- func GetContentBackgroundColor() tcell.Color
- func GetContentTextColor() tcell.Color
- func GetDefaultNewTaskTemplate() string
- func GetDokiDir() string
- func GetEffectiveTheme() string
- func GetFireIcon() string
- func GetHeaderVisible() bool
- func GetInt(key string) int
- func GetMaxPoints() int
- func GetPluginSearchPaths() []string
- func GetProjectConfigFile() string
- func GetString(key string) string
- func GetTaskDir() string
- func GetTemplateFile() string
- func GetTheme() string
- func InitPaths() error
- func PromptForProjectInit() ([]string, bool, error)
- func ResetPathManager()
- func SaveBoardViewMode(viewMode string) error
- func SaveHeaderVisible(visible bool) error
- func SavePluginViewMode(pluginName string, configIndex int, viewMode string) error
- func SetColors(colors *ColorConfig)
- type ColorConfig
- type Config
- type Gradient
- type PathManager
- func (pm *PathManager) CacheDir() string
- func (pm *PathManager) ConfigDir() string
- func (pm *PathManager) ConfigFile() string
- func (pm *PathManager) DokiDir() string
- func (pm *PathManager) EnsureDirs() error
- func (pm *PathManager) PluginSearchPaths() []string
- func (pm *PathManager) ProjectConfigFile() string
- func (pm *PathManager) TaskDir() string
- func (pm *PathManager) TemplateFile() string
Constants ¶
const ( // Task box heights TaskBoxHeight = 5 // Compact view mode TaskBoxHeightExpanded = 9 // Expanded view mode // Task box width padding TaskBoxPaddingCompact = 12 // Width padding in compact mode TaskBoxPaddingExpanded = 4 // Width padding in expanded mode TaskBoxMinWidth = 10 // Minimum width fallback // Search box dimensions SearchBoxHeight = 3 )
Variables ¶
var ( // Version is the semantic version or commit hash. Version = "dev" // GitCommit is the full git commit hash. GitCommit = "unknown" // BuildDate is the ISO 8601 build timestamp. BuildDate = "unknown" )
Build information variables injected via ldflags at compile time. These are set by the build process (Makefile or GoReleaser) using: -ldflags "-X tiki/config.Version=... -X tiki/config.GitCommit=... -X tiki/config.BuildDate=..."
var ( // ErrNoHome indicates that the user's home directory could not be determined ErrNoHome = errors.New("unable to determine home directory") // ErrPathManagerInit indicates that the PathManager failed to initialize ErrPathManagerInit = errors.New("failed to initialize path manager") )
Functions ¶
func BootstrapSystem ¶
func BootstrapSystem() error
BootstrapSystem creates the task storage and seeds the initial tiki.
func EnsureDirs ¶ added in v0.0.7
func EnsureDirs() error
EnsureDirs creates all necessary directories with appropriate permissions
func EnsureProjectInitialized ¶
EnsureProjectInitialized bootstraps the project if .doc/tiki is missing. Returns (proceed, error). If proceed is false, the user canceled initialization.
func GenerateRandomID ¶
func GenerateRandomID() string
GenerateRandomID generates a 6-character random alphanumeric ID (lowercase)
func GetArtTView ¶
func GetArtTView() string
GetArtTView returns the art logo formatted for tview (with tview color codes) uses the current gradient colors
func GetBoardViewMode ¶
func GetBoardViewMode() string
GetBoardViewMode loads the board view mode from config Priority: plugins array entry with name "Board", then default
func GetCacheDir ¶ added in v0.0.7
func GetCacheDir() string
GetCacheDir returns the user cache directory
func GetConfigDir ¶ added in v0.0.7
func GetConfigDir() string
GetConfigDir returns the user config directory
func GetConfigFile ¶ added in v0.0.7
func GetConfigFile() string
GetConfigFile returns the path to the user config file
func GetContentBackgroundColor ¶
GetContentBackgroundColor returns the background color for markdown content areas Dark theme needs black background for light text; light theme uses terminal default
func GetContentTextColor ¶
GetContentTextColor returns the appropriate text color for content areas Dark theme uses white text; light theme uses black text
func GetDefaultNewTaskTemplate ¶
func GetDefaultNewTaskTemplate() string
GetDefaultNewTaskTemplate returns the embedded new.md template
func GetDokiDir ¶ added in v0.0.7
func GetDokiDir() string
GetDokiDir returns the project-local documentation directory
func GetEffectiveTheme ¶
func GetEffectiveTheme() string
GetEffectiveTheme resolves "auto" to actual theme based on terminal detection
func GetHeaderVisible ¶
func GetHeaderVisible() bool
GetHeaderVisible returns the header visibility setting
func GetPluginSearchPaths ¶ added in v0.0.7
func GetPluginSearchPaths() []string
GetPluginSearchPaths returns directories to search for plugin files
func GetProjectConfigFile ¶ added in v0.0.7
func GetProjectConfigFile() string
GetProjectConfigFile returns the path to the project-local config file
func GetTaskDir ¶ added in v0.0.7
func GetTaskDir() string
GetTaskDir returns the project-local task directory
func GetTemplateFile ¶ added in v0.0.7
func GetTemplateFile() string
GetTemplateFile returns the path to the user's custom new.md template
func InitPaths ¶ added in v0.0.7
func InitPaths() error
InitPaths initializes the path manager. Must be called early in application startup. Returns an error if path initialization fails (e.g., cannot determine home directory).
func PromptForProjectInit ¶
PromptForProjectInit presents a Huh form for project initialization. Returns (selectedAITools, proceed, error)
func ResetPathManager ¶ added in v0.0.7
func ResetPathManager()
ResetPathManager resets the path manager singleton for testing purposes. This allows tests to reinitialize paths with different environment variables.
func SaveBoardViewMode ¶
SaveBoardViewMode saves the board view mode to config.yaml Deprecated: Use SavePluginViewMode("Board", -1, viewMode) instead
func SaveHeaderVisible ¶
SaveHeaderVisible saves the header visibility setting to config.yaml
func SavePluginViewMode ¶
SavePluginViewMode saves a plugin's view mode to config.yaml This function updates or creates the plugin entry in the plugins array configIndex: index in config array (-1 to create new entry by name)
Types ¶
type ColorConfig ¶
type ColorConfig struct {
// Board view colors
BoardColumnTitleBackground tcell.Color
BoardColumnTitleText tcell.Color
BoardColumnBorder tcell.Color
BoardColumnTitleGradient Gradient
BoardPaneTitleBackground tcell.Color
BoardPaneTitleText tcell.Color
BoardPaneBorder tcell.Color
BoardPaneTitleGradient Gradient
// Task box colors
TaskBoxSelectedBackground tcell.Color
TaskBoxSelectedText tcell.Color
TaskBoxSelectedBorder tcell.Color
TaskBoxUnselectedBorder tcell.Color
TaskBoxUnselectedBackground tcell.Color
TaskBoxIDColor Gradient
TaskBoxTitleColor string // tview color string like "[#b8b8b8]"
TaskBoxLabelColor string // tview color string like "[#767676]"
TaskBoxDescriptionColor string // tview color string like "[#767676]"
TaskBoxTagValueColor string // tview color string like "[#5a6f8f]"
// Task detail view colors
TaskDetailIDColor Gradient
TaskDetailTitleText string // tview color string like "[yellow]"
TaskDetailLabelText string // tview color string like "[green]"
TaskDetailValueText string // tview color string like "[white]"
TaskDetailCommentAuthor string // tview color string like "[yellow]"
TaskDetailEditDimTextColor string // tview color string like "[#808080]"
TaskDetailEditDimLabelColor string // tview color string like "[#606060]"
TaskDetailEditDimValueColor string // tview color string like "[#909090]"
TaskDetailEditFocusMarker string // tview color string like "[yellow]"
TaskDetailEditFocusText string // tview color string like "[white]"
// Search box colors
SearchBoxLabelColor tcell.Color
SearchBoxBackgroundColor tcell.Color
SearchBoxTextColor tcell.Color
// Input field colors (used in task detail edit mode)
InputFieldBackgroundColor tcell.Color
InputFieldTextColor tcell.Color
// Burndown chart colors
BurndownChartAxisColor tcell.Color
BurndownChartLabelColor tcell.Color
BurndownChartValueColor tcell.Color
BurndownChartBarColor tcell.Color
BurndownChartGradientFrom Gradient
BurndownChartGradientTo Gradient
BurndownHeaderGradientFrom Gradient // Header-specific chart gradient
BurndownHeaderGradientTo Gradient
// Header view colors
HeaderInfoLabel string // tview color string like "[orange]"
HeaderInfoValue string // tview color string like "[white]"
HeaderKeyBinding string // tview color string like "[yellow]"
HeaderKeyText string // tview color string like "[white]"
}
ColorConfig holds all color and style definitions per view
func DefaultColors ¶
func DefaultColors() *ColorConfig
DefaultColors returns the default color configuration
func GetColors ¶
func GetColors() *ColorConfig
GetColors returns the global color configuration with theme-aware overrides
type Config ¶
type Config struct {
// Logging configuration
Logging struct {
Level string `mapstructure:"level"` // "debug", "info", "warn", "error"
} `mapstructure:"logging"`
// Board view configuration
Board struct {
View string `mapstructure:"view"` // "compact" or "expanded"
} `mapstructure:"board"`
// Header configuration
Header struct {
Visible bool `mapstructure:"visible"`
} `mapstructure:"header"`
// Tiki configuration
Tiki struct {
MaxPoints int `mapstructure:"maxPoints"`
} `mapstructure:"tiki"`
// Appearance configuration
Appearance struct {
Theme string `mapstructure:"theme"` // "dark", "light", "auto"
} `mapstructure:"appearance"`
}
Config holds all application configuration loaded from config.yaml
func GetConfig ¶
func GetConfig() *Config
GetConfig returns the loaded configuration If config hasn't been loaded yet, it loads it first
func LoadConfig ¶
LoadConfig loads configuration from config.yaml Priority order (first found wins): project config → user config → current directory (dev) If config.yaml doesn't exist, it uses default values
type PathManager ¶ added in v0.0.7
type PathManager struct {
// contains filtered or unexported fields
}
PathManager manages all file system paths for tiki
func (*PathManager) CacheDir ¶ added in v0.0.7
func (pm *PathManager) CacheDir() string
CacheDir returns the user cache directory
func (*PathManager) ConfigDir ¶ added in v0.0.7
func (pm *PathManager) ConfigDir() string
ConfigDir returns the user config directory
func (*PathManager) ConfigFile ¶ added in v0.0.7
func (pm *PathManager) ConfigFile() string
ConfigFile returns the path to the user config file
func (*PathManager) DokiDir ¶ added in v0.0.7
func (pm *PathManager) DokiDir() string
DokiDir returns the project-local documentation directory
func (*PathManager) EnsureDirs ¶ added in v0.0.7
func (pm *PathManager) EnsureDirs() error
EnsureDirs creates all necessary directories with appropriate permissions
func (*PathManager) PluginSearchPaths ¶ added in v0.0.7
func (pm *PathManager) PluginSearchPaths() []string
PluginSearchPaths returns directories to search for plugin files Search order: project config dir → user config dir
func (*PathManager) ProjectConfigFile ¶ added in v0.0.7
func (pm *PathManager) ProjectConfigFile() string
ProjectConfigFile returns the path to the project-local config file
func (*PathManager) TaskDir ¶ added in v0.0.7
func (pm *PathManager) TaskDir() string
TaskDir returns the project-local task directory
func (*PathManager) TemplateFile ¶ added in v0.0.7
func (pm *PathManager) TemplateFile() string
TemplateFile returns the path to the user's custom new.md template