Replacing FGM with Mise: A Practical Guide
Mise fully covers FGM’s features and use cases, and goes far beyond Golang toolchain management — it can manage toolchains for Node.js, Neovim, Java, and more. You can even replace direnv with Mise to handle environment variable loading and unloading when entering and leaving directories.
Here’s my experience using Mise across three aspects:
1. Installing Mise
Option 1: Install via a package manager
# Requires cargo-binstall and the Rust toolchain
Option 2: Download a prebuilt binary from the releases page, extract it, and place the mise executable in your PATH.
2. Configuring Mise
2.1 Shell Initialization
# For bash
# For zsh
# For fish
2.2 Configuration File
Mise’s config file is .mise.toml, placed in your project root or home directory.
# ~/.mise.toml
[]
= "1.21"
= "20"
= "3.12"
3. Using Mise
# Install tools
# Set global version
# Set project-specific version (auto-creates .mise.toml)
# List installed versions
# Uninstall
4. Advanced Features
4.1 Environment Variable Management
# .mise.toml
[]
= ["./bin", "{{config_root}}/scripts"]
= "secret"
4.2 Task Runner
# .mise.toml
[]
= "Build the project"
= "make build"
[]
= "Run tests"
= "go test ./..."
4.3 Replacing direnv
Mise supports .envrc files, fully replacing direnv:
Then in .envrc:
Summary
Mise is a powerful toolchain manager with these advantages:
- ✅ Multi-language support (Go, Node.js, Python, Java, Rust, and more)
- ✅ Project-level and global configuration
- ✅ Environment variable management
- ✅ Built-in task runner
- ✅ Compatible with the asdf plugin ecosystem
- ✅ Great performance (written in Rust)
Comments