fix(installer): one-command keyless install with proper flag handling (P0-1) - #122
Open
venkateshsakamuri-lab wants to merge 6 commits into
Open
venkateshsakamuri-lab wants to merge 6 commits into
venkateshsakamuri-lab wants to merge 6 commits into
Conversation
Major changes to install.sh: - Allow keyless start: stack runs without LLM key, configurable later in Settings - Env vars override .env placeholders (fixes the precedence bug) - Add --help, --version, --non-interactive, --seed-demo, --no-seed-demo, --fresh, --project-name flags - TTY-aware prompts: prompt via /dev/tty if available, never block without TTY - Print NEEDS_USER_INPUT for missing optional inputs in non-interactive mode - Auto-generate admin password if not provided - Fix: print login email instead of 'username: admin' - Detect Docker permission error and print exact fix - Warn on reinstall with existing volumes (offer --fresh) - Demo seeding now defaults to ON Major changes to remote-install.sh: - Now runs install end-to-end by default (was just clone + print instructions) - Latest release detection retries, then falls back to git ls-remote - Fails loudly if release detection fails (no silent fallback to main) - Pass through all flags to install.sh - Renamed --branch to --ref for clarity Fixes P0-1: the one-liner now performs the full install. Co-authored-by: Venkat SF <venkatesh.sakamuri@stayflexi.com>
- README.md: add 'For AI agents' section with exact non-interactive command - docs/llms-full.txt: create AI agent runbook with correct health URL (/api/actuator/health not /actuator/health) - docs/llms.txt: create short version for quick reference - docs/QUICKSTART.md: rewrite for current install flow (was stale: Java 17, start-backend.sh, NEXT_PUBLIC_API_URL) Fixes P1 item: llms-full.txt health URL 404s. Co-authored-by: Venkat SF <venkatesh.sakamuri@stayflexi.com>
- Add shellcheck job to lint installer scripts - Add installer-args job to smoke test --help, --version, unknown arg handling - Fix shellcheck SC1090 warnings in status.sh and smoke-test.sh (move directive immediately before source command) Co-authored-by: Venkat SF <venkatesh.sakamuri@stayflexi.com>
…ss start P0-1 installer fixes: - Use DEEPSQL_LLM_API_KEY as the primary documented env var name (DEEPSQL_CHAT_API_KEY remains as backend alias) - Allow agent container to start without LLM key in degraded mode - Replace 'Settings → AI Provider' references with 'during onboarding in the web UI' - Update NEEDS_USER_INPUT line to use DEEPSQL_LLM_API_KEY Files updated: - scripts/self-host/install.sh: Env var aliasing, keyless start messages - scripts/self-host/remote-install.sh: Updated env var names in docs/examples - agent/docker-entrypoint.sh: Allow keyless start in degraded mode - README.md, docs/QUICKSTART.md, docs/llms*.txt: Updated env var names - scripts/self-host/bootstrap-server.sh: Updated env var guidance Tested: Full Docker e2e with keyless start - all services healthy. Co-authored-by: Venkat SF <venkatesh.sakamuri@stayflexi.com>
When remote-install.sh is piped to bash, child commands (git clone/fetch, install.sh) could consume stdin and swallow the rest of the script. Fixes: - Add </dev/null to git clone/fetch/checkout commands - Redirect install.sh stdin from /dev/null when not running in a TTY Co-authored-by: Venkat SF <venkatesh.sakamuri@stayflexi.com>
- can_prompt() now checks if /dev/tty is actually accessible, not just exists - Print NEEDS_USER_INPUT when no TTY available (piped via setsid) Co-authored-by: Venkat SF <venkatesh.sakamuri@stayflexi.com>
venkateshsakamuri-lab
marked this pull request as ready for review
September 26, 2026 09:10
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
P0-1 Installer Overhaul — Keyless One-Command Install
This PR addresses the P0-1 launch blocker: a new user runs ONE command (
curl -fsSL https://deepsql.ai/install.sh | bash), provides ONLY an LLM key (optional), and lands in a working product. AI agents can do the same non-interactively.Summary of Changes
1. Environment Variable Naming
DEEPSQL_LLM_API_KEYis now the primary documented name (matches spec and evangelist docs)DEEPSQL_CHAT_API_KEYremains as a backend alias for compatibilityDEEPSQL_LLM_PROVIDER,DEEPSQL_LLM_BASE_URL,DEEPSQL_LLM_MODEL2. Keyless Start Support
3. Piped Execution Fixes
</dev/nullon git commands and install.sh exec)setsid)--help,--no-seed-demo,--project-name)4. Documentation Updates
Acceptance Test Results
Test 1: Piped one-liner, no TTY, defaults
setsid bash -c 'cat /workspace/scripts/self-host/remote-install.sh | bash -s'Result: PASS
All services healthy:
Test 2: Env-var key path
DEEPSQL_LLM_API_KEY=sk-dummy-test setsid bash -c 'cat remote-install.sh | bash -s'Result: PASS
NEEDS_USER_INPUTprinted when key is provided ✓DEEPSQL_CHAT_API_KEY=***MASKED***✓Test 3a: --help through pipe
cat remote-install.sh | setsid bash -s -- --helpResult: PASS (exit 0, no install)
Test 3b: Flags honored through pipe
DEEPSQL_INITIAL_ADMIN_EMAIL=test@deepsql.local cat remote-install.sh | \ setsid bash -s -- --non-interactive --no-seed-demo --project-name deepsql-testResult: PASS
--no-seed-demohonored:Demo data seeding skipped (--no-seed-demo).--project-name deepsql-testhonored:Project: deepsql-testdeepsql-test-*✓Test 4: Reinstall warning with existing volumes
Result: PASS
Files Changed
scripts/self-host/install.sh— Env var aliasing, keyless start, TTY detection fixscripts/self-host/remote-install.sh— Stdin protection for piped executionagent/docker-entrypoint.sh— Allow keyless start with placeholder keyREADME.md— Updated "For AI agents" sectiondocs/QUICKSTART.md— Updated keyless start docsdocs/llms-full.txt/docs/llms.txt— Updated AI agent runbookscripts/self-host/bootstrap-server.sh— Updated env var guidanceAcceptance Criteria