Skip to content

mise generate devcontainer ​

Generate a devcontainer configuration that installs mise and the project's tools

Prints JSON by default. --write saves .devcontainer/devcontainer.json in the repository root (or the current directory outside a git repository), replacing an existing file. Review the image, mounts, and setup commands before opening it.

Flags ​

  • -i --image <IMAGE> — Base image; defaults to mcr.microsoft.com/devcontainers/base:ubuntu

  • -m --mount-mise-data — Keep installed tools in a mise-data-volume Docker volume so they survive rebuilds

    Mounts the volume at /mnt/mise-data, sets MISE_DATA_DIR to it, and adds its shims directory to PATH.

  • -n --name <NAME> — Container name; defaults to mise

  • -w --write — Write to .devcontainer/devcontainer.json instead of printing

  • -h --help — Print help

Examples ​

Print the configuration

mise generate devcontainer

Keep installed tools in a volume and save .devcontainer/devcontainer.json

mise generate devcontainer --mount-mise-data --write
MIT LicenseCopyright © 2026jdx.dev