Skip to content

TIP

This page mirrors .agents/vite-plus.md from the repository. Edit it at the source, not here.

Vite Plus (Vite+)

What It Is

Vite Plus is the all-in-one CLI that replaces pnpm/npm/yarn and bundles Oxlint, Oxfmt, Vitest, and staging hooks into a single defineConfig in the root vite.config.ts.

CLI Mapping

Instead ofUse
pnpm / npm / yarnvp
pnpx / npxvpx
pnpm run <script>vp run <script>
pnpm run -w <script>vp run -w <script> (workspace root)
pnpm --filter <pkg> <script>vp run --filter <pkg> <script>
pnpm add <dep>vp add <dep>
npx <pkg>vpx <pkg>

Key Behaviors

  • vp run -r <script> — runs script recursively across all packages
  • vp check — verify formatting, lint, and types
  • vp check --fix — write formatting/fixes, then lint and typecheck (auto-runs on staged files via hooks)
  • vp test --coverage --run — package-local Vitest coverage run
  • vp config — sets up Vite Plus hooks (runs on prepare)
  • vp env doctor — checks the environment for potential issues, use when environment config seems wrong.

Use vp check --fix as the normal cleanup and validation command after code or configuration edits. Prefer the package-local command for scoped work, and use the workspace command from Workflow when changes span packages, generated artifacts, or root configuration. Use Choice flows only when a human decision is needed, such as selecting a validation scope for broad work or approving a permission-sensitive command.

Root vite.config.ts

Contains the unified config for:

  • Staged hooks: "*": "vp check --fix" — auto-formats + lints on commit
  • Vitest: test includes, global config
  • Oxfmt: ignore patterns, import sorting (by FSD layer), Tailwind class sorting
  • Oxlint: ESLint plugin integration (eslint-plugin-fsd-lint, @tanstack/eslint-plugin-query, eslint-plugin-react-hooks)

Mental Model

Think of vp as the only CLI you need for this project. It wraps pnpm for package management and Vite's ecosystem for build/lint/format/test. Never install or invoke pnpm/npm/yarn directly for standard development.

Released under the MIT License.