Skip to content

Add setup.ps1 for native Windows/PowerShell support #11

Description

@theDakshJaitly

Summary

setup.sh is bash-only. Windows users currently need WSL or Git Bash to run setup (see #10). A native PowerShell script would make onboarding seamless on Windows.

Full docs: https://launchx.page/mex/docs

What needs to happen

Port setup.sh to setup.ps1 with the same flow:

  1. Build the CLI (npm install && npm run build)
  2. Detect project state (existing codebase / fresh project / partial scaffold)
  3. Tool config selection (copy from .tool-configs/ to project root)
  4. Pre-analyze codebase via mex init --json (if CLI built successfully)
  5. Print or run the population prompt

Scope

  • Same user-facing behavior as setup.sh
  • Use PowerShell-native equivalents (Write-Host with colors, Test-Path, etc.)
  • The banner/spinner are nice-to-have — core flow is the priority
  • Must handle the same edge cases: running from wrong directory, missing Node.js, existing files (overwrite prompt)

Reference

  • setup.sh — the source of truth (~275 lines of actual logic, rest is the prompt string)
  • sync.sh and update.sh — these could be ported later, not part of this issue

Acceptance criteria

  • setup.ps1 runs on PowerShell 5.1+ and PowerShell Core 7+
  • Same 6-step flow as setup.sh
  • --dry-run and --help flags work
  • Tested on Windows 10/11 without WSL

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requesthelp wantedExtra attention is needed

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions