my website
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

feat: add mise

+262
+262
src/content/blog/mise.md
··· 1 + --- 2 + title: A love letter to mise 3 + description: "using mise to install packages on an immutable distro" 4 + publish_date: 2026-04-30 5 + tags: [projects, explained] 6 + --- 7 + 8 + Recently, I have been using [GNOME OS][gnome-os], as my daily driver. 9 + 10 + After being a seasoned Linux for long, dabbling in distros like [Alpine Linux][alpine], [Arch Linux][arch], Fedora (and even Silverblue), I tried switching to something more _opinionated_ and that "works by default" all while being hard to break. 11 + 12 + And given my existing [relationship with GNOME][gnome-rel], GNOME OS was a choice worth looking into. 13 + 14 + One feature of GNOME OS is that it is immutable (i.e. system files are read-only). It also doesn't ship with a package manager, so it doesn't have functionality built-in to install extra packages. 15 + 16 + You can install GUI Applications normally using [Flathub][flathub] (and Snap/AppImage), but installing non-GUI applications like development tools or CLI packages is not built-in. 17 + 18 + There are of course several solutions you can use, such as [homebrew], [coldbrew], but today we will focus on [mise]. 19 + 20 + 21 + ## What is mise? 22 + 23 + [mise] pitches itself as "One tool to manage languages, env vars, and tasks per project, reproducibly." 24 + 25 + However, I only use a fraction of it's functionality, in that I only use it to install packages. 26 + 27 + ## How to install it? 28 + 29 + The instructions are here: https://mise.jdx.dev/getting-started.html 30 + 31 + But essentially it's as easy as running this (remember to read the source of the installer first): 32 + 33 + ```bash 34 + curl https://mise.run | sh 35 + ``` 36 + 37 + ## Activating mise 38 + 39 + Then you will need to "activate" mise, which essentially makes tools installed by mise available by modifying your `$PATH` variable 40 + 41 + ```bash 42 + echo 'eval "$(~/.local/bin/mise activate bash --shims)"' >> ~/.bashrc 43 + ``` 44 + 45 + The instructions above are for bash, so you will need to consult the docs to get instructions for your shell. 46 + 47 + You will need to re-login for the `mise` command to be available, or open a new shell. 48 + 49 + ### A note on shims 50 + 51 + > Feel free to skip this section, as it's just an explainer 52 + 53 + Also, note that the above command use the `--shims` flag, which is NOT the default. It essentially means that mise will modify the `$PATH` variable, instead of doing a weird thing where it will re-activate itself after each command you run. 54 + 55 + The non-shim way to activate mise is useful when you use mise to install different package versions across different repositories, but that sometimes breaks IDEs and is our of the scope of this blog post. 56 + 57 + ## Installing packages 58 + 59 + You can start installing your first package with `mise`: 60 + 61 + ```sh 62 + mise use -g java 63 + ``` 64 + 65 + The above command installs `java` globally (hence the `-g` flag), which you can now confirm by running: 66 + 67 + ``` 68 + $ java --version 69 + openjdk 26.0.1 2026-04-21 70 + OpenJDK Runtime Environment (build 26.0.1+8-34) 71 + OpenJDK 64-Bit Server VM (build 26.0.1+8-34, mixed mode, sharing) 72 + ``` 73 + 74 + You can install much more tools, of which you can find a non-complete list here: [mise-tools]. 75 + 76 + For example, you can similarly install a specific major version of nodejs 77 + 78 + ```sh 79 + mise use -g node@22 80 + ``` 81 + 82 + Or install the latest LTS version of node 83 + 84 + ```sh 85 + mise use -g node@lts 86 + ``` 87 + 88 + Or you can be overlay specific 89 + 90 + ```sh 91 + mise use -g node@v25.9.0 92 + mise use -g node@25.9.0 # this works too! 93 + ``` 94 + 95 + ## Searching 96 + 97 + Use `mise search` to find packages. 98 + 99 + ``` 100 + mise search typ 101 + Tool Description 102 + typos Source code spell checker. https://github.com/crate-ci/typos 103 + typst A new markup-based typesetting system that is powerful and easy to learn. https://github.com/typst/typst 104 + typstyle Beautiful and reliable typst code formatter. https://github.com/Enter-tainer/typstyle 105 + quicktype Generate types and converters from JSON, Schema, and GraphQL provided by https://quicktype.io. https://www.npmjs.com/package/quicktype 106 + ``` 107 + 108 + ## Uninstalling 109 + 110 + ``` 111 + mise unuse -g node 112 + ``` 113 + 114 + ## Updating 115 + 116 + ``` 117 + mise self-update # updating mise itself 118 + mise up # updating tools installed by mise 119 + mise outdated # checking if you have outdated tools 120 + ``` 121 + 122 + ## Config File 123 + 124 + Tools you install with mise globally will be saved in the file `~/.config/mise/config.toml`, which you can commit to your dotfiles so you can have similar tools across different machines. 125 + 126 + Here's an example of my mise config file at the time of writing this blog post. 127 + 128 + ```toml 129 + # ~/.config/mise/config.toml 130 + [tools] 131 + bat = "latest" 132 + btop = "latest" 133 + bun = "latest" 134 + caddy = "latest" 135 + "cargo:mergiraf" = "latest" 136 + deno = "latest" 137 + difftastic = "latest" 138 + doggo = "latest" 139 + fastfetch = "latest" 140 + fzf = "latest" 141 + github-cli = "latest" 142 + "github:railwayapp/railpack" = "latest" 143 + glab = "latest" 144 + helix = "latest" 145 + java = "latest" 146 + lazygit = "latest" 147 + node = "latest" 148 + "npm:vscode-langservers-extracted" = "latest" 149 + oha = "latest" 150 + pipx = "latest" 151 + pnpm = "latest" 152 + prettier = "latest" 153 + rust = "latest" 154 + scooter = "latest" 155 + tmux = "latest" 156 + usage = "latest" 157 + yt-dlp = { version = "latest", rename_exe = "yt-dlp" } 158 + zellij = "latest" 159 + "github:patryk-ku/music-discord-rpc" = { version = "latest", asset_pattern = "music-discord-rpc" } 160 + rclone = "latest" 161 + mc = "latest" 162 + go = "latest" 163 + "go:git.sr.ht/~migadu/alps/cmd/alps" = "latest" 164 + "npm:localtunnel" = "latest" 165 + ``` 166 + 167 + After the tools inside the config has changed, you can run the following comand to make mise re-install packages from the config file 168 + 169 + ``` 170 + mise install 171 + ``` 172 + 173 + ## Mise Backends 174 + 175 + Mise is able to install packages from multiple sources. These sources are called "backends" by mise. 176 + 177 + When you type `mise use -g node@22`, it will resolve `node` against the registry and figure out that the default backend for `node` is `core` 178 + 179 + ### Core 180 + 181 + The default backend is called `core` and tools from this backend are usually provided from the official source. 182 + 183 + Other tools that are available from `core` include Node.js, Ruby, Python, etc... 184 + 185 + We could also have been explicit with the backend we want to use 186 + 187 + ``` 188 + mise use -g core:node 189 + ``` 190 + 191 + You can find [a list of all core packages here][mise-core]. 192 + 193 + ### Aqua 194 + 195 + You can also install packages from the [Aqua] registry. 196 + 197 + ### Language Package Managers 198 + 199 + You can also install tools from their respective package managers. Here are a few examples 200 + 201 + #### `npm` 202 + 203 + You can install prettier, typescript, oxlint and other JavaScript/TypeScript tools published on the npm registry. Find the tools on [npm] 204 + 205 + ```bash 206 + mise use -g npm:prettier 207 + ``` 208 + 209 + #### `pipx` 210 + 211 + You can install black, poetry and other Python tools from pypi. Find the tools on [pypi] 212 + 213 + ```bash 214 + mise use -g pipx:black 215 + pipx:git+https://github.com/psf/black.git # from a github repo 216 + ``` 217 + 218 + #### `cargo` 219 + 220 + You can install cargo packages with this backed. You need to have rust installed beforehand though, which you can do with mise 221 + 222 + ```bash 223 + mise use -g rust 224 + ``` 225 + 226 + Then install your packages 227 + 228 + ```bash 229 + mise use -g cargo:eza 230 + ``` 231 + 232 + There are more [language package manager backends][mise-backends] like: `gem`, `go` and more. 233 + 234 + ### Github 235 + 236 + You can install packages from Github directly, as long as the project you are trying to install from uses Github releases 237 + 238 + ```bash 239 + mise use -g github:railwayapp/railpack 240 + ``` 241 + 242 + mise will usually auto-detect which asset you want to use, but you can also specify the asset glob in `~/.config/mise/config.toml` 243 + 244 + ```toml 245 + [tools] 246 + "github:patryk-ku/music-discord-rpc" = { version = "latest", asset_pattern = "music-discord-rpc" } 247 + ``` 248 + 249 + [alpine]: https://alpinelinux.org 250 + [gnome-rel]: https://teams.pages.gitlab.gnome.org/Websites/people.gnome.org/#jimmac:~:text=Angelo%20Verlain%20Shema 251 + [arch]: https://archlinux.org 252 + [fedora]: https://fedoraproject.org/ 253 + [flathub]: https://flathub.org/en 254 + [homebrew]: https://brew.sh/ 255 + [coldbrew]: https://gitlab.postmarketos.org/postmarketOS/coldbrew 256 + [mise]: https://mise.jdx.dev/ 257 + [mise-tools]: https://mise-tools.jdx.dev/ 258 + [npm]: https://www.npmjs.com/search?q=keywords:cli 259 + [pypi]: https://pypi.org/ 260 + [mise-core]: https://mise.jdx.dev/core-tools.html 261 + [mise-backends]: https://mise.jdx.dev/dev-tools/backends/ 262 + [aqua]: https://aquaproj.github.io/