The veap command-line interface provides scaffolding, plugin management, database migration generation, and deployment utilities. It is distributed with @veap/core and runs via your package manager's runner.
bunx veap <command> [options]
# or
pnpm exec veap <command> [options]
# or
npx veap <command> [options]Global options#
| Flag | Description |
|---|---|
-h, --help | Display help for the CLI or a specific command. |
-v, --version | Output the current version of @veap/core. |
Commands#
veap init [name]#
Initialize a new Veap project in an existing directory or create a new project directory. If the project name is omitted in an interactive terminal, the CLI prompts for a name and optional Docker configuration.
veap init my-projectOptions
| Option | Description |
|---|---|
--docker | Generate Docker configuration (Dockerfile, compose.yml, .dockerignore). |
--no-docker | Skip Docker configuration without prompting. |
--skip-install | Skip running the package manager installation step. |
--pm <manager> | Specify package manager (bun, pnpm, npm, yarn). Auto-detected when omitted. |
veap add <plugin>#
Install an official or third-party Veap plugin package and automatically register it in the application's plugin registry (lib/plugins.gen.ts).
# Install from npm registry
veap add @veap/commentable
# Install from Git repository into local workspace
veap add https://github.com/user/my-veap-plugin.git --localOptions
| Option | Description |
|---|---|
--local | Clone and install the plugin into the local plugins/ directory. |
--skip-install | Add the dependency to package.json without executing the install step. |
Running veap add executes:
- Package installation via the active package manager.
- Discovery of the plugin manifest from the installed package's
package.json. - Automatic regeneration of
lib/plugins.gen.ts.
veap eject <package>#
Eject an installed npm plugin or template into your project's local plugins/ or templates/ folder, allowing you to modify and customize its source code directly.
# Eject an installed plugin
veap eject @veap/commentable
# Eject an installed template
veap eject @veap/minimal-templateThe CLI:
- Detects whether the package is a plugin or template (inspecting
veap.typein itspackage.json). - Clones the package repository into
plugins/<name>ortemplates/<name>. - Updates root
package.jsondependencies to point to the local workspace (workspace:*). - Re-links workspace packages with the detected package manager.
- Re-syncs
lib/plugins.gen.ts(when ejecting a plugin).
veap make:plugin <name>#
Scaffold a new, self-contained local plugin in the plugins/ directory.
veap make:plugin blogOptions
| Option | Description |
|---|---|
--skip-install | Skip updating package manager workspace dependencies. |
Generated structure
plugins/blog/
├── package.json # Contains "veap" metadata block (id, name, type: "plugin")
├── tsconfig.json # TypeScript project references
└── src/
├── index.ts # IPlugin export definition
└── app/
└── page.tsx # Starter page routeThe new plugin is automatically registered in lib/plugins.gen.ts.
veap make:template <name>#
Scaffold a new layout and presentation template under templates/<name>.
veap make:template modern-themeOptions
| Option | Description |
|---|---|
--skip-install | Skip updating workspace dependencies. |
veap make:migration <name>#
Generate a timestamped native application migration file inside the migrations/ directory.
veap make:migration create_articles_tableGenerated file format
// migrations/0002_create_articles_table.ts
import type { Knex } from "knex";
export const name = "0002_create_articles_table";
export async function up(db: Knex, schema: Knex.SchemaBuilder): Promise<void> {
await schema.createTable("articles", (table) => {
table.uuid("id").primary();
table.string("title").notNullable();
table.text("content").notNullable();
table.timestamps(true, true);
});
}
export async function down(
db: Knex,
schema: Knex.SchemaBuilder,
): Promise<void> {
await schema.dropTableIfExists("articles");
}Migrations are tracked in the database migrations table and executed during application boot (withDatabase() and withMigrations()).
veap register#
Re-scan all local workspace plugins (plugins/*) and npm dependencies declaring veap metadata in package.json, then regenerate lib/plugins.gen.ts.
veap registerUse this command when you manually clone plugins, remove packages, or update workspace manifests without running veap add or veap make:plugin.
veap docker#
Generate production-ready Docker deployment files customized for your detected package manager (bun, pnpm, npm, or yarn).
veap dockerGenerated files
Dockerfile: Multi-stage build leveraging Next.js standalone output.compose.yml: Local Docker Compose service configuration..dockerignore: Exclusions for node_modules, build caches, and sensitive environment files.