My/Pref/Dev/mise
My mise dev tool preferences
- For each of the dev tools that I depend upon locally, use mise to manage that version where possible.
- see My/Pref/Dev/Tool for details.
- declare CLI dependencies in a project's mise/Config/mise.toml rather than in a language package manifest such as
package.json; the manifest keeps only the libraries the code imports. - a project declares a tool that my global mise config also provides at its major version only (
node = "24"), unless the project has a specific technical reason to pin further, which a comment on that entry names.
- Where EnvVars need to be configured in the environment, use mise to do that declaratively.
- Prefer to use mise/Tasks as the task orchestration system and task runner and "structure" around Scripting.
- In CI, prefer to use My/Pref/Dev/mise/Best Practice/CI for task execution
- strongly prefer mise/Task/File over mise/Task/TOML
- put tasks in
(~/.config/mise/)tasks/<namespace>/<subnamespace>/<executable_name>, almost never inline TOML [tasks."..."] entries in mise/Config/mise.toml, unless they are one-liners. - don't make a
scripts/ folder. When a task needs a real program, write the task file itself in that language, such as a Python task with a #!/usr/bin/env -S uv run --script shebang and inline script metadata, rather than a shell task that calls a script kept elsewhere.
- be sure to use usageCLI syntax for defining autocompletion parameters
- Always annotate file tasks with
#MISE description="..." and #USAGE directives (flags, args) for autocompletion via usageCLI. See mise docs: file tasks and mise docs: task arguments. - install the
usage CLI globally so it is available on PATH — mise use -g usage. It is not required to run tasks, but completions of #USAGE-annotated tasks only work when usage is installed. See mise docs: autocompletion. - install mise shell completions into the default shell (zsh) so
mise run <tab> completes task names and their usage-defined args. Either use the oh-my-zsh mise plugin, or mise completion zsh > "${fpath[1]}/_mise". See mise docs: completion and usage docs: completions.
- see My/Pref/Dev/mise/Tasks/Discussion for rationelle
- Document named jobs as Logseq/Entity/Mise/Task pages under the topic they serve. Task references describe the interface, outputs, side effects, dependencies, and source; linked how-tos describe the sequence of work.
- Why?
- Why I prefer to use mise/Task/Files for managing jobs
- it integrates with usageCLI which provides Autocomplete at the CLI
- it provides an opinionated and yet lightweight way to add descriptive metadata and dependencies
- I'm already using mise as an installer, so it avoids additional dependencies
- mise/Task/TOML have more features I don't need such as templating when compared with file tasks, and by not using them it's a clear signal that I'm not using and don't need those extra features
- they are stackable; my organization can have its file tasks, and I can have my file tasks, and we can use two different dotfiles systems to manage that. if we used toml tasks, we'd be editing the same file.