CLI
List and validate plugins
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.
List plugins
Run it from your app, or from anywhere in its workspace:
vitnode plugin list◆ VitNode
Plugins
Plugin Version Source
───────────────────────────────────────────────────────────
@vitnode/blog 2.0.0-canary.13 workspace
@acme/search 1.1.2 package
@acme/forum (not configured) 0.1.0 workspace
2 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
vitnode plugin validate # every plugin, or the one you are in
vitnode plugin validate blog # one plugin, by id, package name or folder◆ VitNode
Validate plugins
@vitnode/blog plugins/blog
✓ Package 2.0.0-canary.13
✓ Plugin definition
✓ API definition
✓ Routes 3 routes
✓ Translations en
✓ AdminCP navigation
✓ Database schema 6 tables
✓ 1 plugin validValidation reads the plugin's build output, the dist files your app imports, so build the plugin first. 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/blog requires the permission posts.can_manage,
but @acme/blog does not register it in buildApiPlugin({ permissionStaff: { admin } }).
dist/src/admin/nav.js
✖ 1 plugin failed validation: @acme/blogvitnode 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.