Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add script for scanning for missing env vars in docs #207

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

cheahjs
Copy link
Contributor

@cheahjs cheahjs commented Sep 7, 2024

Walks the AST for the backend code for calls to os.environ/os.getenv, and compares it with what is currently documented.

Run with python3 scripts/scan-missing-env-vars.py <git_ref>, for example python3 scripts/scan-missing-env-vars.py v0.3.20

Example output:

$ scripts/scan-missing-env-vars.py v0.3.20
Scanning git ref: v0.3.20

Environment variables accessed but not documented:
AUDIO_TTS_API_KEY
AUDIO_TTS_SPLIT_ON
AUTOMATIC1111_API_AUTH
COMFYUI_WORKFLOW
CONTENT_EXTRACTION_ENGINE
CORS_ALLOW_ORIGIN
DEFAULT_LOCALE
ENABLE_ADMIN_CHAT_ACCESS
ENABLE_MESSAGE_RATING
ENABLE_SEARCH_QUERY
FONTS_DIR
FROM_INIT_PY
FUNCTIONS_DIR
GLOBAL_LOG_LEVEL
RAG_FILE_MAX_COUNT
RAG_FILE_MAX_SIZE
SEARCHAPI_API_KEY
SEARCHAPI_ENGINE
TIKA_SERVER_URL
TOOLS_DIR
USER_PERMISSIONS_CHAT_EDITING
USER_PERMISSIONS_CHAT_TEMPORARY
WEBUI_JWT_SECRET_KEY

Environment variables documented but not accessed:
ENABLE_LITELLM
LITELLM_PROXY_HOST
LITELLM_PROXY_PORT
RAG_WEB_SEARCH_DOMAIN_FILTER_LIST
SEARCH_QUERY_PROMPT_LENGTH_THRESHOLD

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant