CLI
Plugin commands
List the plugins a VitNode app uses with vitnode plugin list, and check them with vitnode plugin validate before a build or in CI.
vitnode plugin list shows which plugins your app uses and where they come from. vitnode plugin validate loads each plugin the way your app will, so a broken plugin fails here with a clear message instead of halfway through a build.
To create a plugin, use the generator, which also registers, installs and builds it. See Create a plugin.
Run both commands through your package manager inside an app or plugin folder, for example cd apps/web && pnpm vitnode plugin list. The workspace root does not depend on @vitnode/core, so vitnode is not found there.
List plugins
pnpm vitnode plugin listā VitNode
Plugins
Plugin Version Source
āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā
@vitnode/blog 2.0.0-canary.13 workspace
@vitnode/forum 2.0.0-canary.13 workspace
newsroom 0.1.0 workspace
site-notes 0.1.0 workspace
4 plugins configured in this appThe list comes from your app's vitnode.config.ts, read by the same loader the app's build uses.
| Value | Meaning |
|---|---|
workspace | A package in this repository |
package | Installed from a registry into node_modules |
(not configured) | A workspace plugin your app does not use yet |
not installed | The app's config names the plugin, but the package is missing |
--verbose adds each plugin's path and description.
Validate plugins
pnpm vitnode plugin validate # every plugin, or the one you are in
pnpm vitnode plugin validate site-notes # one plugin, by id, package name or folderā VitNode
Validate plugins
site-notes ../../plugins/site-notes
ā Package 0.1.0
ā Plugin definition
ā API definition
ā Routes 3 routes
ā Translations en
ā AdminCP navigation
ā Database schema 1 table
ā 1 plugin validValidation reads the plugin's build output, the dist files your app imports, so build the plugin first (its build:plugins script, or pnpm build:plugins at the workspace root). Each check runs only when the plugin has that part:
| Check | Fails when |
|---|---|
| Package | package.json is missing, name is not a valid plugin id, type is not module, or exports lacks ./* or ./config |
| Build output | dist/src/config.js is missing: build the plugin first |
| Plugin definition | dist/src/config.js exports no buildPlugin() factory, or its pluginId is not the package name |
| API definition | dist/src/config.api.js exports no working buildApiPlugin() factory, or its pluginId does not match |
| Routes | The route tree does not compile, or a lazy(() => import(...)) page file is missing |
| Translations | A locale file is unreadable, lacks the plugin's top-level key, or a route's messages namespace is missing |
| AdminCP navigation | A nav item requires a permission the plugin does not register in permissionStaff.admin |
| Database schema | A schema module fails to load, or two modules declare the same table |
A translation file that is only missing some keys gets a ! warning, not a failure, so a half-translated language does not block a release.
A failure says what is wrong and where:
ā AdminCP navigation
AdminCP navigation item /admin/site-notes requires the permission notes.can_create,
but site-notes does not register it in buildApiPlugin({ permissionStaff: { admin } }).
dist/src/admin/nav.js
ā 1 plugin failed validation: site-notesvitnode plugin validate exits with code 1 when any plugin is invalid, so it can gate a CI job. An unknown plugin name exits with code 2 and lists the plugins it knows.