Run mise tasks from Emacs. Discovers, executes, and cancels long-running tasks with a compilation-mode buffer per project. Plays nicely with Projectile.
Complements the existing env-injection packages like mise.el. mise-tasks covers the task-runner side.
- Runs tasks, not just env. Other existing mise Emacs packages focus on injecting environment variables — none run tasks.
mise-tasksfills that gap and stays out of env handling, so it composes cleanly on top of whichever env package you already use. - Fits your existing workflow.
mise-tasks-projectile-modereroutesprojectile-compile-project(SPC p c) through mise inside mise projects, and leaves it untouched everywhere else — so picking a task uses muscle memory you already have. - Monorepo support. Auto-detects
experimental_monorepo_root = trueand engages mise's experimental monorepo discovery, including settingMISE_EXPERIMENTAL=1in the subprocess env, which GUI Emacs sessions on macOS otherwise miss. - Task discovery via
mise tasks --json: global tasks (~/.config/mise/config.toml), project tasks (mise.toml), and gitignored override tasks (mise.local.toml). - Works with any completion UI. Task descriptions and
[global]scope markers show through standardannotation-functionmetadata thatvertico,marginalia,helm,ivy, and default completion all render — and when a global and project task share a name, both stay selectable via a[scope:source]suffix. - Process management. Tasks run through
compile, soC-c C-k/M-x kill-compilationworks as you expect, andmise-tasks-killadds a SIGINT-then-SIGKILL escalation for anything that ignores the first signal. Each project gets its own*mise: <project>*buffer, so re-runs reuse it and different projects run concurrently. - Trust deferred to mise. The package never grants trust itself. When a project's config is not trusted yet,
mise-tasks-run/mise-tasks-listraise a clear error telling you to run the stockmise trustcommand. Mise persists trust in its own state directory, so future sessions never re-prompt — and an automatic caller (find-file hook, projectile-switch-project action) can never fire a trust dialog by accident. - Last-task memory.
mise-tasks-run-lastre-runs the last task you picked in this project. - Lockfile highlighting.
mise-tasks-lock-modefontifiesmise.lock/mise.local.lockfiles, emphasising the mise-specific tokens on top of the base TOML highlighting.
Not yet on MELPA. For now, clone and add to load-path:
(add-to-list 'load-path "~/path/to/mise-tasks")
(require 'mise-tasks)You can add mise-tasks into dotspacemacs-additional-packages section:
(mise-tasks :location (recipe :fetcher github :repo "klochowicz/mise-tasks.el")and, inside your user-config, configure desired keybindings (example below):
(defun dotspacemacs/user-config ()
(require 'mise-tasks)
(spacemacs/declare-prefix "pm" "mise")
(spacemacs/set-leader-keys
"pmm" '("run task" . mise-tasks-run)
"pmr" '("re-run last" . mise-tasks-run-last)
"pml" '("list tasks" . mise-tasks-list)
"pmk" '("kill running" . mise-tasks-kill))
;; Optional: route SPC p c to mise-tasks-run in mise projects.
;; Non-mise projects keep the default projectile-compile-project.
(mise-tasks-projectile-mode 1))mise-tasks-projectile-mode is a global minor mode that advises projectile-compile-project. With it on:
- Inside a mise project (any of
mise.toml,.mise.toml,mise.local.toml,mise/config.toml,.mise/config.toml,.config/mise.toml,.config/mise/config.tomlfound by walking up fromdefault-directory): the call is dispatched tomise-tasks-run, so picking a task uses your existingSPC p cmuscle memory. - Outside a mise project: the original
projectile-compile-projectruns unchanged, so the binding stays useful everywhere.
Opt in once with (mise-tasks-projectile-mode 1); disable with (mise-tasks-projectile-mode -1).
| Command | Purpose |
|---|---|
mise-tasks-run |
Pick a task and run it. C-u prefix prompts for extra args appended after --. |
mise-tasks-run-last |
Re-run the last task in this project. |
mise-tasks-list |
Tabulated browser of tasks. RET runs, g refreshes, k kills. |
mise-tasks-kill |
SIGINT the running task; repeat to SIGKILL. |
mise-tasks-lock-mode is a major mode for mise lockfiles. It is registered in auto-mode-alist automatically, so mise.lock and mise.local.lock open with highlighting — no configuration needed.
It derives from the built-in conf-toml-mode (a lockfile is just TOML), then layers on emphasis for the tokens unique to a lockfile:
| Token | Example |
|---|---|
@generated marker |
# @generated … (flagged so you don't hand-edit) |
| Tool name | [[tools.node]] |
| Platform | "platforms.linux-arm64" |
| Backend kind | backend = "core:node" |
| Checksum algorithm | checksum = "sha256:…" |
Colours come from your theme's standard font-lock faces.
There are no plans to add this functionality here; I recommend using mise.el for this.
;; Override monorepo detection
(setq mise-tasks-monorepo-mode 'auto) ; 'always | 'never
;; Disable experimental env-var injection
(setq mise-tasks-experimental-env nil)Calls mise tasks --json --no-header once at the project root. When experimental_monorepo_root = true is found in the root config, also passes --all and sets MISE_EXPERIMENTAL=1 in the subprocess env so mise's monorepo task discovery engages even in GUI Emacs sessions that don't inherit your shell environment.
If mise reports that the config is not trusted, discovery raises a user-error telling you to run the stock mise trust command. The package never grants trust itself — that guarantees no automatic caller (find-file hooks, projectile-switch-project-action, eager auto-compile, custom mode hooks) can ever pop a trust dialog when you open a project.
Trust is mise's own concern: run mise trust in the project once (it covers nested parents) and mise persists the result in its own state directory (~/.local/state/mise/trusted-configs/), so subsequent sessions need nothing further.
CI on GitHub Actions runs against Emacs 28.1, 29.4, and 30.1 snapshot.
Parts of this package were written with the assistance of Claude Code, as disclosed in the Assisted-by file header per MELPA's attribution guidelines. All code is reviewed, tested, and maintained by the author.
GPL-3.0-or-later. See LICENSE.