Documentation
¶
Overview ¶
Package config resolves runtime paths and default locations used by the CLI.
Index ¶
- func AppConfigPath() (string, error)
- func DefaultLogFile() (string, error)
- func DefaultSessionsRoot() (string, error)
- func DefaultTrashRoot() (string, error)
- func EnsureConfigDir() error
- func EnsureDirForFile(filePath string) error
- func ResolveConfigPath(v string) (string, error)
- func ResolvePath(path string) (string, error)
- type AppConfig
- type TUIConfig
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AppConfigPath ¶
AppConfigPath resolves the effective config path.
func DefaultLogFile ¶
DefaultLogFile returns the default action log path.
func DefaultSessionsRoot ¶
DefaultSessionsRoot returns the default Codex sessions directory.
func DefaultTrashRoot ¶
DefaultTrashRoot returns the default trash directory for soft-deleted sessions.
func EnsureConfigDir ¶
func EnsureConfigDir() error
EnsureConfigDir ensures config parent directory exists.
func EnsureDirForFile ¶
EnsureDirForFile creates parent directories for the given file path.
func ResolveConfigPath ¶
ResolveConfigPath resolves path-like fields and preserves empty values.
func ResolvePath ¶
ResolvePath expands "~" prefixes and returns the normalized path string.
Types ¶
type AppConfig ¶
type AppConfig struct {
SessionsRoot string `json:"sessions_root"`
TrashRoot string `json:"trash_root"`
LogFile string `json:"log_file"`
TUI TUIConfig `json:"tui"`
}
AppConfig is the user-level runtime configuration for codexsm.
func LoadAppConfig ¶
LoadAppConfig reads and parses user config. Missing config file is treated as zero-value config.