Multi-set workflows
Environments
Messagevisor does not have a separate environment concept. In practice, environments are modeled with sets, and promoted through a linear workflow.
Initialize with environments#
Quickest way is to make use of the CLI init command:
$ npx messagevisor init --project=environmentsThis will scaffold a new project with dev, staging, and production sets, and ready to use:
The directory structure would look something like the following:
$ tree.├── sets│ ├── dev│ │ ├── locales│ │ ├── messages│ │ ├── targets│ │ └── tests│ ├── staging│ │ ├── locales│ │ ├── messages│ │ ├── targets│ │ └── tests│ └── production│ ├── locales│ ├── messages│ ├── targets│ └── tests├── messagevisor.config.js└── package.jsonWhy use sets for environments#
- isolated authoring state per environment
- explicit promotion flows between environments
- per-environment datafiles builds
- per-environment tests and catalog views
Promoting changes linearly#
Promotion flows can be made stricter by defining allowed flows in messagevisor.config.js:
module.exports = { sets: true, promotionFlows: [ { from: "dev", to: "staging" }, { from: "staging", to: "production" }, ],};This keeps promotion behavior aligned with your release model.
Preview promotions#
Run this command to preview what is promotable between sets:
$ npx messagevisor promote --from=dev --to=stagingApply promotions#
If you are ready to apply the promotion, run this command:
$ npx messagevisor promote --from=dev --to=staging --applyThis will write the merged result to the destination set files. The changes are now file system modifications. Commit them to your branch and open a pull request. You can also add --audit=markdown to generate an audit file for the promotion.
Learn more in Promotions.

