deniz.in

Markets

Weather

Loading weather

· via Hacker News – Front Page (hnrss.org)

Hands-on with Vite+: one toolchain for bloated dev dependencies and AI agents

A developer reports that the Vite+ toolchain collapsed his lint, format, test and build commands into one vp workflow, cutting a monorepo CI run from four minutes to 50 seconds and simplifying AI agent onboarding.

Hands-on with Vite+: one toolchain for bloated dev dependencies and AI agents

A developer who spent three weeks using the Vite+ toolchain across four projects says it addressed two problems at once: sprawling JavaScript development tooling and the difficulty of onboarding AI coding agents to a repository. Writing on his blog in a post that reached the Hacker News front page, Jan Michalek says his standing rule for new Vite applications is to mention Vite+ in the very first prompt he gives an AI assistant.

One entry point instead of many

Michalek describes a project with 47 development dependencies, seven configuration files, and a Markdown document whose only job was explaining to agents which command to run. His checks were spread across ESLint, Prettier, TypeScript, a test runner and package.json scripts, and at one point his local machine and CI pipeline disagreed about a generated file, so the agent and the pipeline saw different outcomes.

According to Michalek, Vite+ pulls everyday tasks under a single vp binary: Vite handles development and builds, Vitest runs tests, Oxlint and Oxfmt handle linting and formatting, tsdown builds libraries, and Vite Task defines tasks. Configuration for these can live in vite.config.ts, though package.json, tsconfig and framework-specific files remain. He is skeptical that consolidating absolutely everything into one file would hold up in a real repository.

For a new React app the workflow is vp create (which uses the standard create-vite templates), vp install, vp dev, vp check, vp test and vp build. A global install is optional: Vite+ can run as a local dependency, and vp install delegates to whichever package manager the project already uses rather than replacing npm or pnpm.

Agents get a contract, not a guess

Rather than letting an agent improvise, Michalek feeds it an adapted version of the prompt included in the Vite+ documentation. His variant requires reading the current create guide, not overwriting existing files, keeping a single lockfile, and not adding a second linter or formatter without a specific reason. Those rules come from experience: when he gave an agent free rein, he ended up with both Prettier and Oxfmt configured, three lockfiles, and unreliable CI.

He also stores a completion checklist in the repository's agent instructions — run vp check after code changes, vp test after behavior changes, vp build before handoff — because a future agent session has no memory of past conversations. Local instructions and Git hooks can be bypassed, he notes, so the same checks run in CI, and human review before merging remains his responsibility even on unattended agent experiments.

The numbers, with caveats

After switching a monorepo to the new workflow, Michalek reports its CI run dropped from four minutes to 50 seconds, and a pre-commit check fell from 11 seconds to under two. A GitHub Actions benchmark he ran finished in 1.356 seconds with Vite+ versus 10.441 seconds with the classic toolchain. He is explicit that these are results from his own projects, not a controlled comparison, and that the gains depend on what runs and which files get checked.

Supporting commands include vp staged for quick checks of changed files, vp hooks for Git hook management, and vp toolchain to show which tool versions are active in a project or globally.

Rough edges

Michalek reports that vp migrate needed about four minutes to convert an older monorepo's ESLint, Prettier and tsup setup, and nothing broke for him — but he stresses that the result must be compared against the old lint rules, tests, hooks and build output, and that plugins and custom rules may still need manual work.

A subtler trap is the difference between built-in commands and project scripts: vp build performs a Vite application build, while vp run build executes a package.json script or a task of that name. In a Next.js project, an agent must not assume vp build replaces next build, and the same distinction applies to vp dev versus vp run dev.

Version management also invites confusion. According to Michalek, vp upgrade updates the global CLI, not the local vite-plus package in each project, so he spells that out explicitly in his agent instructions. vp env can manage Node.js and package-manager versions — useful for him, with three projects on three Node versions — and can be disabled with vp env off. In monorepos, caching is automatic for tasks defined in vite.config.ts but must be enabled with a flag, such as vp run --cache build, for package.json scripts.

Why it matters

AI coding agents amplify a cost human developers have long absorbed quietly: every extra config file and ambiguous script becomes something a model has to infer, and wrong inferences create drift between local checks and CI. A toolchain that exposes one predictable set of commands gives agents and humans a shared definition of done. Michalek's report suggests the payoff can be measurable — minutes shaved off CI in his case — but his caveats matter as much as his numbers: migrations still need review, command semantics still have edge cases, and no toolchain removes the need for a person to look before merging.

  • #vite
  • #ai-agents
  • #developer-tools
  • #javascript
  • #build-tools

Related posts