DEV Community

Cover image for Mise : The Ultimate Dev Tool Manager for Seamless Workflows
Jérôme Dx
Jérôme Dx

Posted on

Mise : The Ultimate Dev Tool Manager for Seamless Workflows

Tired of juggling multiple versions of your favorite tools, or just want to stay up to date with the latest CLI tools, programming languages, and more ?

Mise (mise-en-place) is a utility written in Rust, that allows you to manage the versions of your developer tools on different projects. It’s very fast and very complete, with different ways to use it :

different-options

Let’s explore how it can streamline your daily workflow.

Getting Started with Mise

Installation

Mise is available on all platforms that support Rust, i.e. Linux, Windows or MacOS.

For shell users, start by installing Mise with a single command :

curl <https://mise.run> | sh
Enter fullscreen mode Exit fullscreen mode

Then, add the following line to your .zshrc to enable Mise in your shell :

echo "eval \\"\\$(/home/user/.local/bin/mise activate zsh)\\"" >> "/home/user/.zshrc"
source ~/.zshrc
Enter fullscreen mode Exit fullscreen mode

Dev Tools

As a version manager, Mise handle the different version of your tools for development. It can be used for local development and inside your CICD pipelines.

Basic Commands

Check your Mise version :

mise version
Enter fullscreen mode Exit fullscreen mode

Get help :

mise --help
Enter fullscreen mode Exit fullscreen mode

Installing Tools

Install the latest versions of your favorite tools effortlessly :

mise use python@latest
mise use go@latest
mise use terraform@latest
Enter fullscreen mode Exit fullscreen mode

Need cloud tools? Mise has you covered :

mise use gcloud@latest
mise use scaleway@latest
Enter fullscreen mode Exit fullscreen mode

Managing Your Tools

List installed software :

mise ls
Enter fullscreen mode Exit fullscreen mode

mise-ls

Explore available versions :

mise ls-remote terraform
mise ls-remote terraform@1.11
Enter fullscreen mode Exit fullscreen mode

Mise ls-remote

Search for tools :

mise search jq
Enter fullscreen mode Exit fullscreen mode

Staying Up to Date

Update your tools interactively :

mise up --interactive
Enter fullscreen mode Exit fullscreen mode

mise update

You can also update Mise itself :

mise self-update
Enter fullscreen mode Exit fullscreen mode

Environments

Mise allows you to manage environment variables per project, ensuring your tools and scripts always run in the correct context. This is especially useful for projects requiring specific configurations or secrets.

Set environment variables for a project

Create a .mise.toml file in your project root and define your environment variables :

[env]
DATABASE_HOST ="localhost:5432"
API_KEY ="your_api_key_here"
Enter fullscreen mode Exit fullscreen mode

Mise automatically loads these variables when you enter the project directory, thanks to its shell integration, you just need to trust the file.

mise trust
Enter fullscreen mode Exit fullscreen mode

Handle multiple environments

File .mise.dev.toml :

[env]
DATABASE_HOST ="dev-db:5432"
API_KEY ="dev_key"
Enter fullscreen mode Exit fullscreen mode

File .mise.prd.toml :

[env]
DATABASE_HOST ="prd-db:5432"
API_KEY ="prd_key"
Enter fullscreen mode Exit fullscreen mode

You can switch between environments like this :

MISE_ENV=dev mise env | grep API_KEY
MISE_ENV=prd mise env | grep API_KEY
Enter fullscreen mode Exit fullscreen mode

Tasks

Mise simplifies running repetitive or complex tasks by allowing you to define and execute them directly from your project configuration.

Define tasks

Add a [tasks] section to your .mise.toml file :

[tasks]
start ="docker-compose up"
test ="pytest"
build ="cargo build --release"
deploy ="make deploy"
Enter fullscreen mode Exit fullscreen mode

Run a task

Execute any defined task with :

mise run <task_name>

# Examples:
mise run test
mise run deploy
Enter fullscreen mode Exit fullscreen mode

List available tasks

To see all tasks defined in your project :

mise tasks
Enter fullscreen mode Exit fullscreen mode

Why Mise?

  • Simple : Clear and intuitive syntax.
  • Versatile : Replaces many tools.
  • Lightweight : Written in Rust, fast and resource-efficient.
  • Efficient : Effortlessly manages versions and dependencies.

Here is a Mise cheatsheet you can consult to remember some common commands.

There are still a lot of possibilities you can explore with this tool, like securing your variables, execute hooks or even use plugins.

Now you’re all set ! Try it out and see how Mise simplifies your workflow.

Top comments (0)