Skip to content
| Marketplace
Sign in
Visual Studio Code>Other>DCMS Copilot ToolsNew to Visual Studio Code? Get it now.
DCMS Copilot Tools

DCMS Copilot Tools

Balázs Winkler

|
2 installs
| (0) | Free
Custom language model tools for DCMS code generation via GitHub Copilot. Provides YAML validation, Laravel module generation, and Angular model generation.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

DCMS Copilot Tools

A VS Code extension that provides custom language model tools for DCMS (Domain-Driven Code Management System) development, integrated with GitHub Copilot.

Features

This extension provides five main tools for DCMS development that can be used through GitHub Copilot:

YAML Validation Tool (validate-yaml)

  • Validates YAML model definition files before code generation
  • Checks syntax and basic structure requirements for DCMS models
  • Usage: Ask Copilot to validate a YAML file and provide the file path

Laravel Module Generator (generate-module)

  • Generates complete Laravel modules including:
    • Model, Controller, Requests
    • Services, Repositories, DTOs
    • Tests, Migrations, Factories
  • Parameters:
    • yaml_file_path: Path to valid YAML definition
    • domain: Domain name in PascalCase (e.g., Customer, Product)
    • model_name: Model name in PascalCase (e.g., User, Ticket)
    • connection: Database connection (Tenant/Landlord, default: Tenant)
    • with_docker: Use Docker for generation (true/false, default: true)

Angular Model Generator (generate-angular-model)

  • Generates Angular model files from YAML definitions:
    • TypeScript model and interface files
    • Test files and response types
  • Parameters:
    • yaml_file_path: Path to YAML definition
    • module_name: Angular module name (e.g., Ticketing, Customer)
    • model_name: Model name in PascalCase

Angular Create-Edit Component Generator (generate-angular-create-edit-component)

  • Generates Angular create-edit components from YAML definitions:
    • TypeScript component with proper dd-input field mappings
    • HTML template, SCSS file and spec tests
    • Extends AppBaseCreateEditComponent with OnPush strategy
  • Parameters:
    • yaml_file_path: Path to YAML definition
    • module_name: Angular module name (e.g., Ticketing, Customer)
    • model_name: Model name in PascalCase

Angular List Component Generator (generate-angular-list-component)

  • Generates Angular list components from YAML definitions:
    • TypeScript component with Bootstrap grid layout
    • Proper field formatting (phone, email, dates)
    • Inline editing support for boolean fields
    • Extends AppBaseListComponent with OnPush strategy
    • Supports x-ui-list configuration for field control
  • Parameters:
    • yaml_file_path: Path to YAML definition
    • module_name: Angular module name (e.g., Ticketing, Customer)
    • model_name: Model name in PascalCase

How to Use

  1. Install the extension in VS Code
  2. Open GitHub Copilot Chat
  3. Ask Copilot to use the DCMS tools, for example:
    Please validate my YAML file at ./models/user.yaml using the validate-yaml tool
    
    Generate a Laravel module for a Customer model in the CRM domain using the generate-module tool
    
    Create Angular models for a Ticket in the Ticketing module using the generate-angular-model tool
    
    Generate an Angular create-edit component for a Customer in the CRM module using the generate-angular-create-edit-component tool
    
    Create an Angular list component for Products in the Inventory module using the generate-angular-list-component tool
    

Example Commands

YAML Validation

Validate my Customer model definition at ./sample-customer-model.yml

Laravel Module Generation

Generate a Customer module in the Customer domain with Tenant connection from ./Customer.yml

Angular Model Generation

Create Angular Ticket model in Ticketing module from ../laravel/src/ModelDefinitions/Ticket.yml

Angular Component Generation

Generate create-edit component for Customer in Customer module from ../laravel/src/ModelDefinitions/Customer.yml
Generate list component for Products in Inventory module from ./models/Product.yml

Requirements

  • VS Code 1.104.0 or higher
  • GitHub Copilot extension
  • Node.js (for Angular generation)
  • PHP/Docker (for Laravel generation)

Installation

  1. Install from VS Code Marketplace (when published) or
  2. Package locally:
    npm install
    npm run package
    
    Then install the generated .vsix file

For Developers

Prerequisites

  • Node.js 18+ and npm
  • VS Code 1.104.0+
  • Git

Development Setup

  1. Clone the repository:

    git clone <repository-url>
    cd copilot-dcms-tools
    
  2. Install dependencies:

    npm install
    
  3. Start development with watch mode:

    npm run watch
    

Available Scripts

Development

  • npm run compile - Compile TypeScript and run linting
  • npm run watch - Start watch mode for development (runs TypeScript and esbuild watchers)
  • npm run watch:tsc - Watch TypeScript compilation only
  • npm run watch:esbuild - Watch esbuild bundling only

Quality Assurance

  • npm run check-types - Type check without emitting files
  • npm run lint - Run ESLint on source files
  • npm test - Run full test suite (includes pretest compilation)
  • npm run pretest - Compile tests and source code before running tests

Building

  • npm run package - Create production build (type check + lint + bundle)
  • npm run compile-tests - Compile test files to out/ directory

Testing

The project includes comprehensive unit tests:

# Run all tests
npm test

# Run tests in watch mode during development
npm run watch-tests

Tests cover:

  • Extension activation and presence
  • Language Model Tool registration
  • All 5 DCMS tools availability

Building for Production

# Create production bundle
npm run package

# The compiled extension will be in dist/extension.js

Publishing to VS Code Marketplace

  1. Install vsce (VS Code Extension CLI):

    npm install -g vsce
    
  2. Package the extension:

    vsce package
    # Creates copilot-dcms-tools-0.0.1.vsix
    
  3. Publish to marketplace:

    vsce publish
    # Requires publisher account and access token
    

Local Testing

  1. Open VS Code in the project directory
  2. Press F5 to launch Extension Development Host
  3. Test the extension in the new VS Code window
  4. Use GitHub Copilot Chat to test the tools

Project Structure

  • src/extension.ts - Main extension entry point
  • src/test/ - Unit tests
  • scripts/ - Shell scripts for tool execution
  • examples/ - Sample YAML files for testing
  • dist/ - Compiled output
  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2025 Microsoft