Move .env into skills/ for easy install
- 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)
This commit is contained in:
14
skills/_env_loader.py
Normal file
14
skills/_env_loader.py
Normal file
@@ -0,0 +1,14 @@
|
||||
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)
|
||||
Reference in New Issue
Block a user