Skip to content

Implement config loading from TOML with env overrides #10

@bug-ops

Description

@bug-ops

Description

Load application configuration from TOML file with environment variable overrides.

Parent: #2

Branch

feat/m1/config

Files

  • crates/zeph-core/src/config.rs — Config struct, load logic
  • crates/zeph-core/src/lib.rs — exports
  • crates/zeph-core/Cargo.toml — add serde, toml deps
  • config/default.toml — default configuration

Config Structure

[agent]
name = "Zeph"

[llm]
provider = "ollama"
base_url = "http://localhost:11434"
model = "mistral:7b"

[skills]
paths = ["./skills"]

[memory]
sqlite_path = "./data/zeph.db"
history_limit = 50

Environment Overrides

  • ZEPH_LLM_PROVIDER -> llm.provider
  • ZEPH_LLM_BASE_URL -> llm.base_url
  • ZEPH_LLM_MODEL -> llm.model

Acceptance Criteria

  • Config::load(path) parses TOML
  • Env vars override TOML values
  • Missing file returns defaults
  • Unit tests for parsing and overrides

Metadata

Metadata

Assignees

No one assigned

    Labels

    featureNew functionalityinfraProject infrastructure and tooling

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions