Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RegisterServeFlags ¶
RegisterServeFlags registers serve-command flags on fs. The caller must call fs.Parse before passing fs to Load.
func ResolveDataDir ¶
ResolveDataDir returns the effective data directory by applying defaults and environment overrides, without reading any files. Use this to determine where migration should target before calling Load or LoadMinimal.
Types ¶
type Config ¶
type Config struct {
Host string `json:"host"`
Port int `json:"port"`
NoBrowser bool `json:"no_browser"`
ClaudeProjectDir string `json:"claude_project_dir"`
CodexSessionsDir string `json:"codex_sessions_dir"`
CopilotDir string `json:"copilot_dir"`
GeminiDir string `json:"gemini_dir"`
OpenCodeDir string `json:"opencode_dir"`
CursorProjectsDir string `json:"cursor_projects_dir"`
DataDir string `json:"data_dir"`
DBPath string `json:"-"`
CursorSecret string `json:"cursor_secret"`
GithubToken string `json:"github_token,omitempty"`
WriteTimeout time.Duration `json:"-"`
// Multi-directory support (from config.json).
// When set, these take precedence over the single-dir
// fields above. Env vars override these with a
// single-element slice.
ClaudeProjectDirs []string `json:"claude_project_dirs,omitempty"`
CodexSessionsDirs []string `json:"codex_sessions_dirs,omitempty"`
CopilotDirs []string `json:"copilot_dirs,omitempty"`
GeminiDirs []string `json:"gemini_dirs,omitempty"`
OpenCodeDirs []string `json:"opencode_dirs,omitempty"`
}
Config holds all application configuration.
func Load ¶
Load builds a Config by layering: defaults < config file < env < flags. The provided FlagSet must already be parsed by the caller. Only flags that were explicitly set override the lower layers.
func LoadMinimal ¶
LoadMinimal builds a Config from defaults, env, and config file, without parsing CLI flags. Use this for subcommands that manage their own flag sets.
func (*Config) ResolveClaudeDirs ¶ added in v0.6.0
ResolveClaudeDirs returns the effective list of Claude project directories. Precedence: env var (single) > config file array > default (single).
func (*Config) ResolveCodexDirs ¶ added in v0.6.0
func (*Config) ResolveCopilotDirs ¶ added in v0.6.0
func (*Config) ResolveGeminiDirs ¶ added in v0.6.0
func (*Config) ResolveOpenCodeDirs ¶ added in v0.6.0
func (*Config) SaveGithubToken ¶
SaveGithubToken persists the GitHub token to the config file.