vite-plus 0.3.1 → 0.3.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (63) hide show
  1. package/README.md +1 -1
  2. package/bin/vp +1 -1
  3. package/binding/index.cjs +137 -56
  4. package/binding/index.d.cts +52 -0
  5. package/dist/{agent-C5jMYVfB.js → agent-Cu6-tXIP.js} +2 -2
  6. package/dist/bin.js +6 -5
  7. package/dist/config/bin.js +2 -2
  8. package/dist/{constants-0IAVgpox.js → constants-C2dTOTe-.js} +2 -2
  9. package/dist/create/bin.js +97 -68
  10. package/dist/{define-config-DIE9de46.cjs → define-config-D0mevyb3.cjs} +1 -1
  11. package/dist/{define-config-U3_xg7i-.js → define-config-IgzmnvvV.js} +2 -2
  12. package/dist/define-config.cjs +1 -1
  13. package/dist/define-config.js +1 -1
  14. package/dist/{editor-B5-lvRaU.js → editor-4sjlHmUh.js} +154 -36
  15. package/dist/index.cjs +1 -1
  16. package/dist/index.js +1 -1
  17. package/dist/lint-plugins-dev.d.ts +3 -0
  18. package/dist/lint-plugins-dev.js +2 -0
  19. package/dist/lint-plugins.cjs +21 -0
  20. package/dist/lint-plugins.d.ts +3 -0
  21. package/dist/lint-plugins.js +2 -0
  22. package/dist/migration/bin.js +7 -7
  23. package/dist/{oxlint-plugin-config-Drdl67Xp.js → oxlint-plugin-config-BVqEe9KY.js} +1 -1
  24. package/dist/oxlint-plugin.js +93 -32
  25. package/dist/pack-bin.js +1 -1
  26. package/dist/{package-BZz2Ij68.js → package-CHH8jWan.js} +1 -1
  27. package/dist/{prompts-CtzEgFY-.js → prompts-k14KgthC.js} +1 -1
  28. package/dist/{resolve-vite-config-CGks1xR7.js → resolve-vite-config-BqvS2P98.js} +2 -2
  29. package/dist/{resolve-vite-config-Dnmc-lBc.js → resolve-vite-config-CTOTuqTi.js} +1 -1
  30. package/dist/staged/bin.js +1 -1
  31. package/dist/toolchain.js +8 -8
  32. package/dist/toolchain.json +8 -8
  33. package/dist/{tsconfig-CUggNuJR.js → tsconfig-C3h9CVTA.js} +2 -2
  34. package/dist/{tsconfig-VAbm4ZzJ.js → tsconfig-euB-GmIE.js} +1 -1
  35. package/dist/version.js +2 -2
  36. package/dist/versions.js +4 -4
  37. package/docs/config/fmt.md +4 -2
  38. package/docs/config/lint.md +4 -2
  39. package/docs/config/staged.md +1 -2
  40. package/docs/guide/ci.md +28 -31
  41. package/docs/guide/commit-hooks.md +11 -34
  42. package/docs/guide/create.md +1 -2
  43. package/docs/guide/docker.md +20 -68
  44. package/docs/guide/env.md +56 -22
  45. package/docs/guide/fmt.md +3 -1
  46. package/docs/guide/global-cli.md +426 -0
  47. package/docs/guide/ide-integration.md +1 -2
  48. package/docs/guide/implode.md +14 -1
  49. package/docs/guide/index.md +37 -34
  50. package/docs/guide/install.md +18 -19
  51. package/docs/guide/lint.md +52 -1
  52. package/docs/guide/local-cli.md +123 -0
  53. package/docs/guide/migrate-rules.md +108 -267
  54. package/docs/guide/migrate.md +6 -49
  55. package/docs/guide/monorepo.md +2 -0
  56. package/docs/guide/run.md +1 -1
  57. package/docs/guide/troubleshooting.md +17 -8
  58. package/docs/guide/upgrade-project.md +61 -0
  59. package/docs/guide/upgrade.md +17 -62
  60. package/package.json +26 -17
  61. package/templates/generator/README.md +14 -0
  62. package/templates/generator/bin/index.ts +54 -5
  63. package/docs/guide/installer-env-vars.md +0 -252
@@ -0,0 +1,426 @@
1
+ <script setup lang="ts">
2
+ import { getScrollOffset } from 'vitepress';
3
+ import { nextTick, onMounted, onUnmounted } from 'vue';
4
+
5
+ function openTarget() {
6
+ let target: HTMLElement | null;
7
+ try {
8
+ target = document.getElementById(decodeURIComponent(location.hash.slice(1)));
9
+ } catch {
10
+ return;
11
+ }
12
+ if (!target?.closest('details')) return;
13
+
14
+ for (let details = target.closest('details'); details; details = details.parentElement?.closest('details') ?? null) {
15
+ details.open = true;
16
+ }
17
+
18
+ // VitePress cannot measure a heading inside closed details. Correct the scroll after revealing it.
19
+ requestAnimationFrame(() => {
20
+ if (!target.isConnected) return;
21
+ const top = window.scrollY + target.getBoundingClientRect().top - getScrollOffset()
22
+ + Number.parseInt(window.getComputedStyle(target).paddingTop, 10);
23
+ window.scrollTo(0, top);
24
+ });
25
+ }
26
+
27
+ function onAnchorClick(event: MouseEvent) {
28
+ if (event.button !== 0 || event.ctrlKey || event.metaKey || event.shiftKey || event.altKey) return;
29
+ const link = event.target instanceof Element ? event.target.closest('a') : null;
30
+ // Clicking the current hash again does not emit hashchange.
31
+ if (link?.href === location.href) openTarget();
32
+ }
33
+
34
+ onMounted(async () => {
35
+ window.addEventListener('hashchange', openTarget);
36
+ document.addEventListener('click', onAnchorClick);
37
+ await nextTick();
38
+ openTarget();
39
+ });
40
+
41
+ onUnmounted(() => {
42
+ window.removeEventListener('hashchange', openTarget);
43
+ document.removeEventListener('click', onAnchorClick);
44
+ });
45
+ </script>
46
+
47
+ # Global CLI
48
+
49
+ The global CLI is a standalone `vp` binary for machine-level runtime and package management. It includes a Vite+ toolchain, does not require Node.js to be installed first, and can be used without adding `vite-plus` to a project.
50
+
51
+ Choose the global CLI when you want one command available across projects for any combination of:
52
+
53
+ - managing Node.js and package-manager versions
54
+ - selecting and downloading package managers
55
+ - installing dependencies and running package binaries
56
+ - running `package.json` scripts and cached workspace tasks
57
+ - using the Vite+ frontend toolchain without pinning it in every project
58
+
59
+ Installing the global CLI does not require you to adopt the project-local package. You can use it only for runtime management, package management, and the task runner if that is all you need.
60
+
61
+ ## Install
62
+
63
+ ::: code-group
64
+
65
+ ```bash [macOS / Linux]
66
+ curl -fsSL https://vite.plus | bash
67
+ ```
68
+
69
+ ```powershell [Windows]
70
+ irm https://vite.plus/ps1 | iex
71
+ ```
72
+
73
+ :::
74
+
75
+ On Windows, you can instead download and run [`vp-setup.exe`](https://setup.viteplus.dev).
76
+
77
+ After installation, open a new shell and run:
78
+
79
+ ```bash
80
+ vp help
81
+ ```
82
+
83
+ When you enable environment management during installation, Vite+ records managed mode for Node.js and the npm, pnpm, Yarn, and Bun shims. Run `vp env off` to prefer system tools, or scope the change with `vp env off node` or `vp env off pm`.
84
+
85
+ ::: details Installer Environment Variables & Options
86
+
87
+ The Vite+ installers (`vp-setup.exe`, `install.ps1`, and `install.sh`) and the installed `vp` CLI read the environment variables below.
88
+
89
+ ### Installation Variables
90
+
91
+ These variables control the installer scripts and the standalone Windows installer (`vp-setup.exe`).
92
+
93
+ #### `VP_VERSION`
94
+
95
+ - **Purpose**: Version to install
96
+ - **Default**: `latest`
97
+ - **CLI equivalent**: `--version`
98
+ - **Note**: Vite+ 0.2.x and earlier do not support the split directory layout. The installer always puts these releases in the monolithic root (`VP_HOME` or `~/.vite-plus`). This rule also applies to a fresh machine. The installer checks the downloaded binary and prints a notice.
99
+ - **Example**:
100
+
101
+ ```bash
102
+ # Unix
103
+ curl -fsSL https://vite.plus | VP_VERSION=1.2.3 bash
104
+ ```
105
+
106
+ ```powershell
107
+ # PowerShell
108
+ $env:VP_VERSION = "1.2.3"; irm https://vite.plus/ps1 | iex
109
+ ```
110
+
111
+ #### `VP_HOME`
112
+
113
+ - **Purpose**: Optional pin for the single-root layout. Set it to an absolute path. Vite+ then puts bin, data, cache, config, and state under that directory. The installed CLI reads the same variable. See [Environment](/guide/env).
114
+ - **Default**: unset. Vite+ reuses an existing install in `~/.vite-plus` on Unix or `%USERPROFILE%\.vite-plus` on Windows. The directory must contain a `current` link. Otherwise, a fresh install uses the split platform layout. On Unix, it uses `~/.local/share/vite-plus` and its Vite+-owned `bin` subdirectory. On Windows, it uses `%LOCALAPPDATA%\vite-plus\data` and `%LOCALAPPDATA%\vite-plus\bin`.
115
+ - **Example**:
116
+
117
+ ```bash
118
+ # Unix
119
+ curl -fsSL https://vite.plus | VP_HOME=/opt/vite-plus bash
120
+ ```
121
+
122
+ ```powershell
123
+ # PowerShell
124
+ $env:VP_HOME = "D:\vite-plus"; irm https://vite.plus/ps1 | iex
125
+ ```
126
+
127
+ #### `VP_BIN_DIR` / `VP_DATA_DIR` / `VP_CACHE_DIR`
128
+
129
+ - **Purpose**: Internal absolute directory overrides for integrations that must pin a split install. Set all three variables together. The installer rejects an incomplete group. Vite+ ignores the group when `VP_HOME` is set or when it reuses an existing `~/.vite-plus` install.
130
+ - **Default**: unset (XDG / platform defaults)
131
+ - **Persistence**: The generated environment file does not export these variables. An integration that uses them must provide the complete group to each Vite+ process.
132
+ - **Example**:
133
+
134
+ ```bash
135
+ export VP_DATA_DIR=$HOME/vite-plus-data
136
+ export VP_BIN_DIR=$VP_DATA_DIR/bin
137
+ export VP_CACHE_DIR=$HOME/.cache/vite-plus
138
+ curl -fsSL https://vite.plus | bash
139
+ ```
140
+
141
+ #### `NPM_CONFIG_REGISTRY`
142
+
143
+ - **Purpose**: Custom npm registry URL
144
+ - **Default**: `https://registry.npmjs.org`
145
+ - **CLI equivalent**: `--registry`
146
+ - **Example**:
147
+ ```bash
148
+ curl -fsSL https://vite.plus | NPM_CONFIG_REGISTRY=https://registry.npmmirror.com bash
149
+ ```
150
+
151
+ #### `VP_NODE_MANAGER`
152
+
153
+ - **Purpose**: Control Node.js version manager setup during installation.
154
+ - **Values**: `yes` or `no`
155
+ - **Default**: Auto-detected
156
+ - **CLI equivalent**: `--no-node-manager` (inverted)
157
+ - **Example**:
158
+ ```bash
159
+ # Skip Node.js manager setup in CI
160
+ curl -fsSL https://vite.plus | VP_NODE_MANAGER=no bash
161
+ ```
162
+
163
+ #### `VP_PM_MANAGER`
164
+
165
+ - **Purpose**: Set the management preference for all four package-manager families: npm, pnpm, Yarn, and Bun.
166
+ - **Values**: `yes` uses Vite+ management; `no` prefers system tools, with managed tools as a fallback when a system tool is unavailable.
167
+ - **Default**: Unset. The installer's combined Node.js and package-manager choice remains the default. With the script installers, setting only `VP_NODE_MANAGER` preserves existing package-manager preferences.
168
+
169
+ #### `VP_NPM_MANAGER` / `VP_PNPM_MANAGER` / `VP_YARN_MANAGER` / `VP_BUN_MANAGER`
170
+
171
+ - **Purpose**: Set the management preference for an individual package-manager family. Each variable overrides `VP_PM_MANAGER` for that family.
172
+ - **Values**: `yes` or `no`, with the same meaning as `VP_PM_MANAGER`.
173
+ - **Default**: Unset (use `VP_PM_MANAGER`, then the combined installer choice, or preserve the existing preference).
174
+ - **Example**:
175
+
176
+ ```bash
177
+ # Keep system Node.js and package managers, but let Vite+ manage pnpm.
178
+ curl -fsSL https://vite.plus | VP_NODE_MANAGER=no VP_PM_MANAGER=no VP_PNPM_MANAGER=yes bash
179
+ ```
180
+
181
+ These management variables are installation choices, saved in Vite+'s config. The interactive prompt still controls both Node.js and package managers; explicit package-manager variables override that combined choice. The standalone `vp-setup` installer uses its existing combined option as the default for both variables, in interactive and silent installations alike. In-place upgrades preserve the saved choices. Unrecognized values are ignored. They select management behavior, not package-manager versions, and do not prevent the installer from creating shims. Older releases installed through the legacy installer retain their original behavior.
182
+
183
+ #### `VP_PR_VERSION`
184
+
185
+ - **Purpose**: Install a preview build from a pull request or commit SHA
186
+ - **Values**: PR number or commit SHA
187
+ - **Default**: None
188
+ - **Details**: [Global `vp` Preview](/guide/upgrade#global-vp-preview)
189
+
190
+ #### Development variables
191
+
192
+ Use `VP_LOCAL_TGZ` and `VP_LOCAL_BINARY` when you develop Vite+ itself. `VP_LOCAL_TGZ` specifies a local `vite-plus.tgz` file. `VP_LOCAL_BINARY` specifies a local `vp` binary. The installers use these files for the local build. They use `VP_DUMP_DIRS=1` to get the layout mode and all five `EnvConfig` category roots from the selected binary. They do not resolve the directory variables. The installers set `VP_INSTALL_STOP`; do not set it manually.
193
+
194
+ ### Runtime Variables
195
+
196
+ These variables configure the installed Vite+ CLI. `VP_HOME` (above) also applies at runtime.
197
+
198
+ #### `VP_NODE_DIST_MIRROR`
199
+
200
+ - **Purpose**: Node.js distribution mirror URL
201
+ - **Default**: `https://nodejs.org/dist`
202
+ - **Details**: [Custom Node.js Mirror](/guide/env#custom-node-js-mirror)
203
+
204
+ #### `VP_NODE_VERSION`
205
+
206
+ - **Purpose**: Override Node.js version
207
+ - **Default**: None (auto-detected)
208
+ - **Example**:
209
+ ```bash
210
+ # Run a command with a specific Node.js version
211
+ VP_NODE_VERSION=22 vp env exec node -v
212
+ ```
213
+
214
+ #### `VP_PACKAGE_MANAGER`
215
+
216
+ - **Purpose**: Override the selected package manager and version
217
+ - **Default**: None (resolved from the project or global default)
218
+ - **Format**: `npm|pnpm|yarn|bun@<version>`
219
+ - **Example**:
220
+ ```bash
221
+ VP_PACKAGE_MANAGER=pnpm@10.18.0 vp install
222
+ ```
223
+
224
+ #### `VP_NODE_SKIP_SIGNATURE_VERIFY`
225
+
226
+ - **Purpose**: Skip PGP signature verification of Node.js downloads
227
+ - **Values**: Any non-empty value
228
+ - **Default**: None (verification enabled)
229
+ - **Details**: [Node.js Signature Verification](/guide/env#node-js-signature-verification)
230
+
231
+ #### `VP_DOWNLOAD_TIMEOUT`
232
+
233
+ - **Purpose**: Per-request timeout, in seconds, for large downloads such as Node.js runtimes and package-manager tarballs
234
+ - **Values**: Positive integer, at most `86400` (24 hours); invalid values are ignored with a warning
235
+ - **Default**: `600` (10 minutes)
236
+ - **Example**:
237
+ ```bash
238
+ # Allow up to 30 minutes per download on a slow connection
239
+ VP_DOWNLOAD_TIMEOUT=1800 vp env install 22
240
+ ```
241
+
242
+ #### `VP_SHELL`
243
+
244
+ - **Purpose**: Specify the current shell
245
+ - **Default**: Auto-detected
246
+ - **Example**:
247
+ ```bash
248
+ VP_SHELL=bash vp env print
249
+ ```
250
+
251
+ #### `VP_BYPASS`
252
+
253
+ - **Purpose**: Bypass the Vite+ shim and use the system tool
254
+ - **Values**: `PATH`-style list of directories to bypass
255
+ - **Default**: None
256
+ - **Example**:
257
+ ```bash
258
+ VP_BYPASS=/usr/local/bin node -v
259
+ ```
260
+
261
+ #### Internal variables
262
+
263
+ Vite+ sets additional `VP_*` variables during shim dispatch and shell integration (recursion guards, active-version records, wrapper flags); do not set them manually.
264
+
265
+ ### TLS/CA Configuration
266
+
267
+ #### `SSL_CERT_FILE` / `NODE_EXTRA_CA_CERTS`
268
+
269
+ - **Purpose**: Path to PEM bundle of extra CA certificates (`NODE_EXTRA_CA_CERTS` is the Node.js convention)
270
+ - **Default**: System trust store
271
+ - **Example**:
272
+ ```bash
273
+ export SSL_CERT_FILE=/path/to/custom-ca.pem
274
+ ```
275
+
276
+ #### `VP_INSECURE_TLS`
277
+
278
+ - **Purpose**: Disable HTTPS certificate verification
279
+ - **Values**: Any non-empty value (`1`, `true`, `yes`)
280
+ - **Default**: None (verification enabled)
281
+ - **Warning**: Diagnostic escape hatch only; do not use in production
282
+ - **Example**:
283
+ ```bash
284
+ VP_INSECURE_TLS=1 vp env install 22
285
+ ```
286
+
287
+ ### Logging and Debugging
288
+
289
+ #### `VP_LOG`
290
+
291
+ - **Purpose**: Log filter string for `tracing_subscriber`
292
+ - **Installer behavior**: When `CI=true`, `install.sh` hides shell file errors. Set `VP_LOG=trace` to show these errors.
293
+ - **Default**: None
294
+ - **Example**:
295
+ ```bash
296
+ VP_LOG=debug vp dev
297
+ VP_LOG=vt=trace vp build
298
+ ```
299
+
300
+ #### `VP_DEBUG_SHIM`
301
+
302
+ - **Purpose**: Enable debug output for shim dispatch
303
+ - **Values**: Any non-empty value
304
+ - **Default**: None
305
+ - **Example**:
306
+ ```bash
307
+ VP_DEBUG_SHIM=1 node -v
308
+ ```
309
+
310
+ ### Standard Environment Variables
311
+
312
+ Vite+ also respects these standard environment variables:
313
+
314
+ #### Nushell and XDG directories
315
+
316
+ If you customize `XDG_DATA_HOME` or `XDG_CONFIG_HOME`, set them **before starting Nushell**, through your terminal application, operating system, or parent shell. This is a [Nushell startup requirement](https://www.nushell.sh/book/configuration.html#changing-default-directories); setting them only in `config.nu` or `env.nu` does not configure the running session's startup directories.
317
+
318
+ Assignments in those files still affect child processes. The Vite+ installer starts a child Nushell to locate its vendor autoload directory, so it can write `vite-plus.nu` to a directory that normal new sessions do not read. Installation can succeed while `vp` remains unavailable in those sessions.
319
+
320
+ If this happens, open your Nushell configuration with `config nu` and add a `source` line pointing to the installed Vite+ `env.nu` file. For a default fresh macOS or Linux installation without a custom `XDG_CONFIG_HOME`, use:
321
+
322
+ ```nu
323
+ source ~/.config/vite-plus/env.nu
324
+ ```
325
+
326
+ For a custom `XDG_CONFIG_HOME`, use the absolute path to `<XDG_CONFIG_HOME>/vite-plus/env.nu` as resolved during installation. For an installation under `VP_HOME` or an existing `~/.vite-plus` installation, use `<VP_HOME>/env.nu` or `~/.vite-plus/env.nu` instead. Replace placeholders with actual paths and quote paths containing spaces. Open a new Nushell session and run `vp help` to verify the configuration.
327
+
328
+ #### `CI`
329
+
330
+ - **Purpose**: Indicates running in CI environment
331
+ - **Effect**: Enables silent mode (`--yes`) for installers
332
+
333
+ #### `NO_COLOR`
334
+
335
+ - **Purpose**: Disable colored output
336
+ - **Effect**: Disables ANSI color codes
337
+
338
+ #### `HOME` / `USERPROFILE`
339
+
340
+ - **Purpose**: User home directory
341
+ - **Effect**: Base for the existing-install probe (`~/.vite-plus`) and for split platform defaults
342
+
343
+ ### Precedence
344
+
345
+ 1. CLI flags (highest priority)
346
+ 2. Environment variables
347
+ 3. Default values (lowest priority)
348
+
349
+ For example, `VP_VERSION=1.0.0 vp-setup.exe --version 2.0.0` installs version 2.0.0.
350
+
351
+ :::
352
+
353
+ ### Homebrew
354
+
355
+ For a Homebrew installation, the first `vp` command sets up your shell, shims, and environment-management preferences. It reuses Homebrew's binary and bundled JavaScript. Setup stores its completion state in your user directories and does not need write access to the Homebrew prefix.
356
+
357
+ Later commands reuse that setup while the installed binary remains unchanged. Generated shims follow Homebrew's public `vp` entrypoint when Homebrew replaces a version. Setup preserves your saved management preferences during this replacement.
358
+
359
+ To prefer your existing Node.js and package managers during the first run, use:
360
+
361
+ ```bash
362
+ VP_NODE_MANAGER=no VP_PM_MANAGER=no vp help
363
+ ```
364
+
365
+ After setup, use `vp env off` to change this preference. Commands that need missing runtimes or project dependencies can still download them.
366
+
367
+ Use Homebrew to [upgrade](/guide/upgrade#homebrew) or [remove](/guide/implode#homebrew) its package.
368
+
369
+ `vp env doctor` identifies the Homebrew installation and its binary path. It checks the `vp` command and the user shim directory on `PATH` separately. If only the shim directory is missing, follow its shell setup instructions to enable the shims.
370
+
371
+ ## Use It Without a Local Package
372
+
373
+ The global installation is enough for runtime, package-manager, and task-runner workflows:
374
+
375
+ ```bash
376
+ vp env pin lts # Pin and install Node.js for this project
377
+ vp install # Use the package manager declared by the project
378
+ vp run build # Run a package.json script or configured task
379
+ vp dlx create-vite # Download and run a package binary
380
+ ```
381
+
382
+ You do not need a local `vite-plus` dependency to run existing `package.json` scripts. Add the [project-local CLI](/guide/local-cli) when you want the frontend toolchain version recorded in the project's manifest and lockfile.
383
+
384
+ ## Use Both CLIs Together
385
+
386
+ The global CLI and the project-local `vite-plus` package work together. You keep using the same `vp` command, while each project can choose its own toolchain version.
387
+
388
+ For development commands such as `vp dev`, `vp build`, `vp test`, and `vp run`, the global CLI delegates to the project's installed version when available:
389
+
390
+ | Current project | Toolchain used by `vp` |
391
+ | ----------------------------------- | --------------------------------- |
392
+ | Has `vite-plus` installed locally | The project's installed toolchain |
393
+ | Does not have `vite-plus` installed | The globally installed toolchain |
394
+
395
+ In a monorepo, the local installation can be shared at the workspace root. You do not need to install `vite-plus` separately in every package.
396
+
397
+ For example, if a project has Vite+ version A installed and your global installation is version B, `vp build` uses version A's toolchain. Upgrading the global installation does not change that project's installed toolchain.
398
+
399
+ Package-manager commands such as `vp install` and `vp add` use the global CLI. Commands for managing your environment or global installation, such as `vp env`, `vp upgrade`, and `vp implode`, also stay with the global CLI regardless of the project's version.
400
+
401
+ To see which toolchain is selected for your current project, run `vp toolchain`. Use `vp toolchain --global` to inspect the global installation.
402
+
403
+ ## Next Steps
404
+
405
+ - [Environment](/guide/env) covers Node.js and package-manager selection, pinning, shims, and managed installations.
406
+ - [Package Management](/guide/install) covers pnpm, npm, Yarn, and Bun workflows.
407
+ - [Run](/guide/run) covers package scripts and cached workspace tasks.
408
+ - [Upgrading Vite+](/guide/upgrade) explains global CLI upgrades. See [Update Vite+](/guide/upgrade-project) for project-local upgrades.
409
+ - [Removing Vite+](/guide/implode) removes the global binary and its managed data.
410
+
411
+ ::: details Platform support
412
+
413
+ Prebuilt binaries are distributed for:
414
+
415
+ - Linux x64 and arm64 with glibc
416
+ - Windows x64 and arm64
417
+ - macOS x64 and arm64
418
+ - Linux x64 and arm64 with musl
419
+
420
+ If a prebuilt binary is not available for your platform, installation fails with an error. On Alpine Linux, install `libstdc++` before using the managed [unofficial Node.js builds](https://unofficial-builds.nodejs.org/):
421
+
422
+ ```sh
423
+ apk add libstdc++
424
+ ```
425
+
426
+ :::
@@ -120,8 +120,7 @@ For the best Vite+ experience with JetBrains IDEs such as IntelliJ & WebStorm, i
120
120
  When you create or migrate a project, Vite+ prompts you to choose whether you want the editor config written for JetBrains IDEs.
121
121
 
122
122
  ::: tip Vite+ does not merge with existing config files
123
- Due to some complexities with merging XML files, Vite+ currently does not merge your current files if the files already exist.
124
- You'll be given the opportunity to replace any existing files, instead of merging.
123
+ Due to some complexities with merging XML files, Vite+ currently does not merge your current files if the files already exist. You'll be given the opportunity to replace any existing files, instead of merging.
125
124
  :::
126
125
 
127
126
  You can also manually set up the IDE configuration to match your Vite+ setup:
@@ -1,6 +1,6 @@
1
1
  # Removing Vite+
2
2
 
3
- Use `vp implode` to remove `vp` and all related Vite+ data from your machine.
3
+ Use `vp implode` to remove the Vite+-managed [global `vp` installation](/guide/global-cli) and related user data from your machine. It does not remove `vite-plus` dependencies from projects or packages owned by Homebrew.
4
4
 
5
5
  ## Overview
6
6
 
@@ -21,3 +21,16 @@ Skip the confirmation prompt with:
21
21
  ```bash
22
22
  vp implode --yes
23
23
  ```
24
+
25
+ ## Homebrew
26
+
27
+ Run `vp implode` first to remove Vite+-managed runtimes, global packages, configuration, shims, and shell entries. Then remove the Homebrew package:
28
+
29
+ ```bash
30
+ vp implode
31
+ brew uninstall vite-plus
32
+ ```
33
+
34
+ The confirmation prompt explains that the Homebrew package will remain installed. After cleanup, `vp implode` directs you to `brew uninstall vite-plus`.
35
+
36
+ Restart your terminal before you run `vp` again. In Bash, you can run `hash -r` instead to clear cached command paths. If the Homebrew package is still installed, the next `vp` command starts first-run setup again.
@@ -1,14 +1,20 @@
1
1
  # Getting Started
2
2
 
3
- Vite+ is the unified toolchain and entry point for web development. It manages your runtime, package manager, and frontend toolchain in one place by combining [Vite](https://vite.dev/), [Vitest](https://vitest.dev/), [Oxlint](https://oxc.rs/docs/guide/usage/linter.html), [Oxfmt](https://oxc.rs/docs/guide/usage/formatter.html), [Rolldown](https://rolldown.rs/), [tsdown](https://tsdown.dev/), and [Vite Task](https://github.com/voidzero-dev/vite-task).
3
+ Vite+ is the unified toolchain and entry point for web development.
4
4
 
5
- Vite+ ships in two parts: `vp`, the global command-line tool, and `vite-plus`, the local package installed in each project. If you already have a Vite project, use [`vp migrate`](/guide/migrate) to migrate it to Vite+, or paste our [migration prompt](/guide/migrate#migration-prompt) into your coding agent.
5
+ It brings together [Vite](https://vite.dev/), [Vitest](https://vitest.dev/), [Oxlint](https://oxc.rs/docs/guide/usage/linter.html), [Oxfmt](https://oxc.rs/docs/guide/usage/formatter.html), [Rolldown](https://rolldown.rs/), [tsdown](https://tsdown.dev/), and [Vite Task](https://github.com/voidzero-dev/vite-task) in a single [`vite-plus` package](/guide/local-cli) for a blazing fast frontend toolchain.
6
+
7
+ Vite+ also ships a [global `vp` CLI](/guide/global-cli) that manages Node.js and package managers and makes Vite+ easier to use across projects. You can use either CLI independently, but we recommend [using them together](/guide/global-cli#use-both-clis-together).
8
+
9
+ If you already have a Vite project, run [`vp migrate`](/guide/migrate) to migrate it to Vite+, or give your coding agent our [migration prompt](/guide/migrate#migration-prompt).
6
10
 
7
11
  Building with an AI assistant? View and copy a ready-made setup prompt:
8
12
 
9
13
  <CopyPrompt />
10
14
 
11
- ## Install `vp`
15
+ ## Install `vp` Globally
16
+
17
+ The commands below install the global `vp` CLI, which manages Node.js and package managers and makes `vp` available across projects. If you only need the frontend toolchain in a single project, you can install the [project-local CLI](/guide/local-cli#install) instead.
12
18
 
13
19
  ### macOS / Linux
14
20
 
@@ -28,7 +34,9 @@ Alternatively, download and run [`vp-setup.exe`](https://setup.viteplus.dev).
28
34
  The `vp-setup.exe` is not yet code-signed. Your browser may show a warning when downloading. Click **"..."** → **"Keep"** → **"Keep anyway"** to proceed. If Windows Defender SmartScreen blocks the file when you run it, click **"More info"** → **"Run anyway"**.
29
35
  :::
30
36
 
31
- The installer scripts and `vp-setup.exe` read [environment variables](/guide/installer-env-vars) such as `VP_VERSION` and `VP_HOME`.
37
+ The installer scripts and `vp-setup.exe` read [environment variables](/guide/global-cli#installation-variables) such as `VP_VERSION` and `VP_HOME`.
38
+
39
+ If you use Nushell with custom XDG directories, read the [Nushell startup requirements](/guide/global-cli#nushell-and-xdg-directories) before installing.
32
40
 
33
41
  After installation, open a new shell and run:
34
42
 
@@ -71,7 +79,7 @@ This is required because the managed [unofficial-builds](https://unofficial-buil
71
79
 
72
80
  ## Quick Start
73
81
 
74
- Create a project, install dependencies, and use the default commands:
82
+ With the global CLI installed, create a project, install dependencies, and use the default commands:
75
83
 
76
84
  ```bash
77
85
  vp create # Create a new project
@@ -82,54 +90,49 @@ vp test # Run JavaScript tests
82
90
  vp build # Build for production
83
91
  ```
84
92
 
85
- You can also just run `vp` on its own and use the interactive command line.
93
+ You can also run `vp` on its own to open the interactive command line. In a local-only setup, run the same commands through your package manager, such as `pnpm exec vp check`.
86
94
 
87
95
  ## Core Commands
88
96
 
89
- Vite+ can handle the entire local frontend development cycle from starting a project, developing it, checking & testing, and building it for production.
97
+ Vite+ covers the full frontend development cycle, from starting a project through development, checks, tests, and production builds. Most commands are available from both distributions; machine-level environment and self-management commands require the global CLI.
90
98
 
91
- ### Start
99
+ ### Set Up a Project
92
100
 
93
101
  - [`vp create`](/guide/create) creates new apps, packages, and monorepos.
94
102
  - [`vp migrate`](/guide/migrate) moves existing projects onto Vite+.
95
- - [`vp config`](/guide/commit-hooks) installs the Git hook dispatcher and configures agent integration.
96
- - [`vp hooks`](/guide/commit-hooks) manages the Git hook dispatcher (`enable`, `disable`, `status`).
97
- - [`vp staged`](/guide/commit-hooks) runs checks on staged files.
98
103
  - [`vp install`](/guide/install) installs dependencies with the right package manager.
99
- - [`vp env`](/guide/env) manages Node.js and package-manager environments.
104
+ - [`vp add`](/guide/install), [`vp remove`](/guide/install), [`vp update`](/guide/install), [`vp dedupe`](/guide/install), [`vp outdated`](/guide/install), [`vp list`](/guide/install), [`vp why`](/guide/install), and [`vp info`](/guide/install) cover the rest of the package-management workflow.
105
+ - [`vp link`](/guide/install), [`vp unlink`](/guide/install), [`vp rebuild`](/guide/install), and [`vp pm <command>`](/guide/install) provide lower-level package-manager operations.
100
106
 
101
- ### Develop
107
+ ### Project Toolchain
102
108
 
103
- - [`vp dev`](/guide/dev) starts the dev server powered by Vite.
104
109
  - [`vp check`](/guide/check) runs format, lint, and type checks together.
105
- - [`vp lint`](/guide/lint), [`vp fmt`](/guide/fmt), and [`vp test`](/guide/test) let you run those tools directly.
106
-
107
- ### Execute
108
-
110
+ - [`vp lint`](/guide/lint) and [`vp fmt`](/guide/fmt) run the individual checks directly.
111
+ - [`vp test`](/guide/test) runs tests with Vitest.
112
+ - [`vp dev`](/guide/dev) starts the development server powered by Vite.
113
+ - [`vp build`](/guide/build) builds apps, and [`vp preview`](/guide/build) previews the production build locally.
114
+ - [`vp pack`](/guide/pack) builds libraries or standalone artifacts.
115
+ - [`vp toolchain`](/guide/upgrade#show-the-toolchain) shows the active project toolchain; use `--global` to inspect the global installation instead.
109
116
  - [`vp run`](/guide/run) runs tasks across workspaces with caching.
110
- - [`vp exec`](/guide/vpx) runs local project binaries.
111
- - [`vp node`](/guide/env) runs Node.js scripts with the resolved Vite+ environment.
112
- - [`vp dlx`](/guide/vpx) downloads and runs package binaries without adding them as dependencies.
113
117
  - [`vp cache clean`](/guide/cache) clears task cache entries.
114
- - [`vpx`](/guide/vpx) downloads and runs binaries globally.
118
+ - [`vp exec`](/guide/vpx) runs local project binaries, while [`vp dlx`](/guide/vpx) and [`vpx`](/guide/vpx) download and run package binaries.
119
+ - [`vp config`](/guide/commit-hooks) installs the Git hook dispatcher and configures agent integration.
120
+ - [`vp hooks`](/guide/commit-hooks) manages the Git hook dispatcher, and [`vp staged`](/guide/commit-hooks) runs checks on staged files.
121
+ - [Monorepo Guide](/guide/monorepo) covers multi-package project structure and commands.
115
122
 
116
- ### Build
123
+ ### Global CLI
117
124
 
118
- - [`vp build`](/guide/build) builds apps.
119
- - [`vp pack`](/guide/pack) builds libraries or standalone artifacts.
120
- - [`vp preview`](/guide/build) previews the production build locally.
125
+ - [`vp env`](/guide/env) manages Node.js and package-manager environments, and [`vp node`](/guide/env) runs scripts with the resolved environment.
126
+ - [`vp upgrade`](/guide/upgrade) updates the global `vp` installation itself.
127
+ - [`vp implode`](/guide/implode) removes the global `vp` installation and related Vite+ data from your machine.
121
128
 
122
- ### Manage Dependencies
129
+ ### Workflow
123
130
 
124
- - [`vp add`](/guide/install), [`vp remove`](/guide/install), [`vp update`](/guide/install), [`vp dedupe`](/guide/install), [`vp outdated`](/guide/install), [`vp list`](/guide/install), [`vp why`](/guide/install), and [`vp info`](/guide/install) wrap package-manager workflows.
125
- - [`vp link`](/guide/install), [`vp unlink`](/guide/install), and [`vp rebuild`](/guide/install) cover local package links and native module rebuilds.
126
- - [`vp pm <command>`](/guide/install) calls other package manager commands directly.
131
+ - [IDE Integration](/guide/ide-integration), [CI](/guide/ci), and [Docker](/guide/docker) cover common development and deployment environments.
127
132
 
128
- ### Maintain
133
+ ### Reference
129
134
 
130
- - [`vp toolchain`](/guide/upgrade#show-the-toolchain) shows the versions and relationships in the active Vite+ toolchain.
131
- - [`vp upgrade`](/guide/upgrade) updates the `vp` installation itself.
132
- - [`vp implode`](/guide/implode) removes `vp` and related Vite+ data from your machine.
135
+ - [Troubleshooting](/guide/troubleshooting) covers common command, configuration, and integration problems.
133
136
 
134
137
  ::: info
135
138
  Vite+ ships with many predefined commands such as `vp build`, `vp test`, and `vp dev`. These commands are built-in and cannot be changed. If you want to run a command from your `package.json` scripts, use `vp run <command>` or `vpr <command>`.