Configuration

mel reads .mel/config.json at the repository root. If it’s missing, mel will create the .mel folder as needed. You can also provide a template (see Template) of defaults for anyone using the repo.

Index

main

Name of your default branch. Auto‑detected as main or master if absent.

update_strategy

How mel updates your workspace branch with the latest main during save/sync/update.

{ "update_strategy": "rebase" }

scripts

You can extend mel with custom commands callable via mel <name>.

{
  "scripts": {
    "test": "pytest -q --disable-warnings",
    "publish-site": { "cmd": "npm run deploy", "cwd": "site", "env": { "NODE_ENV": "production" } }
  }
}

Override built-ins with scripts: mel now checks scripts before built-in commands. This lets you replace a built-in like publish with your own flow.

Example: force contributors to open a PR instead of publishing directly by overriding publish to run mel open pr:

{
  "scripts": {
    "publish": "mel open pr"
  }
}

allow_package_scripts

If true, mel <name> falls back to your package manager when a script is not defined locally.

open_pr_on_sync

When true, after mel sync mel opens a prefilled PR URL (GitHub).

merge_message

Template for merge commit messages when using merge. Supports {branch}, {main}, {author}, {datetime}. For merges triggered by sync, use merge_message_after_sync.

{ "merge_message": "Merge {branch} into {main} by {author} @ {datetime}" }

merge_message_after_sync

Optional template used instead of merge_message when the merge happens during sync/update.

require_publish_confirmation

If false, skip the confirmation prompt in mel publish. Default: true.

require_add_confirmation

If true (default), show a list of files and require confirmation before adding them to a commit.

contributor_mode

Controls the help text shown by mel help:

Quick switch: Use mel mode basic or mel mode advanced to change modes without editing the config file.

{ "contributor_mode": "advanced" }

hooks

Run commands before/after key operations. Each entry can be a string or an object { cmd, cwd?, env? }.

{
  "pre_save": ["mel test"],
  "post_publish": [ { "cmd": "sh scripts/notify.sh", "env": { "CHANNEL": "#deploys" } } ]
}

Template

You can provide a template config at .mel/config_template.json (repo) or ~/.mel/config_template.json (user). On first run, mel will import it to .mel/config.json if none exists.

Example

In this example, we're setting the default branch to main, using rebase for updates, and opening a PR on sync. We're also defining a test script and a build script.

We're also defining two extra script commands that will allow users to run mel test and mel build.

Package manager scripts are also enabled here, so users can run package scripts with: mel <package-script-name>. For example, mel build will run npm run dev.

{
  "main": "main",
  "update_strategy": "rebase",
  "open_pr_on_sync": true,
  "merge_message": "Merge {branch} into {main} by {author} @ {datetime}",
  "scripts": {
    "test": "pytest -q --disable-warnings",
    "build": "npm run build -s"
  },
  "allow_package_scripts": true,
  "require_add_confirmation": true
}

Non‑interactive mode

For automation, set MEL_YES=1 (or pass --yes) to answer “yes” to confirmations and choose safe defaults.