How to Set Custom Mise Installs Directory

How I made mise install Zig into a repo-local directory so VS Code could find the binary.

I was working on a private project called cpm. One component, cpm-cli, is written in Zig. I pinned zig and zls with mise, but the Zig VS Code extension did not find the binary when mise installed it into the global mise location. The fix was tiny and worth keeping in my notes.

Put this in your mise.toml (I keep mine in cli/mise.toml):

TOML
[env]
# install mise-managed tools into a directory inside this repo
MISE_INSTALLS_DIR = "{{config_root}}/.mise/installs"

[tools]
zig = "0.15.2"
zls = "0.15.0"

Why this works for me

What I did

  1. Added the snippet to cli/mise.toml.

  2. From the cli folder ran:

    Shell
    cd cli
    mise install
  3. Checked the installed binary:

    Shell
    ls -l .mise/installs/*/bin/zig

The Zig binary appeared under the repo-local .mise directory, and the VS Code extension stopped complaining.

A tiny nicety: ignore the installs directory in git

Create or edit cli/.gitignore and add:

Plain Text
# Ignore locally-installed mise tools
.mise/

Notes from my run

Other recipes in Mise