INNER CODE UNIT · Go
checkCodexDep
umputun/ralphex · cmd/ralphex/main.go:888
func checkCodexDep(cfg *config.Config) error {
codexCmd := cfg.CodexCommand
if codexCmd == "" {
codexCmd = "codex"
}
if _, err := exec.LookPath(codexCmd); err != nil {
return fmt.Errorf("%s not found in PATH; install the codex CLI or set codex_command in config", codexCmd)
}
return nil
}
// isWatchOnlyMode returns true if running in watch-only mode.
// watch-only mode runs the web dashboard without executing any plan.
func isWatchOnlyMode(o opts, configWatchDirs []string) bool {
return o.Serve && o.PlanFile == "" && o.PlanDescription == "" && (len(o.Watch) > 0 || len(configWatchDirs) > 0)
}
// runWatchOnly starts the web dashboard in watch-only mode without plan execution.