You'll need the following tools installed on your system:
brew install pnpm node just cmake
Install Rust & Cargo using rustup:
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
cargo install cargo-binstall
Initial setup to install dependencies for Vite+:
just init
You'll need the following tools installed on your system. You can use winget.
winget install pnpm.pnpm OpenJS.NodeJS.LTS Casey.Just Kitware.CMakeInstall Rust & Cargo from rustup.rs, then install cargo-binstall:
cargo install cargo-binstallInitial setup to install dependencies for Vite+:
just initNote: Run commands in PowerShell or Windows Terminal. Some commands may require elevated permissions.
To create a release build of Vite+ and all upstream dependencies, run:
just build
pnpm bootstrap-cli
vp --version
This builds all packages, compiles the Rust vp binary, and installs the CLI to ~/.vite-plus.
Unit and snap tests don't cover everything. Interactive flows in particular (prompts, pickers, scaffolding) are easiest to validate by running your work-in-progress CLI inside a real Vite+ project.
First, understand how vp picks which vite-plus to run: for JS-backed commands (such as vp create), the global vp binary resolves vite-plus from the project's node_modules first and only falls back to the global installation in ~/.vite-plus. If your test project has vite-plus installed from npm, pnpm bootstrap-cli alone will not make it run your local code.
Build the local CLI package after each change:
pnpm -F vite-plus build # TypeScript + native NAPI binding
pnpm -F vite-plus build-ts # faster, when only TypeScript changedLink your checkout into the test project. The global vp then delegates to the project-local CLI, and re-entrant vp sub-commands (for example vp create running vp install and vp fmt after scaffolding) resolve back to the same linked checkout:
cd /path/to/test-project
pnpm link /path/to/vite-plus/packages/cli
vp create # now runs your local checkoutVerify the link with ls -l node_modules/vite-plus (it should be a symlink into your checkout). Notes:
- pnpm records the link as a
vite-plus: link:...override (inpnpm-workspace.yamlfor workspace projects, otherwise underpnpm.overridesinpackage.json), so it survives later installs. Don't commit that override in the test project. pnpm linkmay also add apackageManagerfield to the test project'spackage.json; revert it if unwanted.- Undo with
pnpm unlink vite-plus, or remove the override and runpnpm install.
pnpm link only swaps the JS side; the vp binary on PATH (and the Rust-backed commands it handles directly, such as package-manager commands) is still whatever is installed in ~/.vite-plus. For changes to the Rust global CLI (crates/), install it from source, and combine with pnpm link when the change spans both layers:
pnpm bootstrap-cli
vp --versionYou can run this command to build, test and check if there are any snapshot changes:
pnpm bootstrap-cli && pnpm test && git status
Snap tests verify CLI output. They are located in packages/cli/snap-tests/ (local CLI) and packages/cli/snap-tests-global/ (global CLI).
# Run all snap tests (local + global)
pnpm -F vite-plus snap-test
# Run only local CLI snap tests
pnpm -F vite-plus snap-test-local
pnpm -F vite-plus snap-test-local <name-filter>
# Run only global CLI snap tests
pnpm -F vite-plus snap-test-global
pnpm -F vite-plus snap-test-global <name-filter>Snap tests auto-generate snap.txt files. Check git diff to verify output changes are correct.
All commits in PR branches should be GitHub-verified so reviewers can confirm commit authenticity.
Set up local commit signing and GitHub verification first:
- Follow GitHub's guide for GPG commit signature verification: https://docs.github.com/en/authentication/managing-commit-signature-verification/about-commit-signature-verification#gpg-commit-signature-verification
- If you use Graphite, add the Graphite GPG key to your GitHub account from the Graphite UI as well, otherwise commits updated by Graphite won't show as verified.
After setup, re-sign any existing commits in your branch so the full branch is verified:
# Re-sign each commit on your branch (replace origin/main with your branch base if needed)
git rebase -i origin/main
# At each stop:
git commit --amend --date=now --no-edit -S
# Then continue:
git rebase --continueWhen done, force-push the updated branch history:
git push --force-with-leaseNote
Upstream dependencies only need to be updated when an "upgrade upstream dependencies" pull request is merged.
To sync the latest upstream dependencies such as Rolldown and Vite, run:
pnpm tool sync-remote
just build
If you are using macOS, add your terminal app (Ghostty, iTerm2, Terminal, …) to the approved "Developer Tools" apps in the Privacy panel of System Settings and restart your terminal app. Your Rust builds will be about ~30% faster.