Move .env to XDG config path | Generated by AI

Home 2026.07

Summary

Goal

Relocate the canonical .env for ww from the project root (/Users/lzwjava/projects/ww/.env) to a centralized XDG-style config path (~/.config/ww/.env).

What was done

1. Copied .env to new location

2. Updated ww/env/__init__.py — load order changed

The load_env() function now loads from 4 sources in this priority order:

Load order Source Override Purpose
1st (lowest) ~/.config/ww/.env False Canonical base config — sets defaults
2nd cwd/.env default Local per-directory overrides
3rd project root .env False Backward compat with old location
4th (highest) BASE_PATH/.env True Explicit override mechanism

Key semantics:

3. Git workflow

Verification

What this enables


Back Donate