npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@viyuni/vpp

v0.0.4

Published

A Vite+ extension toolkit for project-aware CLI command dispatch.

Downloads

614

Readme

vpp

vpp is a small extension toolkit for Vite+. It adds a CLI layer that can load project configuration and dispatch commands to different underlying tools.

The current focus is project-aware command dispatch. You can run:

vpp check
vpp test

vpp reads your Vite+ config, resolves the configured behavior, and calls the matching underlying tools.

Supported Features

  • vpp check command dispatch
  • vpp test command dispatch
  • Config loading from vite.config.ts with unconfig
  • Config merging with defu
  • CLI argument parsing with arg
  • Vite+ config type augmentation through vpp
  • Command helpers for Vite+ tasks:
    • createCommand
    • createArgs
    • vpRun
  • Test framework selection:
    • vp
    • vitest
    • bun:test
  • Type-check runner selection for vpp check:
    • Manual nuxt typecheck
    • Manual tsc --noEmit
    • Manual custom command
    • Default passthrough to vp check

Command Helpers

@viyuni/vpp exports small helpers for composing Vite+ task commands in vite.config.ts.

createCommand

Use createCommand when you want to build reusable command prefixes:

import { createCommand } from '@viyuni/vpp';

const vp = createCommand('vp');
const publish = vp.with('pm').with('publish');

vp('pack');
// => 'vp pack'

publish('--access public');
// => 'vp pm publish --access public'

Empty fragments are ignored and command fragments are trimmed.

createArgs

Use createArgs when you need an argv array instead of a shell command string:

import { createArgs } from '@viyuni/vpp';

const testArgs = createArgs('test').with('tests/foo.test.ts');

testArgs('-t', 'case name');
// => ['test', 'tests/foo.test.ts', '-t', 'case name']

vpRun

Use vpRun to generate vp run commands for Vite+ tasks and workspace runs:

import { defineConfig } from 'vite-plus';
import { vpRun } from '@viyuni/vpp';

export default defineConfig({
  run: {
    tasks: {
      build: {
        command: vpRun('build'),
      },
      dev: {
        command: vpRun('dev', {
          filter: '@my/app',
          parallel: true,
          recursive: true,
        }),
        cache: false,
      },
      details: {
        command: vpRun('', {
          lastDetails: true,
        }),
      },
    },
  },
});

Examples:

vpRun('build');
// => 'vp run build'

vpRun('test', {
  args: ['--reporter verbose'],
});
// => 'vp run test --reporter verbose'

vpRun('dev', {
  concurrencyLimit: 4,
  filter: ['@my/app', '!@my/utils'],
  parallel: true,
  recursive: true,
});
// => 'vp run -r --parallel --concurrency-limit 4 --filter @my/app --filter !@my/utils dev'

Configuration

Configure vpp in vite.config.ts. vpp is intended to live inside the Vite+ config because it extends Vite+ behavior:

import { defineConfig } from 'vite-plus';

export default defineConfig({
  vpp: {
    test: 'bun:test',
  },
});

You can also use object form when you need extra environment variables:

import { defineConfig } from 'vite-plus';

export default defineConfig({
  vpp: {
    test: {
      name: 'vitest',
      env: {
        NODE_ENV: 'test',
      },
    },
  },
});

If no test framework is configured, vpp defaults to:

{
  vpp: {
    test: 'vp',
  },
}

That resolves to:

vp test

Check Command

vpp check defaults to vp check and forwards arguments unchanged:

vpp check --fix
# => vp check --fix

Nuxt projects use the default vp check passthrough unless configured explicitly:

import { defineConfig } from 'vite-plus';

export default defineConfig({
  lint: {
    options: {
      typeCheck: true,
    },
  },
  vpp: {
    typecheck: 'nuxt',
  },
});

TypeScript projects can configure tsc manually:

import { defineConfig } from 'vite-plus';

export default defineConfig({
  lint: {
    options: {
      typeCheck: true,
    },
  },
  vpp: {
    typecheck: 'tsc',
  },
});

You can also provide a custom command:

export default defineConfig({
  vpp: {
    typecheck: {
      command: 'tsc',
      args: ['--noEmit'],
    },
  },
});

Supported flags match the Vite+ check command:

vpp check --fix
vpp check --no-fmt
vpp check --no-lint
vpp check --no-fmt --no-lint

Test Command Mapping

| vpp config | Resolved command | | ---------- | ---------------- | | vp | vp test | | vitest | vitest | | bun:test | bun test |

Arguments after vpp test are forwarded after the resolved test command:

vpp test tests/example.test.ts

For bun:test, this becomes:

bun test tests/example.test.ts

AI Prompt

When this project already has vpp available, prefer it for test commands.

  • Use vpp test instead of vp test.
  • Use vpp test <args...> instead of vp test <args...>.
  • Keep using existing Vite+ commands for non-test tasks, such as vp check, vp pack, and vp run <script>.
  • Fall back to vp test only if vpp is not available.

Local Development

Install dependencies:

vp install

Run tests:

vpp test

Run checks:

vp check

Build:

vp pack

Link locally as a global command:

pnpm link --global

Then run:

vpp test