Skip to content

feat: UTEKE_HOME env var for custom data directory #95

Closed

Description

@ajianaz

Summary

Add UTEKE_HOME environment variable to override dirs::home_dir() for all storage paths (DB, models, index).

Acceptance Criteria

  • UTEKE_HOME env var takes precedence over dirs::home_dir() when set
  • dirs::home_dir() remains fallback when UTEKE_HOME is not set
  • Model download path respects UTEKE_HOME ($UTEKE_HOME/models/embeddinggemma-q4/)
  • DB path resolution unchanged — Uteke::open(path) still works with any path
  • Doctor command model check respects UTEKE_HOME
  • No breaking change — existing users (no UTEKE_HOME set) see zero difference

Scope

File Line Current Change
crates/uteke-core/src/embed/engine.rs 127 dirs::home_dir() uteke_home()
crates/uteke-core/src/lib.rs 426 dirs::home_dir() (doctor) uteke_home()
crates/uteke-server/src/main.rs 345 dirs::home_dir().expect(...) uteke_home()

Implementation Notes

  • Create helper fn uteke_home() -> PathBuf in uteke-core (reused by server & doctor)
  • Server and CLI import from core (or duplicate simple 3-line function)
  • No new dependencies needed

Verification

# No UTEKE_HOME — default behavior (no change)
uteke doctor  # model at ~/.uteke/models/... ✓

# With UTEKE_HOME
UTEKE_HOME=/tmp/test-uteke uteke doctor  # model at /tmp/test-uteke/models/... ✓

# Server with UTEKE_HOME
UTEKE_HOME=/data uteke-serve  # DB at /data/uteke.db ✓

Activity

  1. added
    scope:core
    type:feature
    on Jun 1, 2026
  2. added 3 commits that reference this issue on Jun 1, 2026
    878e6d2
    0d18a4a
    d2e5258
  3. added a commit that references this issue on Jun 4, 2026
    777bf12
  4. added a commit that references this issue on Aug 13, 2026
    eb901d5
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    scope:coretype:feature

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions