Skip to content

feat: add interactive env setup wizard#2124

Open
embire2 wants to merge 1 commit into
stackblitz-labs:mainfrom
embire2:feat/autonomous-configuration-2101
Open

feat: add interactive env setup wizard#2124
embire2 wants to merge 1 commit into
stackblitz-labs:mainfrom
embire2:feat/autonomous-configuration-2101

Conversation

@embire2

@embire2 embire2 commented Feb 10, 2026

Copy link
Copy Markdown

Summary

This adds an optional, dependency-free setup wizard to make initial local configuration more "autonomous" and repeatable (env init + prompts), per #2101.

What’s Included

  • pnpm run setup (interactive by default)
  • scripts/setup.mjs:
    • --init create .env.local from .env.example (no overwrite unless --force)
    • --sync copy .env.local.env (Docker Compose compatibility)
    • --list list known env keys parsed from .env.example
    • --set KEY=VALUE / --unset KEY for non-interactive updates
    • interactive prompts for any keys (with hidden input for likely-secret keys)
  • README: a short pointer to the setup wizard in the Docker env section

Why

New installs currently require manual copying/editing of env files. This change adds a single, discoverable command that can:

  • initialize the expected env files
  • optionally sync for Docker
  • prompt for keys/values in one place

This is intentionally lightweight and avoids new dependencies.

Testing

  • pnpm test
  • Local end-to-end smoke: start dev server and POST /api/chat using OpenAI with a chat-capable model (gpt-4o), verifying streamed output contained the expected marker.

Closes #2101.

DevFlex-AI pushed a commit to riftsh/wisp.dev that referenced this pull request Jun 3, 2026
Adapted from upstream bolt.diy PR stackblitz-labs#2124 with improvements:
- Preserve original key casing (don't force-uppercase)
- Case-insensitive key matching with correction messages
- Fallback for readline hidden input if private API unavailable
- Extracted promptAndSetKey helper for cleaner wizard flow

Features:
- Interactive wizard with hidden input for secrets
- --init/--sync/--list/--set/--unset CLI flags
- Docker Compose env sync (.env.local -> .env)
- Zero dependencies (pure Node built-ins)
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.

Autonomous configuration

2 participants