Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -31,5 +31,5 @@ KIE_API_KEY=your_kie_api_key_here
# Optional prompt enhancement providers
OPENROUTER_API_KEY=your_openrouter_api_key_here
OPENROUTER_BASE_URL=https://openrouter.ai/api/v1
MEDIA_LOCAL_OPENAI_BASE_URL=http://127.0.0.1:8080/v1
MEDIA_LOCAL_OPENAI_BASE_URL=
MEDIA_LOCAL_OPENAI_API_KEY=
28 changes: 22 additions & 6 deletions scripts/bootstrap_local.sh
Original file line number Diff line number Diff line change
Expand Up @@ -32,15 +32,31 @@ fi

if kie_repo_is_git_checkout "$KIE_ROOT"; then
if kie_repo_refresh_remote "$KIE_ROOT"; then
declare -A KIE_STATUS=()
kie_status_state=""
kie_status_upstream=""
kie_status_behind="0"
kie_status_dirty="false"
while IFS='=' read -r key value; do
[[ -n "$key" ]] || continue
KIE_STATUS["$key"]="$value"
case "$key" in
state)
kie_status_state="$value"
;;
upstream)
kie_status_upstream="$value"
;;
behind)
kie_status_behind="$value"
;;
dirty)
kie_status_dirty="$value"
;;
esac
done < <(kie_repo_status_summary "$KIE_ROOT")

if [[ "${KIE_STATUS[state]:-}" == "ok" && "${KIE_STATUS[behind]:-0}" != "0" ]]; then
echo "Existing kie-api checkout is behind ${KIE_STATUS[upstream]:-origin} by ${KIE_STATUS[behind]} commit(s)."
if [[ "${KIE_STATUS[dirty]:-false}" == "true" ]]; then
if [[ "$kie_status_state" == "ok" && "$kie_status_behind" != "0" ]]; then
echo "Existing kie-api checkout is behind ${kie_status_upstream:-origin} by ${kie_status_behind} commit(s)."
if [[ "$kie_status_dirty" == "true" ]]; then
echo "Local kie-api changes are present, so bootstrap will not update it automatically."
echo "Update it manually when ready:"
echo " git -C \"$KIE_ROOT\" fetch --prune origin && git -C \"$KIE_ROOT\" pull --ff-only"
Expand Down Expand Up @@ -113,7 +129,7 @@ MEDIA_PRICING_CACHE_HOURS=6
KIE_API_KEY=
OPENROUTER_API_KEY=
OPENROUTER_BASE_URL=https://openrouter.ai/api/v1
MEDIA_LOCAL_OPENAI_BASE_URL=http://127.0.0.1:8080/v1
MEDIA_LOCAL_OPENAI_BASE_URL=
MEDIA_LOCAL_OPENAI_API_KEY=
EOF
echo "Created .env with local defaults and a unique control token."
Expand Down
10 changes: 5 additions & 5 deletions scripts/onboard_linux.sh
Original file line number Diff line number Diff line change
Expand Up @@ -170,11 +170,11 @@ fi

echo
echo "Current setup summary"
echo " - KIE API key: $( [[ \"$kie_status\" == \"configured\" ]] && echo Ready || echo Not\\ set\\ up )"
echo " - Live submit: $( [[ \"$live_status\" == \"enabled\" ]] && echo Ready || echo Not\\ set\\ up )"
echo " - Codex Local: $( [[ \"$(codex_local_status_label)\" == \"ready\" ]] && echo Ready || ([[ \"$(codex_local_status_label)\" == \"login needed\" ]] && echo Connecting || echo Not\\ set\\ up) )"
echo " - OpenRouter: $( [[ \"$openrouter_status\" == \"configured\" ]] && echo Ready || echo Not\\ set\\ up )"
echo " - Local OpenAI-compatible: $( [[ -n "$(env_value MEDIA_LOCAL_OPENAI_BASE_URL)" ]] && echo Connecting || echo Not\\ set\\ up )"
echo " - KIE API key: $( [[ \"$kie_status\" == \"configured\" ]] && echo Ready || echo "Not set up" )"
echo " - Live submit: $( [[ \"$live_status\" == \"enabled\" ]] && echo Ready || echo "Not set up" )"
echo " - Codex Local: $( [[ \"$(codex_local_status_label)\" == \"ready\" ]] && echo Ready || ([[ \"$(codex_local_status_label)\" == \"login needed\" ]] && echo Connecting || echo "Not set up") )"
echo " - OpenRouter: $( [[ \"$openrouter_status\" == \"configured\" ]] && echo Ready || echo "Not set up" )"
echo " - Local OpenAI-compatible: $( [[ -n "$(env_value MEDIA_LOCAL_OPENAI_BASE_URL)" ]] && echo Connecting || echo "Not set up" )"
echo " - Local OpenAI base URL: $(env_value MEDIA_LOCAL_OPENAI_BASE_URL)"
echo
echo "Next commands"
Expand Down
10 changes: 5 additions & 5 deletions scripts/onboard_mac.sh
Original file line number Diff line number Diff line change
Expand Up @@ -610,11 +610,11 @@ fi

echo
echo "Current setup summary"
echo " - KIE API key: $( [[ -n "$(env_value KIE_API_KEY)" ]] && echo Ready || echo Not\\ set\\ up )"
echo " - Live submit: $( [[ "$(env_value MEDIA_ENABLE_LIVE_SUBMIT)" == "true" ]] && echo Ready || echo Not\\ set\\ up )"
echo " - Codex Local: $( [[ "$(codex_local_status_label)" == "ready" ]] && echo Ready || ([[ "$(codex_local_status_label)" == "login needed" ]] && echo Connecting || echo Not\\ set\\ up) )"
echo " - OpenRouter: $( [[ -n "$(env_value OPENROUTER_API_KEY)" ]] && echo Ready || echo Not\\ set\\ up )"
echo " - Local OpenAI-compatible: $( [[ -n "$(env_value MEDIA_LOCAL_OPENAI_BASE_URL)" ]] && echo Connecting || echo Not\\ set\\ up )"
echo " - KIE API key: $( [[ -n "$(env_value KIE_API_KEY)" ]] && echo Ready || echo "Not set up" )"
echo " - Live submit: $( [[ "$(env_value MEDIA_ENABLE_LIVE_SUBMIT)" == "true" ]] && echo Ready || echo "Not set up" )"
echo " - Codex Local: $( [[ "$(codex_local_status_label)" == "ready" ]] && echo Ready || ([[ "$(codex_local_status_label)" == "login needed" ]] && echo Connecting || echo "Not set up") )"
echo " - OpenRouter: $( [[ -n "$(env_value OPENROUTER_API_KEY)" ]] && echo Ready || echo "Not set up" )"
echo " - Local OpenAI-compatible: $( [[ -n "$(env_value MEDIA_LOCAL_OPENAI_BASE_URL)" ]] && echo Connecting || echo "Not set up" )"
echo
echo "Next steps"
echo " - Start later: Start Media Studio.command"
Expand Down
2 changes: 1 addition & 1 deletion scripts/onboard_windows.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ MEDIA_PRICING_CACHE_HOURS=6
KIE_API_KEY=
OPENROUTER_API_KEY=
OPENROUTER_BASE_URL=https://openrouter.ai/api/v1
MEDIA_LOCAL_OPENAI_BASE_URL=$DefaultLocalOpenAiBaseUrl
MEDIA_LOCAL_OPENAI_BASE_URL=
MEDIA_LOCAL_OPENAI_API_KEY=
"@
Set-Content -Path $EnvFile -Value $envTemplate
Expand Down