Source identity
| Field | Recorded value |
|---|---|
| Source type | GitHub source |
| Original record | Janady13/ai-brain-core / ai_brain_env.py |
| Date | Not specified in source |
| Repository | Janady13/ai-brain-core |
| Revision | f7275582f13ada80bfb3b1008089800ca26f4a23 |
| Branch | main |
| Path or archive member | ai_brain_env.py |
| Original SHA-256 | e7f297a3781f6d2e3fb2f7c80048d5c872ad0f1b901860d5fe756285bf05fef6 |
| Git blob SHA | 1d4e8d42413b1030c528a670ab6c760ec1d43883 |
| Reading-copy SHA-256 | e7f297a3781f6d2e3fb2f7c80048d5c872ad0f1b901860d5fe756285bf05fef6 |
Every recorded occurrence
These 3 records contain identical original source bytes. Their paths and revisions remain part of the archive.
| Original record | Branch or archive | Revision / identifier | Original location |
|---|---|---|---|
| Janady13/ai-brain-core / ai_brain_env.py | main | f7275582f13ada80bfb3b1008089800ca26f4a23 | Open original |
| Janady13/ai-brain-core / ai_brain_env.py | claude/agi-architecture-diagram-01GJ7CohfKvLb77yiKpHqd6d | 365850e27004318edd582881225024026b118c2d | Open original |
| Janady13/ai-brain-core / ai_brain_env.py | healer-core | 0fe4cbbaa91912149f1a8e32205371ff67017268 | Open original |
Recovered source transcript
Download complete source text ↓45 lines · 1.3 KB
# auto-generated ai_brain_env.py
# import this near top of python entrypoints to load same env files as the shell loader
import os
from pathlib import Path
import re
CANDIDATES = [
Path.home() / "Desktop" / "env",
Path.home() / "Desktop" / "AI_Brain" / "env",
Path.home() / "The AI" / "env",
Path.home() / "env",
]
ENV_DIR = None
for p in CANDIDATES:
if p.is_dir():
ENV_DIR = p
break
if ENV_DIR is None:
# nothing to load
# print("ai_brain_env: no env folder found")
pass
else:
for f in sorted(ENV_DIR.glob("*.env")):
if f.name.endswith(".example.env"):
continue
try:
text = f.read_text(encoding="utf-8")
except Exception:
continue
for line in text.splitlines():
line = line.strip()
if not line or line.startswith("#"):
continue
m = re.match(r'^\s*([A-Za-z_][A-Za-z0-9_]*)\s*=\s*(.*)\s*$', line)
if not m:
continue
k, v = m.group(1), m.group(2)
# remove surrounding quotes if present
if (v.startswith('"') and v.endswith('"')) or (v.startswith("'") and v.endswith("'")):
v = v[1:-1]
# only set if not already present (don't override)
os.environ.setdefault(k, v)