dotfiles

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Dotfiles

Dotfiles

Two directions of work against
bmthd/dotfiles
. They are opposites and must not be confused:
pr
changes the repository for every machine,
apply
changes this one machine to match the repository.
SubcommandDirectionRead
pr <change>
repository ← change, opened as a PRpr.md
apply
this machine ← repositoryapply.md
Read the subcommand's file before doing anything. The procedures are detailed and neither is safe to improvise.
针对
bmthd/dotfiles
有两种操作方向,二者完全相反,请勿混淆:
pr
用于修改仓库,所有机器都会同步该变更;
apply
用于将当前机器配置更新为与仓库一致。
子命令操作方向参考文档
pr <change>
仓库 ← 变更(以PR形式提交)pr.md
apply
当前机器 ← 仓库apply.md
操作前务必阅读对应子命令的文档。 流程细节详尽,切勿随意操作。

Routing

路由规则

  • args
    starts with
    pr
    — the rest is the change to make. If nothing follows, ask what to change.
  • args
    starts with
    apply
    (or is empty and the user is reacting to an update notification) — read apply.md.
  • Neither, and the intent is unclear: ask which one. Do not guess from the current directory — being inside a dotfiles checkout does not mean the user wants
    pr
    .
  • args
    pr
    开头——后续内容即为要做的变更。若
    pr
    后无内容,请询问具体变更内容。
  • args
    apply
    开头(或为空且用户正响应更新通知)——请阅读apply.md
  • 若既不属于上述情况,且用户意图不明确:请询问用户要执行哪种操作。不要根据当前目录猜测——即使处于dotfiles检出目录中,也不代表用户想要执行
    pr
    操作。

Repository facts

仓库相关说明

Both subcommands rely on these.
  • Setup logic lives in
    .mise.toml
    , not
    install.sh
    .
    install.sh
    is only a bootstrapper (install mise → place the config →
    mise install
    mise run setup
    ). Changes to tools, environment, or setup steps belong in
    .mise.toml
    .
  • .mise.toml
    is installed to
    ~/.config/mise/config.toml
    as the global mise config, so its tasks run from any directory.
  • Most skills are no longer in this repository. The portable ones moved to
    bmthd/skills
    . What remains under
    .agents/skills/
    is this
    dotfiles
    skill, which only makes sense against this repository. Third-party skills are installed from their upstream by the
    setup:skills
    task rather than vendored.
  • CI (
    .github/workflows/quality.yml
    ) runs
    mise ls
    ,
    mise tasks ls
    , ShellCheck,
    bash -n
    ,
    zsh -n
    , and the scripts under
    tests/
    .
两个子命令均依赖以下信息:
  • 配置逻辑存于
    .mise.toml
    ,而非
    install.sh
    install.sh
    仅为引导程序(安装mise → 放置配置文件 →
    mise install
    mise run setup
    )。工具、环境或配置步骤的变更应写入
    .mise.toml
  • .mise.toml
    会被安装到
    ~/.config/mise/config.toml
    ,作为全局mise配置,因此其任务可在任意目录执行。
  • 大部分skills已不在此仓库中。可移植的skills已迁移至
    bmthd/skills
    .agents/skills/
    下仅保留本
    dotfiles
    skill,该skill仅针对此仓库生效。第三方skills由
    setup:skills
    任务从其上游仓库安装,而非内嵌在本仓库中。
  • CI(
    .github/workflows/quality.yml
    )会执行
    mise ls
    mise tasks ls
    、ShellCheck、
    bash -n
    zsh -n
    以及
    tests/
    目录下的脚本。