You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Document the environment variables the server reads but .env.example omits #8
.env.example documents PORT, the director overrides and the mainland-China base URLs. The code reads six more variables that appear nowhere in .env.example or the README:
Variable
Read at
Effect
GENMOTION_PORT
server/index.mjs:18
Port fallback when PORT isn't set
GENMOTION_HOST
server/index.mjs:19
Bind address. Anything other than 127.0.0.1 also turns off the Host check in trusted() (server/index.mjs:50)
OpenAI-compatible proxy for GPT Image and the GPT director
MOONSHOT_BASE_URL
server/providers/llm/index.mjs:61
Kimi endpoint (e.g. https://api.moonshot.cn/v1 for mainland accounts)
The GENMOTION_HOST note matters. With the Host check off, any machine on the LAN can call /api/generate on the owner's keys, because requests without an Origin header are trusted (server/index.mjs:53).
Task: add the six variables to the Optional block of .env.example, keeping every value commented out or empty. That keeps the .env.example parses to all-empty keys test passing. Add a short note to the README that GENMOTION_HOST exposes the server to the network with no authentication.
Done when:for v in GENMOTION_PORT GENMOTION_HOST GENMOTION_LIBRARY GENMOTION_ENV_FILE OPENAI_BASE_URL MOONSHOT_BASE_URL; do grep -q "$v" .env.example || echo "missing $v"; done prints nothing, npm test still passes (including .env.example parses to all-empty keys), and the README Quick start notes warn that setting GENMOTION_HOST exposes the server to the network with no authentication.
Getting started: Node 22, no npm install needed: git clone, then npm test and npm run check. Comment here to claim it. Questions → Discord.
Activity