Skip to content

fix(install): show progress and shell activation instructions - #2744

Open
fengmk2 wants to merge 18 commits into
mainfrom
feat/shell-activation
Open

fengmk2 wants to merge 18 commits into
mainfrom
feat/shell-activation

Conversation

@fengmk2

@fengmk2 fengmk2 commented Sep 19, 2026

Copy link
Copy Markdown
Member

Installation can stay silent while dependencies install. Setup also leaves the current terminal on its previous PATH. The installer now shows progress and a shell command that activates the installation.

VP_SHELL selects the activation command. On macOS and Linux, setup uses $SHELL as a fallback hint and labels the command for that shell. If neither value identifies a shell, optional shell instructions appear only when the executable is available on PATH. The PowerShell installer selects PowerShell unless the caller sets VP_SHELL.

Profile guidance depends on the selected shell and its existing configuration. Bash guidance distinguishes interactive non-login sessions from login sessions. Zsh requires a source entry in .zshrc. Unknown shells retain conditional instructions. PowerShell retains the $PROFILE instruction.

PowerShell activation moves one shim directory entry to the front of PATH. The installer preserves the caller's $ErrorActionPreference. The wrapper handles native stderr in PowerShell 5.1 and restores temporary environment variables even if the command fails.

An interactive terminal shows one changing status line during preparation, downloads, and dependency installation. Downloads show measured bytes, speed, and remaining time when the server supplies a total. Other phases show a spinner with elapsed time. CI and piped output use plain phase messages. Failures clear the status before the error. If pnpm fails, the installer saves its output in upgrade.log.

Installation progress

Each block shows a later state of the same terminal. Durations and download sizes are examples.

Preparation:

info: installing vite-plus@<version>...
⠋ Preparing Node.js and pnpm... 2s

A required download replaces the preparation status:

info: installing vite-plus@<version>...
⠹ Downloading node v22.18.0... [#######>---] 21.00 MiB/30.00 MiB (7.00 MiB/s, 1s)

The preparation status returns while the installer extracts the download. After preparation, the status changes:

info: installing vite-plus@<version>...
⠸ Installing dependencies... 8s

On success, the installer clears the status and continues with setup:

info: installing vite-plus@<version>...
✓ Dependencies installed.
Setup:
  Preparing vite-plus environment.

CI and piped output contain plain phase messages:

info: installing vite-plus@<version>...
info: Preparing Node.js and pnpm...
info: Installing dependencies...
✓ Dependencies installed.

The existing quiet options suppress the added status messages.

The output excerpts below use <config> for the configuration directory and <bin> for the shim directory. <system> represents the previous Node directory. The actual output uses resolved paths with shell-specific escaping. The examples use explicit VP_SHELL values unless stated otherwise.

Bash

When .bashrc does not load this installation:

Next Steps:
  Activate Vite+ in this terminal:
  . "<config>/env"

  Add the command to ~/.bashrc for interactive non-login Bash sessions.
  Login Bash shells must also load the command through their login profile.

When .bashrc already loads this installation:

  Or start an interactive non-login Bash shell to load your configured ~/.bashrc.
  Login Bash shells must also load the command through their login profile.

After the user runs the source command in the same terminal:

$ command -v node
<system>/node
$ . "<config>/env"
$ command -v node
<bin>/node
Zsh

When VP_SHELL is unset and $SHELL is /bin/zsh:

Next Steps:
  For Zsh, run:
  . "<config>/env"

  If your .zshrc does not already load Vite+, add this command.

The profile instruction remains conditional because the login shell can differ from the current shell.

When VP_SHELL=zsh and .zshrc does not load this installation:

Next Steps:
  Activate Vite+ in this terminal:
  . "<config>/env"

  Add the command to your .zshrc file to activate future Zsh terminals.

After the user runs the source command in the same terminal:

$ command -v node
<system>/node
$ . "<config>/env"
$ command -v node
<bin>/node
Fish
Next Steps:
  Activate Vite+ in this terminal:
  source "<config>/env.fish"

  Add the command for your shell to its profile to activate future terminals.

After the user runs the source command in the same terminal:

$ command -v node
<system>/node
$ source "<config>/env.fish"
$ command -v node
<bin>/node
Nushell
Next Steps:
  Activate Vite+ in this terminal:
  source "<config>/env.nu"

  Add the command for your shell to its profile to activate future terminals.

After the user runs the source command in the same terminal:

> which node | first | get path
<system>/node
> source "<config>/env.nu"
> which node | first | get path
<bin>/node

An entry in .zshenv alone does not suppress Zsh profile guidance. For configured Zsh, Fish, and Nushell profiles, setup prints:

  Or open a new terminal to load your configured shell profile.
PowerShell
Next Steps:
  Activate Vite+ in this terminal:
  . '<config>/env.ps1'

  Add this command to $PROFILE if it is not already there, for future PowerShell sessions.

The profile instruction remains conditional because setup does not inspect $PROFILE.

Activation gives the shim priority even when its directory already appears later in PATH:

PS> (Get-Command node).Source
<system>/node.exe
PS> . '<config>/env.ps1'
PS> (Get-Command node).Source
<bin>/node.exe
Unknown shell

On macOS or Linux, when neither VP_SHELL nor $SHELL identifies a supported shell and no optional shells are available:

Next Steps:
  Activate Vite+ in this terminal:
  Bash/Zsh: . "<config>/env"

  If your shell profile does not already load Vite+, add the command for your shell.

Setup adds Fish, Nushell, or PowerShell commands only when their executables are available on PATH. The $PROFILE instruction appears only with the PowerShell command. An entry for another shell does not remove the conditional profile instruction.

cmd.exe

The command updates the current session. The instructions remain valid when setup does not save a persistent PATH change.

Next Steps:
  Activate Vite+ in this terminal:
  set "PATH=<bin>;%PATH%"

  For future cmd.exe sessions, add this directory to your user PATH if it is missing:
  <bin>
  System Properties -> Environment Variables -> User variables -> Path
  Open a new terminal after updating PATH.

Each setup output ends with:

  Restart an already-running IDE to load its environment. Run `vp env doctor` to verify.

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Sep 19, 2026

Copy link
Copy Markdown

🚀 Deploying Preview to Cloudflare 🚀

Preview URL: https://feat-shell-activation-viteplus-dev.voidzero-docs.workers.dev (commit e89908d)

This URL reflects your latest Preview deployment

Preview Deployments by commit

Status Deployment URL Commit Updated (UTC) See this deployment's details
  • Build: Success ✅
  • Deployment: Success ✅

View logs ↗
https://773ffb85-viteplus-dev.voidzero-docs.workers.dev e89908d 2026-09-20T15:36:48.499Z Visit the dashboard ↗
  • Build: Success ✅
  • Deployment: Success ✅

View logs ↗
https://a852c389-viteplus-dev.voidzero-docs.workers.dev cd92f02 2026-09-20T15:07:36.966Z Visit the dashboard ↗
  • Build: Success ✅
  • Deployment: Success ✅

View logs ↗
https://a8e6f333-viteplus-dev.voidzero-docs.workers.dev 25c641a 2026-09-20T14:56:34.262Z Visit the dashboard ↗
  • Build: Success ✅
  • Deployment: Success ✅

View logs ↗
https://f8ed79a6-viteplus-dev.voidzero-docs.workers.dev c7f9d3b 2026-09-20T14:17:47.637Z Visit the dashboard ↗
  • Build: Success ✅
  • Deployment: Success ✅

View logs ↗
https://0e45b2f5-viteplus-dev.voidzero-docs.workers.dev 601f79a 2026-09-20T03:08:52.987Z Visit the dashboard ↗
  • Build: Success ✅
  • Deployment: Success ✅

View logs ↗
https://b48af767-viteplus-dev.voidzero-docs.workers.dev a2eb83d 2026-09-19T17:05:51.291Z Visit the dashboard ↗
  • Build: Success ✅
  • Deployment: Success ✅

View logs ↗
https://161e81a3-viteplus-dev.voidzero-docs.workers.dev d3c401b 2026-09-19T15:57:45.083Z Visit the dashboard ↗
  • Build: Success ✅
  • Deployment: Success ✅

View logs ↗
https://5f0286f6-viteplus-dev.voidzero-docs.workers.dev f89ebd9 2026-09-19T15:47:29.759Z Visit the dashboard ↗
  • Build: Success ✅
  • Deployment: Success ✅

View logs ↗
https://141b1117-viteplus-dev.voidzero-docs.workers.dev 7377e48 2026-09-19T15:22:19.797Z Visit the dashboard ↗
  • Build: Success ✅
  • Deployment: Success ✅

View logs ↗
https://59fd48e3-viteplus-dev.voidzero-docs.workers.dev 7fbc81a 2026-09-19T08:18:48.002Z Visit the dashboard ↗

View all previews: View all previews ↗

@github-actions

github-actions Bot commented Sep 19, 2026

Copy link
Copy Markdown
Contributor

✅ Staging deployment successful!

Preview: https://viteplus-staging.void.app/
Commit: e89908d

@github-actions

github-actions Bot commented Sep 19, 2026

Copy link
Copy Markdown
Contributor

CLI artifact sizes (e89908d)

Final release artifacts built by the canonical build-upstream and build-windows-cli actions.
The dist rows use the Linux build. The core total excludes .node files to match the release artifact.

Artifact Format Base PR Change
packages/cli/dist Directory total 2.15 MiB 2.15 MiB +3 B (+0.00%)
packages/core/dist Directory total 3.95 MiB 3.95 MiB 0 B (0.00%)
Combined package dist Directory total 6.10 MiB 6.10 MiB +3 B (+0.00%)
vp (Linux x64) Binary 11.23 MiB 11.26 MiB +28.00 KiB (+0.24%)
vp (Linux x64) gzip -9 4.86 MiB 4.87 MiB +9.86 KiB (+0.20%)
NAPI (Linux x64) Binary 32.03 MiB 32.04 MiB +12.00 KiB (+0.04%)
NAPI (Linux x64) gzip -9 12.70 MiB 12.70 MiB +2.21 KiB (+0.02%)
vp (macOS ARM64) Binary 8.38 MiB 8.39 MiB +16.20 KiB (+0.19%)
vp (macOS ARM64) gzip -9 4.24 MiB 4.25 MiB +13.41 KiB (+0.31%)
NAPI (macOS ARM64) Binary 39.66 MiB 39.66 MiB +16 B (+0.00%)
NAPI (macOS ARM64) gzip -9 17.01 MiB 17.01 MiB -1.16 KiB (-0.01%)
vp (Windows x64) Binary 9.10 MiB 9.13 MiB +22.50 KiB (+0.24%)
vp (Windows x64) gzip -9 3.98 MiB 3.99 MiB +13.52 KiB (+0.33%)
NAPI (Windows x64) Binary 26.99 MiB 27.00 MiB +8.50 KiB (+0.03%)
NAPI (Windows x64) gzip -9 10.80 MiB 10.81 MiB +5.52 KiB (+0.05%)
Trampoline (Windows x64) Binary 13.50 KiB 13.50 KiB 0 B (0.00%)
Trampoline (Windows x64) gzip -9 7.03 KiB 7.03 KiB 0 B (0.00%)
Installer (Windows x64) Binary 4.55 MiB 4.56 MiB +12.00 KiB (+0.26%)
Installer (Windows x64) gzip -9 2.13 MiB 2.13 MiB +6.49 KiB (+0.30%)

@fengmk2 fengmk2 changed the title feat(env): add shell activation guidance and reminders fix(env): clarify current-shell setup instructions Sep 19, 2026
@fengmk2 fengmk2 added test: e2e Auto run e2e tests test: install-e2e run vite install e2e test test: create-e2e Run `vp create` e2e tests test: sfw labels Sep 19, 2026
@fengmk2
fengmk2 force-pushed the feat/shell-activation branch from d2d087c to 2ee4407 Compare September 19, 2026 04:17
@fengmk2 fengmk2 self-assigned this Sep 19, 2026
@fengmk2 fengmk2 added the preview-build Publish this PR's commits to the registry bridge as preview builds label Sep 19, 2026
@github-actions

github-actions Bot commented Sep 19, 2026

Copy link
Copy Markdown
Contributor

Registry bridge build (cd92f02)

This commit build is published to the registry bridge, which serves these as ordinary npm versions (every other package proxies to npmjs):

Package Version
vite-plus 0.0.0-commit.cd92f0241b0efab9b254fac1d58061cb4cccb517
@voidzero-dev/vite-plus-core 0.0.0-commit.cd92f0241b0efab9b254fac1d58061cb4cccb517

Install the Vite+ CLI built from this commit, then migrate a project:

# macOS / Linux
curl -fsSL https://raw.githubusercontent.com/voidzero-dev/vite-plus/cd92f0241b0efab9b254fac1d58061cb4cccb517/packages/cli/install.sh | VP_PR_VERSION=2744 VP_LEGACY_INSTALLER_URL=https://raw.githubusercontent.com/voidzero-dev/vite-plus/cd92f0241b0efab9b254fac1d58061cb4cccb517/packages/cli/install-legacy.sh bash
# Windows (PowerShell)
$env:VP_PR_VERSION="2744"; $env:VP_LEGACY_INSTALLER_URL="https://raw.githubusercontent.com/voidzero-dev/vite-plus/cd92f0241b0efab9b254fac1d58061cb4cccb517/packages/cli/install-legacy.ps1"; irm https://raw.githubusercontent.com/voidzero-dev/vite-plus/cd92f0241b0efab9b254fac1d58061cb4cccb517/packages/cli/install.ps1 | iex

Or download the standalone Windows installer built from this commit:

Architecture Installer
x64 vp-setup-x86_64-pc-windows-msvc.exe
Arm64 vp-setup-aarch64-pc-windows-msvc.exe

GitHub requires you to sign in and downloads each installer as a ZIP artifact. Extract vp-setup.exe, then run it against this preview build:

.\vp-setup.exe --version "0.0.0-commit.cd92f0241b0efab9b254fac1d58061cb4cccb517" --registry "https://registry-bridge.viteplus.dev/"

After installing, upgrade the current project's vite-plus to this test build with:

vp migrate

Or point your package manager at the bridge registry https://registry-bridge.viteplus.dev/:

Package manager Registry config
npm / pnpm / Bun .npmrc: registry=https://registry-bridge.viteplus.dev/
Yarn (v2+) .yarnrc.yml: npmRegistryServer: "https://registry-bridge.viteplus.dev/"

Then pin the build (vite aliases to vite-plus-core; pnpm can use a catalog, npm an overrides entry):

{
  "devDependencies": {
    "vite-plus": "0.0.0-commit.cd92f0241b0efab9b254fac1d58061cb4cccb517",
    "vite": "npm:@voidzero-dev/vite-plus-core@0.0.0-commit.cd92f0241b0efab9b254fac1d58061cb4cccb517"
  }
}

@github-actions

Copy link
Copy Markdown
Contributor

🐳 Docker preview image

Built from this PR's registry bridge build:

Image Compressed size
ghcr.io/voidzero-dev/vite-plus:pr-2744 223MB
# remove any stale local copy from a previous run, then pull fresh
docker rmi ghcr.io/voidzero-dev/vite-plus:pr-2744 2>/dev/null; docker pull ghcr.io/voidzero-dev/vite-plus:pr-2744

Quick check:

docker run --rm ghcr.io/voidzero-dev/vite-plus:pr-2744 vp --version

See docs/guide/docker.md for usage.

@fengmk2 fengmk2 added preview-build Publish this PR's commits to the registry bridge as preview builds and removed preview-build Publish this PR's commits to the registry bridge as preview builds labels Sep 19, 2026
@fengmk2
fengmk2 marked this pull request as ready for review September 19, 2026 16:01
@fengmk2
fengmk2 force-pushed the feat/shell-activation branch from a2eb83d to 601f79a Compare September 20, 2026 03:07
@fengmk2
fengmk2 force-pushed the feat/shell-activation branch from 601f79a to c7f9d3b Compare September 20, 2026 14:16
@fengmk2
fengmk2 requested a review from cpojer September 20, 2026 14:21
@fengmk2 fengmk2 added preview-build Publish this PR's commits to the registry bridge as preview builds and removed preview-build Publish this PR's commits to the registry bridge as preview builds labels Sep 20, 2026
@fengmk2 fengmk2 changed the title fix(env): clarify current-shell setup instructions fix(install): show progress and shell activation instructions Sep 20, 2026
@fengmk2 fengmk2 added preview-build Publish this PR's commits to the registry bridge as preview builds and removed preview-build Publish this PR's commits to the registry bridge as preview builds labels Sep 20, 2026
@fengmk2 fengmk2 added preview-build Publish this PR's commits to the registry bridge as preview builds and removed preview-build Publish this PR's commits to the registry bridge as preview builds labels Sep 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

preview-build Publish this PR's commits to the registry bridge as preview builds test: create-e2e Run `vp create` e2e tests test: e2e Auto run e2e tests test: install-e2e run vite install e2e test test: sfw

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants