---
title: Modeler Setup
aliases: [modeler, plugin, workspace, sf mdl, sfdx modeler]
sources: [sources/sessions/2026-02-18-modeler-setup.md]
last_updated: 2026-04-19
status: seed
---

# Modeler Setup

Plugin installation, workspace commands, and development environment setup for the CG Mobile App metadata framework.

## Prerequisites

-   **Node.js:** v20.9.0 (required for modeler plugin)
-   **Salesforce CLI:** Latest version
-   **npm registry access:** For @ind-rcg/modeler-sfdx-cli-plugin

## Installation

### Local Installation

```bash
sfdx plugins:install @ind-rcg/modeler-sfdx-cli-plugin
```

### CI/CD Installation

> Internal Salesforce teams: configure your CI/CD pipeline with the appropriate
> npm registry URL and node-header download URL for your environment. These are
> infrastructure-specific and not included in client-facing documentation.

```bash
sfdx plugins:install @ind-rcg/modeler-sfdx-cli-plugin --verbose
```

## Workspace Commands

| Command                          | Alias           | Description                                      |
| -------------------------------- | --------------- | ------------------------------------------------ |
| `sfdx modeler:workspace:create`  | `sf mdl create` | Creates a new modeler workspace                  |
| `sfdx modeler:workspace:build`   | `sf mdl build`  | Builds metadata contracts into runtime artifacts |
| `sf mdl clean`                   | —               | Cleans build artifacts                           |
| `sfdx modeler:workspace:package` | —               | Packages build output into deployment.zip        |
| `sf mdl simulate`                | —               | Starts local dev server (http://localhost:3000)  |

## Development Workflow

```
1. Create/edit XML contracts in src/{Module}/
2. sf mdl build          # Compile and validate
3. sf mdl simulate       # Test in browser
4. Run Jest tests        # Validate business logic
5. sf mdl package        # Package for deployment
```

## Workspace Structure

```

├── src/                 # Source contracts (XML + JS)
├── test/                # Jest unit tests
├── appl/build/          # Build output
├── jest.config.js       # Test configuration
└── package.json         # Dependencies
```

## Cross-References

-   [[testing-and-build]] — Detailed build and test documentation
-   [[architecture-overview]] — How the modeler fits into the overall system
