Skip to content




mise setup

[[mise]]

https://mise.jdx.dev/

The front-end to your dev env

installation

Ensure the path is set for ~/.local/bin.

curl https://mise.jdx.dev/install.sh | sh
echo 'eval "$(~/.local/bin/mise activate zsh)"' >> ~/.zshrc
source ~/.zshrc

global setup

mise use -g [email protected]
mise use -g node@21
mise use -g [email protected]  # or [email protected] or whichever version preferred

# confirm config file location
mise config

# confirm the installed versions
mise ls

# enable python venv creation
mise settings set python_venv_auto_create true

# update existing ones if newer minor version exists
# such as python 3.11.6 to 3.11.7
mise up

mise settings on file

This is what I have on mise global settings file.

https://mise.jdx.dev/settings.html

~/.config/mise/config.toml
[settings]
experimental = true
python_venv_auto_create = true

[env]
_.python.venv = { path = ".venv", create = true }

mise settings in project directory

And for a certain project.

.mise.toml at project dir root
[tools]
python = {version="3.11", virtualenv=".venv"}

mise use fails?

Check if that machine has the dependencies installed such as below for python. This was missing on my raspberry pi machine.

https://devguide.python.org/getting-started/setup-building/#install-dependencies

sudo apt install build-essential gdb lcov pkg-config \
      libbz2-dev libffi-dev libgdbm-dev libgdbm-compat-dev liblzma-dev \
      libncurses5-dev libreadline6-dev libsqlite3-dev libssl-dev \
      lzma lzma-dev tk-dev uuid-dev zlib1g-dev

project-local setup

To setup a project-local code settings, the same mise use without -g option suffice. Very simple.

python venv in a project

Running mise use [email protected] will let mise create ./.mise.toml file which tells mise and the shell to use specific python.

Modify the toml file to enable the use of venv in that project.

```toml:.mise.toml [tools] python = {version='3.11', virtualenv='.venv'}

## when using together with poetry

<https://github.com/mise-plugins/mise-poetry>

```shell
# add plugin
mise plugin add poetry

# apply fix to the poetry installation script as described in
# https://github.com/mise-plugins/mise-poetry/issues/9#issue-2115926798
# the installation script is at ~/.local/share/mise/plugins/poetry/bin/install

# and mise use poetry
mise use poetry

# might want to check and change the mise-poetry configs
# such as venv creation and venv dir
# https://python-poetry.org/docs/configuration/

# when working on a repository with poetry setup
poetry install --no-root --sync