SuperAPI AI 工具集

working-with-mise

通用与其它

查看项目

更新于 10-16 01:27

技能介绍

用途:本技能面向使用 mise 这一多语言工具版本管理器的场景,用于向项目添加工具、排查“command not found”,以及判断某依赖是否适合用 mise 管理。

主要能力与原则:优先用 mise use 添加工具,不手工编辑配置文件;先检测已有配置文件(mise.toml、.mise.toml、.mise.local.toml、.tool-versions)再决定格式;工具不在 PATH 时修复 shell 激活,而不是长期用 mise exec 绕过。当版本对项目敏感(如 node、python、ruby、go、rust、terraform、kubectl、helm)时用 mise;版本不重要的稳定 CLI(jq、gh、ripgrep 等)更适合 Homebrew。

使用方式:添加工具用 mise use node@20 或 mise use -g python@3.12,可先用 mise use --dry-run 预览。验证用 mise ls、mise which node 和 which node 对比。激活需在 shell 配置文件加入 eval "$(mise activate zsh)" 或对应 bash、fish 写法,然后重开 shell。非交互场景可用带 --shims 的激活方式。

排查要点:mise doctor 做整体诊断;mise ls --current 查看当前目录工具;mise config 查看生效配置;配置未信任时执行 mise trust。GitHub 401 多由 gh CLI 的 hosts.yml 中过期 token 引起,可用 mise token github 查看来源,用 gh auth login -h github.com 重新认证,或设 MISE_GITHUB_GH_CLI_TOKENS=0,或在配置中设 gh_cli_tokens = false。注意 GH_TOKEN 不是 mise 的 token 来源,空值等于未设置。

限制:以上为资料提供的流程与命令,具体平台细节未提供。