@baseplate-dev/project-builder-dev
v0.6.6
Published
Developer tooling CLI for Baseplate plugin authors
Maintainers
Readme
@baseplate-dev/project-builder-dev
Developer tooling CLI for Baseplate plugin authors. Provides the baseplate-dev binary with commands for template management, snapshots, and project synchronization.
Usage
Install as a dev dependency in your plugin or monorepo:
pnpm add -D @baseplate-dev/project-builder-devThen run commands via:
pnpm baseplate-dev --helpCommands
templates— Extract, generate, create, list, and delete generator templatessnapshot— Add, remove, save, and show project snapshotssync-examples— Sync all example projects in the nearestexamples/directoryinit <name> --type example|test— Initialize a new example or test projectrun-env <test-name>— Start a test project environment for developmentserve— Start the project builder web UIdev-server— Start the MCP-integrated development servermcp— Start the MCP stdio server with full action set (templates, snapshots, sync, diff)
Configuration
baseplate.config.json
Place a baseplate.config.json in the directory where you run baseplate-dev:
{
"examplesDirectory": "examples",
"testProjectsDirectory": "tests",
"pluginRootDirectories": ["plugins"]
}| Field | Description |
| ----------------------- | --------------------------------------------------- |
| examplesDirectory | Directory whose subdirectories are example projects |
| testProjectsDirectory | Directory whose subdirectories are test projects |
| pluginRootDirectories | Array of directories to search for plugins |
All paths are relative to the config file location. All fields are optional.
Environment Variables
| Variable | Description |
| --------------------- | -------------------------------------------- |
| PROJECT_DIRECTORIES | Comma-separated paths to search for projects |
| NO_BROWSER | Disable auto-opening browser in serve |
| PORT | Port for the serve command |
| PORT_OFFSET | Offset added to the default port in serve |
Programmatic API
import { generateProject } from '@baseplate-dev/project-builder-dev';
// Generates a Baseplate project from its project-definition.json
// Plugins are auto-discovered from the project directory's package.json
await generateProject('/path/to/project');