package config import ( "os" "time" ) type Config struct { APIKey string BaseURL string Timeout time.Duration MaxRetries int UserAgent string } func New() *Config { return &Config{ APIKey: os.Getenv("DBORG_API_KEY"), BaseURL: "https://db.org.ai", Timeout: 30 * time.Second, MaxRetries: 3, UserAgent: "dborg-cli/1.0", } } func (c *Config) WithAPIKey(key string) *Config { if key != "" { c.APIKey = key } return c } func (c *Config) Validate() error { if c.APIKey == "" { return ErrMissingAPIKey } return nil }