- Added skills/_env_loader.py - shared env loader for all scripts - Updated 17 scripts to use load_unified_env() - Updated install-skills.sh to copy .env into skills/ - Updated README with simpler OpenClaw install instructions - .env in skills/ is gitignored (credentials stay private)
15 lines
367 B
Python
15 lines
367 B
Python
import os
|
|
from pathlib import Path
|
|
from dotenv import load_dotenv
|
|
|
|
|
|
def load_unified_env():
|
|
skills_root = Path(__file__).resolve().parent.parent
|
|
env_path = skills_root / ".env"
|
|
if env_path.exists():
|
|
load_dotenv(env_path)
|
|
return
|
|
legacy = Path.home() / ".config" / "opencode" / ".env"
|
|
if legacy.exists():
|
|
load_dotenv(legacy)
|