Skip to content

Consolidate justfile recipes into mise tasks #5

Description

@rdlu

Goal

Consolidate the justfile recipes into mise tasks so there's a single tool for tool/version management and task running. just is currently a pure extra dependency; mise is already required. Decision: stay on stow for symlink management (see closed #3 / chezmoi #4) — this is only about the task runner.

Discoverability — confirmed it survives

The thing I care about (just --list with hints) is preserved:

  • mise tasksname description listing (same shape as just --list)
  • mise stow runs a task (no run verb needed) → as light as just stow
  • file tasks can be #!/usr/bin/env fish scripts with #MISE description="…" — show up in the list and written in fish
  • : namespacing (services:enable) gives pseudo-grouping
  • one-time mise trust ~/.dotfiles/mise.toml per machine (a safety gate just doesn't have)

Feature mapping (just → mise)

just mise task equivalent
just --list / just foo mise tasks / mise foo
[group("x")] visual groups : namespace clustering (no header rows) — slight loss
recipe deps depends = [...]
[private] hide = true
params usage spec (richer) ✅
set shell shebang per file-task ✅
{{ var }} / base_packages := [vars] / [env]
[confirm] none built-in → script a read prompt ⚠️
style() colored echo ANSI in the script ✅

Only genuine gaps: [confirm] and the pretty group headers.

Transition approaches (thin layer, incremental)

A — just shims, logic in mise. justfile recipes become @mise run <x>; real logic moves into mise tasks. Keeps just <x> muscle memory. Cost: must port a recipe's logic to mise before its shim is meaningful; duplicates --list descriptions.

B — mise tasks wrap just (recommended). [tasks.stow] run = "just stow" — zero rewrite, mise stow / mise tasks work immediately. Then move each recipe's body from the justfile into its mise task at leisure; delete the justfile recipe once ported. Shifts the entry point to mise on day one, which fits "consolidate onto mise."

→ Lean B: gentler, never-blocking, no duplicated description bookkeeping.

Plan (B, incremental)

  • Add project-scoped ~/.dotfiles/mise.toml (separate from the stowed global ~/.config/mise/config.toml).
  • Wrap day-2 recipes as run = "just …" tasks first: stow, stow-check, unstow, services-enable, update, doctor, wpaper-reload/mako-reload/waybar-reload/swayidle-reload.
  • Start using mise <task> / mise tasks; mise trust on both machines.
  • Port recipe bodies into mise tasks incrementally (replace run = "just x" with the real script — fish file-tasks under mise-tasks/ for the multi-step ones: packages, dev-setup, fish-shell, cli-tools, helix-editor, kitty-terminal, niri-window-manager, yazi-file-manager, fastfetch).
  • Re-implement [confirm] on destructive tasks as a scripted prompt.
  • Once everything is ported + tested on daisy and xps: drop just from cli-tools, delete the justfile, update README.

Open questions

  • Keep tasks as [tasks] in mise.toml vs file-tasks in mise-tasks/? (Lean: one-liners in TOML, multi-step/interactive ones as fish file-tasks.)
  • Worth a m alias for mise to match just's brevity?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions