Skip to content
Contact Us

Setup

Get up and running with your favorite IDE and MirthSync in just a few minutes. This guide works with any IDE or text editor.

  • MirthSync installed and configured
  • A Mirth Connect or OIE instance to connect to
  • Your preferred IDE or text editor installed

Create a directory for your Mirth configuration files:

Terminal window
mkdir my-mirth-project
cd my-mirth-project

Pull your current Mirth Connect or OIE configurations:

Terminal window
./mirthsync.sh pull -s https://server:8443/api -u admin -t .

This creates a file structure like:

my-mirth-project/
├── Channels/
│ └── Default Group/
│ └── My_Channel/
│ ├── channel.xml
│ └── sourceConnector.js
├── CodeTemplates/
│ └── My Library/
│ └── template.xml
└── GlobalScripts/

Open the project folder in your IDE:

VS Code:

Terminal window
code .

Sublime Text:

Terminal window
subl .

Other IDEs: Use your IDE’s File > Open Folder menu and select your project directory.

Step 4: Configure File Associations (Optional)

Section titled “Step 4: Configure File Associations (Optional)”

Most IDEs will automatically recognize XML and JavaScript files. However, you may want to configure:

  • XML files - Ensure proper syntax highlighting for channel.xml files
  • JavaScript files - Enable JavaScript syntax for transformer scripts
  • JSON files - For metadata.json and configuration files

VS Code typically auto-detects file types, but you can add to .vscode/settings.json:

{
"files.associations": {
"channel.xml": "xml",
"*.xml": "xml"
}
}

Most modern IDEs automatically detect file types. If needed, check your IDE’s settings for file type associations.

  1. Navigate to a channel folder (e.g., channels/ADT_Inbound/)
  2. Open channel.xml in your IDE
  3. Find a JavaScript transformer section
  4. Make a small edit (add a comment, modify a variable)
  5. Save the file

You should see:

  • Syntax highlighting for XML tags
  • JavaScript syntax highlighting in transformer sections
  • Proper indentation and formatting

Use your IDE’s Git integration or command line:

Terminal window
# See what changed
./mirthsync.sh -t . git status
./mirthsync.sh -t . git diff
# Commit your changes
./mirthsync.sh -t . git add
./mirthsync.sh -t . --commit-message "Update-channel-transformer" git commit

Deploy your changes back to Mirth Connect:

Terminal window
./mirthsync.sh push -s https://server:8443/api -u admin -t .

Your changes are now live in Mirth Connect!

For optimized setups and advanced features:

Most IDEs support “Find in Files” or “Search in Project”:

  • VS Code: Ctrl+Shift+F (Windows/Linux) or Cmd+Shift+F (Mac)
  • Sublime Text: Ctrl+Shift+F (Windows/Linux) or Cmd+Shift+F (Mac)
  • Most IDEs: Similar keyboard shortcuts or use Edit menu → Find in Files

Search for function names, variable names, or any text across all your channels and code templates.

Many IDEs support editing multiple files simultaneously:

  • Split panes to compare channels side-by-side
  • Use multi-cursor editing for bulk changes
  • Open related files in tabs for quick navigation

Most modern IDEs have built-in Git support:

  • View file changes with visual diffs
  • Stage and commit from the IDE
  • Browse commit history
  • Create and switch branches