mpgr is a small (~100 LoC) Bash wrapper around mise-en-place that provides a central task overlay for many projects.
Tasks live in one place. Projects stay separated. mpgr maps shared tasks onto any project directory using mise’s monorepo mode.
mpgr depends only on mise and uses its experimental_monorepo_root feature.
An example layout is included; typically you copy it to ~/.config/mpgr.
Each project directory inside your workspace contains:
- a small
mise.toml(usually 2 lines) - a
mise-tasks/directory (symlinks to shared tasks) - a project identifier path (e.g.
dotfiles/hypr,customer-a/ca-project-1)
mpgr scans the workspace and runs tasks for one or many projects.
Tasks run inside the project’s real working directory via MPGR_PROJECT_DIR.
Create a directory under your mpgr workspace, then add a minimal mise.toml:
[env]
MPGR_PROJECT_DIR = { value = "{{ env.HOME }}/.config/nvim" }Add a mise-tasks/ directory and point it to your shared tasks.
Example:
~/.config/mpgr/
mpgr # wrapper script
dotfiles/hypr # project descriptor (NOT the real code)
mise.toml
mise-tasks/ -> ~/git/mpgr/tasks/v0/
~/.config/mpgr/
dotfiles/
neovim
hypr
sway
customer-a/
ca-project-1
ca-project-2
customer-b/
ca-project-1
ca-project-2
opensource/
games/
ta/rl
bar/bar
Projects may be nested arbitrarily; mpgr treats all leaf directories with a mise.toml as projects.
Show mpgr + mise info:
mpgr run all infoRun editor for a single project:
mpgr run "dotfiles/hypr" editorRun in its own terminal:
mpgr run "dotfiles/hypr" editor -tRun for all projects:
mpgr run all editor -t
# or
mpgr run "..." editor -tVerbose editor info:
mpgr run all editor -vMPGR_VERBOSE=true mpgr run all info
MPGR_TRACE=true mpgr run all infogit clone --depth 1 https://github.com/jochumdev/mpgr.git
repo_dir="$(cd mpgr && pwd)"
cp -pfr mpgr/example ~/.config/mpgr
sed -i -e "s|\$MPGR_WORKSPACE/../mpgr|$repo_dir/mpgr|" ~/.config/mpgr/mpgr
ln -s ~/.config/mpgr/mpgr ~/.local/bin/mpgrClone:
git clone --depth 1 https://github.com/jochumdev/mpgr.git
mr="$PWD/mpgr"Copy example workspace:
cp -pfr mpgr/example ~/.config/mpgr
ws="$HOME/.config/mpgr"Patch wrapper path:
sed -i -e "s|\$MPGR_WORKSPACE/../mpgr|$mr/mpgr|" "$ws/mpgr"
grep "\$MPGR_WORKSPACE/../mpgr" "$ws/mpgr" && echo "FAILED"Expose wrapper:
ln -s "$ws/mpgr" ~/.local/bin/mpgrAdjust tasks and project definitions as needed.
| Var | Default | Description |
|---|---|---|
MPGR_TRACE |
false | Trace mode (enables verbose output) |
MPGR_VERBOSE |
false | Verbose logging |
MPGR_WORKSPACE |
script-dir | mpgr workspace (defaults to directory containing the wrapper) |
MPGR_HOME |
script-dir | Directory where mpgr itself lives (~/.config/mpgr by default) |
MPGR_PROJECT_DIR |
"" | Real working directory of the project |
| Var | Task | Description |
|---|---|---|
MPGR_EDITOR |
tasks/v0/editor |
Editor to run |
MPGR_TERMINAL |
tasks/v0/editor |
Optional terminal tool |
- Portable rewrite (Go/Rust)
- Autocomplete
- Dry-run mode
- CRUD operations for projects
- CRUD operations for tasks
mpgr task.{add,create,update,delete} "ta/rl" "mpgr:v0/existing" mpgr self-update(git pull)- Community-task source manager
PRs and feedback welcome.
The Unlicense