Files
Stirling-PDF/engine/scripts/setup_env.py
T

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

25 lines
778 B
Python
Raw Normal View History

2026-03-16 11:01:50 +00:00
"""
Ensures `.env.local` exists so developers have a place to put overrides
(API keys, local model choices, etc.) without touching the committed `.env`.
2026-03-16 11:01:50 +00:00
Usage:
uv run scripts/setup_env.py
"""
from pathlib import Path
ROOT = Path(__file__).parent.parent
ENV_LOCAL_FILE = ROOT / ".env.local"
2026-03-16 11:01:50 +00:00
TEMPLATE = """\
###############################################################################
# Local overrides for `engine/.env`
# Put API keys and machine-specific settings here. Any variable defined here
# takes precedence over the committed `.env`
###############################################################################
"""
2026-03-16 11:01:50 +00:00
if not ENV_LOCAL_FILE.exists():
ENV_LOCAL_FILE.write_text(TEMPLATE)
print("setup-env: created empty .env.local for local overrides")