Skip to main content

Scaffold

Create a new connector project with the generic-erp-connector template using the mmdev CLI.

Install the CLI

Install mmdev (see mmdev CLI) on macOS, Linux, or Windows via WSL:

/bin/bash -c "$(curl -fsSL https://machinemetrics-public.s3.us-west-2.amazonaws.com/MMDevCli/install_cli.sh)" && exec $SHELL -l

This documentation was written against mmdev version 0.52.0. Verify your install:

mmdev --version

A newer published mmdev version may work; if commands or templates differ, check the mmdev CLI updates page or the version you installed.

Authenticate

mmdev login
mmdev oauth dev-init

See Authentication and OAuth Management for details.

If you cannot complete authentication, see Appendix: Scaffold fallbacks for alternate ways to obtain a project tree.

Create the connector project

mmdev create <connector-name> -t generic-erp-connector -o <destination-path>

Example:

mmdev create acme -t generic-erp-connector -o ./acme-connector

The generic-erp-connector template is bundled inside the published mmdev binary—not a separate download. Templates are transport-agnostic starting points for REST, GraphQL, ODBC, CSV, and custom protocols.

See also Project Management for mmdev create options.

Confirm the project builds

From your project root (<destination-path>):

npm install
npm run build

A successful build confirms the scaffold is valid. npm install also installs @machinemetrics/mm-erp-sdk and makes SDK reference docs (such as CONNECTOR_SDK_UTILITIES.md and MM_ENTITY_KEYS_REFERENCE.md) available under node_modules/@machinemetrics/mm-erp-sdk/.

Next step: Deploy

Continue with Deploy. Doing so for a skeletal connector will assert that credentials are appropriate for access to MachineMetrics APIs, and that your deploy target has the appropriate network access.


Appendix: Scaffold fallbacks

Use these paths when the primary mmdev create flow above is blocked by authentication or authorization.

If neither fallback fits your situation, contact your MachineMetrics contact.

Fallback A: Delegated scaffold

A MachineMetrics contact (or anyone with OAuth rights to run mmdev create) can:

  1. Run mmdev create <connector-name> -t generic-erp-connector on your behalf.
  2. Grant you access to the resulting GitHub repository, or deliver a project archive.

You then continue with Deploy.

Fallback B: Manual template copy

Copy the generic-erp-connector template from the mmdev-cli repository and apply token replacements manually.

Requires GitHub org access

The mmdev-cli repository is private. Requires MachineMetrics GitHub org access. Otherwise use Fallback A or contact your MachineMetrics contact.

Template path: src/templates/generic-erp-connector/

Replace tokens as mmdev create would (from create.js):

TokenReplaced with
MMDEV_PROJECT_NAMEShort project name
MMDEV_PROJECT_NAME_PASCALPascalCase variant
MMDEV_PROJECT_NAME_KEBABkebab-case variant
MMDEV_PROJECT_NAME_TITLETitle-case variant
MMDEV_SCOPED_PROJECT_NAMEScoped name (if applicable)
MMDEV_YEARCurrent year

After replacement, run npm install and npm run build in the project root and continue with Deploy.