mise generate devcontainer
- Usage:
mise generate devcontainer [FLAGS] - Effect: modifies state
- Source code:
src/cli/generate/devcontainer.rs
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 amise-data-volumeDocker volume so they survive rebuildsMounts 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 devcontainerKeep installed tools in a volume and save .devcontainer/devcontainer.json
mise generate devcontainer --mount-mise-data --write