DocumentationCLI Reference

VexBlocks CLI

Command-line interface for managing your VexBlocks projects

Overview

The VexBlocks CLI is a powerful tool that helps you scaffold, manage, and upgrade your VexBlocks CMS projects. It handles everything from initial setup to package management and updates.

Installation

The CLI is distributed via npm and can be run using npx without installation:

npx @vexblocks/cli [command]

Or install it globally for frequent use:

npm install -g @vexblocks/cli

Note: We recommend using npx to always use the latest version.

Available Commands

Global Options

All commands support the following global options:

OptionDescription
--yes, -ySkip all prompts and use default values
--cwdSet the working directory for the command
--help, -hDisplay help for the command

Project Structure

VexBlocks projects follow a Turborepo monorepo structure:

my-project/
├── apps/
│   └── cms/                    # CMS Dashboard (Next.js)
├── packages/
│   ├── backend/               # Convex backend
│   ├── cms-shared/            # Shared utilities & types
│   └── type-generator/        # Type generation tool
├── package.json
├── turbo.json
└── vexblocks.json            # VexBlocks manifest

Manifest File

The vexblocks.json file tracks installed packages and versions:

{
  "version": "1.0.0",
  "packages": {
    "cms": {
      "version": "1.0.0",
      "installedAt": "2024-01-15T10:30:00.000Z",
      "path": "apps/cms"
    },
    "backend": {
      "version": "1.0.0",
      "installedAt": "2024-01-15T10:30:00.000Z",
      "path": "packages/backend"
    }
  }
}

Important: Some files are protected and won't be overwritten during upgrades:

  • packages/backend/vexblocks.config.ts
  • packages/backend/.env
  • packages/cms-shared/src/types/generated.ts

Next Steps