CLI
To start muil cli run:
yarn muil-cli [options]
or
npm run muil-cli -- [options]
To use options with npm run
npm run muil -- <args>
. See here
Initialization
Before you can publish templates you should add .muilrc
file to your root folder:
{
"host": "YOUR_HOST_ADDRESS",
"apiKey": "YOUR_API_KEY"
}
host
- is optional - if you are using our SaaS option you can remove it. if you are using the on-premise solution you should change it to the address of the server.
apiKey
- is required - go to the portal and create a new api key and paste it here.
Publish
This command builds all templates and uploads to muil
Usage: muil-cli publish [options]
Publish email templates
Options:
-d --templatesDirectory <templatesDirectory> Templates root directory (default: "./templates")
-b --branch <branch> templates branch (default: "master")
-h, --help output usage information
This action will clear all templates in this branch and upload the new templates!
Unpublish
This command cleans the branch from all templates
Usage: muil-cli unpublish [options]
Unpublish email templates
Options:
-b --branch <branch> templates branch, default: master
-h, --help output usage information
This action will clear all templates in this branch!
Build
This command builds all templates without uploading!
Usage: muil-cli build [options]
Publish email templates
Options:
-d --templatesDirectory <templatesDirectory> Templates root directory (default: "./templates")
// Upload assets to AWS
--aws_access_key_id <aws_access_key_id> aws access key id
--aws_secrete_access_key <aws_secrete_access_key> aws secrete access key
--aws_bucket_name <aws_bucket_name> aws aws_bucket_name
// Upload assets to Google Cloud
--gcs_key_file_path <gcs_key_file_path> google cloud .json credential file path
--gsc_bucket_name <gsc_bucket_name> google cloud storage bucket name
// Upload assets to Azure
--azure_account_name <azure_account_name> azure account name
--azure_account_key <azure_account_key> azure account key
--azure_share_name <azure_share_name> azure share name
--azure_dir_name <azure_dir_name> azure dir name
-h, --help output usage information