Skip to content

feat: Smart online installer — auto-detect RVSconfig.yml, interactive URL/paste/wizard prompt #4

Description

@PhilippWu

Summary

The online installer (install.sh) currently expects the user to paste their RVSconfig.yml content directly into the terminal. This works but creates friction for users who don't have a config yet, and offers no convenience shortcut for those who store their config remotely.

This issue proposes making the installer intelligently resolve its config source through a clear priority chain — covering all scenarios from zero-config first-time users to power users with a centrally stored config.


Proposed Behavior — Four-path Config Resolution

The installer resolves configuration through the following priority chain, in order:

Path 1 — RVSconfig.yml already present on disk

If /etc/dev-server/RVSconfig.yml (or ./RVSconfig.yml in the working directory) already exists, the installer uses it directly and skips all prompts.

install.sh → detects RVSconfig.yml on disk → proceeds immediately

Covers: re-runs, partial installs, pre-provisioned images, file transferred via SCP.


Path 2 — User enters a URL at the interactive prompt

If no config file is found on disk, the installer shows a single prompt:

No RVSconfig.yml found.
Enter a URL to download your config, paste the config content directly, or press Enter to use the setup wizard:
>

If the user types or pastes a URL (detected by http:// or https:// prefix), the installer:

  • Downloads the URL with curl
  • Validates it is well-formed YAML with the expected top-level keys
  • Aborts with a clear error if the download fails or the file is malformed
  • Proceeds with the downloaded config on success

Covers: users who store their config in a private Gist, a Hetzner Object Storage bucket, or any HTTPS endpoint — copy the URL, paste it into the prompt, done.


Path 3 — User pastes RVSconfig.yml content at the interactive prompt (current behavior)

Using the same prompt as Path 2, if the user pastes multi-line YAML content (not a URL), the installer captures it as the config directly.

> [user pastes YAML content, presses Ctrl+D]
→ validate → write to /etc/dev-server/RVSconfig.yml → proceed

This is the current workflow and must be preserved as-is. It is the natural path for users who have run the local configurator, copied the output, and are now setting up their VPS via SSH or the VPS provider console.


Path 4 — No input → embedded interactive wizard

If the user presses Enter without providing any input (empty response), the installer launches an embedded interactive wizard directly in the terminal.

> [Enter pressed — no input]
→ "Starting setup wizard…"
→ wizard prompts for domain, Cloudflare, password, AI agents
→ writes RVSconfig.yml → proceeds automatically

The wizard covers:

Covers: users who run the one-liner on a fresh VPS with no prior local setup.


UX Flow Summary

curl -fsSL .../install.sh | bash
         │
         ├─ RVSconfig.yml on disk? ──────────────────────────────────► use it
         │
         └─ prompt: "Enter URL, paste config, or press Enter for wizard"
                    │
                    ├─ URL entered/pasted ──► download & validate ───► use it
                    │
                    ├─ YAML content pasted ──► validate ─────────────► use it
                    │
                    └─ Enter (empty) ──► wizard ──► write file ──────► use it

Acceptance Criteria

  • Installer detects RVSconfig.yml on disk and skips all prompts
  • Single interactive prompt handles all three non-disk input cases
  • URL input (http/https prefix) triggers download + validation
  • Multi-line YAML paste is captured and validated as config content
  • Empty Enter triggers the embedded wizard
  • Wizard covers all required config fields and writes RVSconfig.yml before proceeding
  • YAML validation applied consistently across all paths
  • Clear error messages for: download failure, malformed YAML, missing required fields
  • Works with plain bash, curl, and jq only — no additional dependencies

Notes

  • The single prompt replacing Paths 2–4 keeps the UX minimal: one question, three possible inputs
  • URL detection via https?:// prefix is unambiguous — no conflict with YAML content
  • The embedded wizard can be a simplified bash-only version; Python/Node may not be installed yet at the time install.sh runs
  • Path 3 (paste YAML) is the current default — must feel natural, not like a fallback

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions