Links

WMT Design Tool

The WMT Design Tool is a command line interface (CLI) to manage and synchronize WEM Design Templates. At the moment, this tool is only available for MS Windows.
This tool allows you to connect to the WEM Design Template Server, get available design templates, create copies and upload changes.
To change the contents of Design Template (html, css, less) you can use the Visual Studio Code editor, that allows you to access the local copies of your Design Templates and provides a powerful tool to work with the files and make changes.

Getting Started with WMT on Windows

Download and run the WMT Design Tool Installer from the following location:
  • This installer is only for Windows!
  • The publisher is not officially trusted by Windows so you will need to explicitly override the warning to allow download and installation of this file.
After installation, the wmt command is available from the command prompt (or PowerShell):
C:\> wmt
The first time you run this command, it will ask for a few configuration settings:
  1. 1.
    Username - this should be the e-mail address that you use to login to the WEM Modeler.
  2. 2.
    Template path - the location where the design templates are stored locally. An example location could be C:\WEM Design Templates or E:\Wem\DesignTemplates as used in examples below.
C:\> wmt
No configuration found.
Username: *************
Template path: E:\Wem\DesignTemplates
The configuration has been saved.
These settings can always be changed by running wmt config set:
C:\> wmt config set -?
Description:
Alters the current configuration
Usage:
Wmt config set [options]
Options:
-s, --server <server> The hostname of the remote wmt server
-u, --user <user> The user which will be used to connect to the remote wmt server
-p, --path <path> The root directory in which all the master templates are stored
-?, -h, --help Show help and usage information

Login

Before working with the WMT tool, you need to login to the remote server:
C:\> wmt login
It will prompt for a password. Use the same password that you use to login to the WEM modeler.
You can also explicitly logout of the server, using the wmt logout command.

Features

Use -? with any command to show help and usage information
C:\> wmt -?
Description:
WMT is a tool to manage WEM design templates
Usage:
Wmt [command] [options]
Options:
--version Show version information
-?, -h, --help Show help and usage information
Commands:
config
login Logs in to the remote wmt server
logout Logs out from the remote wmt server
collection
template
version Shows the version of this WMT command line interface

Config

C:\> wmt config -?
Description:
Usage:
Wmt config [command] [options]
Options:
-?, -h, --help Show help and usage information
Commands:
show Shows the current configuration
set Alters the current configuration
C:\> wmt config show
Server: https://wmt.wem.io
User: ******************
Path: E:\Wem\DesignTemplates
Logged in: yes

Collection

To get access to already existing custom Design Templates / Collections through the WMT Tool, WEM Support needs to explicitly link your account to the Design Template Collections.
This is NOT necessary if you want to work with existing Global Templates as a base for new custom templates > read Create a new Design Template from a Source Template
Please create a Support Ticket in MyWEM, requesting access to specific Custom Design Template Collections, make sure you specifically indicate the Custom Design Templates you need access to.
A collection is used to group multiple Design Templates and can be linked to Workspaces, to make the Design Templates available in WEM Modeler Projects within those Workspaces. To make a certain Collection available to projects in your workspace, you need to use the share command to create a token, then use that token in WEM Modeler > Manage Workspaces > Add Design Template Collection.
C:\> wmt collection -?
Description:
Usage:
Wmt collection [command] [options]
Options:
-?, -h, --help Show help and usage information
Commands:
list Shows a list of existing template collections
create <name> Creates a new template collection
share <name> Creates a token to link the collection to workspace

Template

C:\> wmt template -?
Description:
Usage:
Wmt template [command] [options]
Options:
-?, -h, --help Show help and usage information
Commands:
list Shows a list of existing templates
download <name> Downloads an existing template from the server
create Create a new template
pull Pulls the latest version from the server
push Pushes the local changes to the server
commit Commit the changes on the server
compare Compares the local files with the version on the remote server
autopush Watches for file changes and automatically pushed the changes to the server
The list, download and create commands can work from any current folder, because they use the root-folder from the configuration and fully-qualified Design Template Names ("Collection\Template") in case of download and create.
All other commands MUST be executed from within the local folder of a specific Design Template, so make sure you use the Change Directory (cd) command to set your CLI into the correct Template Folder.

Create a new Design Template from a Source Template

C:\> wmt template create -?
Description:
Create a new template
Usage:
Wmt template create [options]
Options:
-n, --name <name> (REQUIRED) The name of the new template
-s, --source <source> (REQUIRED) The name of the source template
-?, -h, --help Show help and usage information
To create a new Design Template, you always use an existing Design Template as source. A copy of all files and folders will be made with the new name.
The Names of the source and new Template should be like: -n "Collection Name\Template Name" -s "Collection Name\Template Name".
The available Global Templates can be used as source for your own new custom Templates. To get a list of all available Global Templates, use wmt template list --global:
E:\Wem\DesignTemplates> wmt template list --global
NAME CREATED MODIFIED
Global\Corcovado 31-5-2022 04:53:08 31-5-2022 04:53:08
Global\Customizable - Main 31-5-2022 04:53:08 31-5-2022 04:53:08
Global\Dashboard - Basic blue 31-5-2022 04:53:09 31-5-2022 04:53:09
Global\Dashboard - Basic grey 31-5-2022 04:53:09 31-5-2022 04:53:09
Global\Dashboard - Basic purple 31-5-2022 04:53:09 31-5-2022 04:53:09
Global\Dashboard - Basic red 31-5-2022 04:53:09 31-5-2022 04:53:09
Global\Dashboard - Dark and blue 31-5-2022 04:53:09 31-5-2022 04:53:09
Global\Dashboard - Light 31-5-2022 04:53:09 31-5-2022 04:53:09
Global\Default 31-5-2022 04:53:09 31-5-2022 04:53:09
Global\Foodz.nl 31-5-2022 04:53:09 31-5-2022 04:53:09
Global\Grand Canyon 31-5-2022 04:53:09 31-5-2022 04:53:09
Global\Mobile - Android 31-5-2022 04:53:10 31-5-2022 04:53:10
Global\Mobile - iOS 31-5-2022 04:53:10 31-5-2022 04:53:10
Global\Mont Blanc 31-5-2022 04:53:10 31-5-2022 04:53:10
Global\Mont Forel 31-5-2022 04:53:10 31-5-2022 04:53:10

Pull and Push to synchronize files

To pull the latest version of a specific Design Template or push changes from your local folder to the WMT Server, you first need to set the current folder in your CLI tool.
E:\Wem\DesignTemplates\Collection\Template> wmt template pull
There were no changes
The push command updates the remote files with the local changes you made. This action will also perform a compile and control step to inform you of any faults that may be in the contents.
The push command will NOT update the Design Template in the WEM Modeler - for that final step you need to execute the commit command.

Compare

From within a local Design Template Folder, the WMT tool compares the local files to the server files and provides details on the files and lines which are different.

Commit

From within a local Design Template Folder, the commit action performs the final step to make your changes available to the WEM Modeler for Preview, and for the publish process to Staging and Live.

Autopush

When you use the autopush command in a specific local Design Template folder, it will automatically trigger the push command when a local file has been changed and saved.