config

package
v0.2.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 22, 2026 License: MIT Imports: 11 Imported by: 0

Documentation

Overview

Package config provides configuration management for ralphex with embedded defaults.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DefaultsFS

func DefaultsFS() embed.FS

DefaultsFS returns the embedded filesystem containing default config files.

Types

type ColorConfig added in v0.2.0

type ColorConfig struct {
	Task       string // task execution phase
	Review     string // review phase
	Codex      string // codex external review
	ClaudeEval string // claude evaluation of codex output
	Warn       string // warning messages
	Error      string // error messages
	Signal     string // completion/failure signals
	Timestamp  string // timestamp prefix
	Info       string // informational messages
}

ColorConfig holds RGB values for output colors. each field stores comma-separated RGB values (e.g., "255,0,0" for red).

type Config

type Config struct {
	ClaudeCommand string `json:"claude_command"`
	ClaudeArgs    string `json:"claude_args"`

	CodexEnabled         bool   `json:"codex_enabled"`
	CodexEnabledSet      bool   `json:"-"` // tracks if codex_enabled was explicitly set in config
	CodexCommand         string `json:"codex_command"`
	CodexModel           string `json:"codex_model"`
	CodexReasoningEffort string `json:"codex_reasoning_effort"`
	CodexTimeoutMs       int    `json:"codex_timeout_ms"`
	CodexSandbox         string `json:"codex_sandbox"`

	IterationDelayMs  int  `json:"iteration_delay_ms"`
	TaskRetryCount    int  `json:"task_retry_count"`
	TaskRetryCountSet bool `json:"-"` // tracks if task_retry_count was explicitly set in config

	PlansDir string `json:"plans_dir"`

	// output colors (RGB values as comma-separated strings)
	Colors ColorConfig `json:"-"`

	// prompts (loaded separately from files)
	TaskPrompt         string `json:"-"`
	ReviewFirstPrompt  string `json:"-"`
	ReviewSecondPrompt string `json:"-"`
	CodexPrompt        string `json:"-"`

	// custom agents (loaded separately from files)
	CustomAgents []CustomAgent `json:"-"`
	// contains filtered or unexported fields
}

Config holds all configuration settings for ralphex.

func Load

func Load(configDir string) (*Config, error)

Load loads all configuration from the specified directory. If configDir is empty, uses the default location (~/.config/ralphex/). It installs defaults if needed, parses config file, loads prompts and agents.

type CustomAgent

type CustomAgent struct {
	Name   string // filename without extension
	Prompt string // contents of the agent file
}

CustomAgent represents a user-defined review agent.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL