mise-guide

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

mise — Dev Environment Manager

mise — 开发环境管理器

mise is a polyglot tool that replaces asdf/nvm/pyenv/direnv/make. It manages three things:
  1. Tool versions — install and pin node, python, go, ruby, java, etc.
  2. Environment variables — per-project env var management
  3. Tasks — project task runner (like make/npm scripts)
mise是一款多语言支持的工具,可以替代asdf/nvm/pyenv/direnv/make,它主要管理三类内容:
  1. 工具版本 — 安装并锁定node、python、go、ruby、java等工具的版本
  2. 环境变量 — 项目级环境变量管理
  3. 任务 — 项目任务运行器(类似make/npm脚本)

How to use this skill

如何使用本技能

Identify which domain the user needs, then read only the relevant reference file:
User wants to...Read
Install, switch, list, or manage tool versions
references/tools.md
Set, manage, or inspect environment variables
references/env.md
Define, run, or manage project tasks
references/tasks.md
If the request spans multiple domains, read the relevant reference files.
先确定用户的需求所属领域,然后阅读对应的参考文档:
用户想要...阅读
安装、切换、列出或管理工具版本
references/tools.md
设置、管理或查看环境变量
references/env.md
定义、运行或管理项目任务
references/tasks.md
如果请求涉及多个领域,请阅读所有相关的参考文档。

Key principles

核心原则

  1. Always clarify scope. When the user asks to install or use a tool, confirm whether they mean project-level (
    mise use <tool>
    ) or global (
    mise use -g <tool>
    ) before running commands. Project-level writes to
    ./mise.toml
    ; global writes to
    ~/.config/mise/config.toml
    .
  2. Prefer
    mise use
    over
    mise install
    .
    mise use
    both installs and pins the version in the config file.
    mise install
    only installs without pinning — it's mainly for pre-caching.
  3. Use
    mise.toml
    format.
    This is mise's native config format and supports all features.
    .tool-versions
    is asdf-compatible but limited to tool versions only.
  4. Check before acting. Run
    mise ls
    or
    mise config ls
    first to understand the current state before making changes.
  5. Verify mise is available. Before running any mise command, run
    which mise
    to check availability. If not found, install it:
    bash
    curl https://mise.run | sh
    Then verify with
    mise --version
    before proceeding.
  6. Follow the user's language. Respond in the same language the user is using. If they write in Chinese, reply in Chinese; if in English, reply in English.
  1. 始终明确作用范围。 当用户要求安装或使用某个工具时,在运行命令前先确认是项目级(
    mise use <tool>
    )还是全局级(
    mise use -g <tool>
    )。项目级配置会写入
    ./mise.toml
    ;全局配置会写入
    ~/.config/mise/config.toml
  2. 优先使用
    mise use
    而非
    mise install
    mise use
    会同时完成工具安装和版本写入配置文件锁定的操作。
    mise install
    仅安装工具,不会锁定版本——主要用于预缓存场景。
  3. 使用
    mise.toml
    格式。
    这是mise的原生配置格式,支持所有功能。
    .tool-versions
    兼容asdf格式,但仅支持配置工具版本。
  4. 操作前先检查状态。 做出修改前先运行
    mise ls
    mise config ls
    了解当前状态。
  5. 验证mise是否可用。 运行任何mise命令前,先执行
    which mise
    检查是否已安装。如果未找到,执行以下命令安装:
    bash
    curl https://mise.run | sh
    然后运行
    mise --version
    验证安装成功后再继续操作。
  6. 适配用户使用的语言。 用用户提问时使用的语言回复。如果用户用中文提问就用中文回复;用英文提问就用英文回复。