meticulous-cli-update

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Install or update the Meticulous CLI

安装或更新Meticulous CLI

The
@alwaysmeticulous/cli
package is under active development and ships frequent changes and improvements. Other Meticulous skills assume the
meticulous
command is on
PATH
and up to date, so run this skill once at the start of any Meticulous workflow.
This only needs to run once per conversation. If you've already run it earlier in this conversation, skip it — there's no need to re-check the version or re-update on every Meticulous skill invocation.
@alwaysmeticulous/cli
包正处于活跃开发阶段,会频繁发布变更和改进内容。其他Meticulous skill默认
meticulous
命令已在
PATH
中且为最新版本,因此在任何Meticulous工作流开始时,只需运行一次此skill即可。
此流程每次对话只需运行一次。如果您在本次对话中已经运行过它,请跳过——无需在每次调用Meticulous skill时重新检查版本或再次更新。

How to handle the install/update commands

如何处理安装/更新命令

This skill normally runs as a sub-step of another Meticulous skill. The install/update commands below (Steps 1, 3, and 5) are security-sensitive — they install packages and reach the network — so treat them as best-effort and non-blocking:
  • You generally can't tell in advance whether a command is whitelisted. If it's whitelisted it runs silently; if not, attempting it surfaces a permission prompt. Either outcome is fine — let that be how you find out.
  • If a command needs permission you don't have (a prompt appears, or the user declines it), treat that as the signal to recommend rather than force. Tell the user it's recommended to do XYZ — e.g. "It's recommended to update the Meticulous CLI by running
    npm install --global @alwaysmeticulous/cli@latest
    " — and move on. A declined prompt is not a failure; it just means "do it later."
  • If the user doesn't want to run it now, continue anyway. Do not stop the workflow; carry on with the remaining steps and then return to the calling skill. The only hard requirement is that the
    meticulous
    command exists at all (Step 1) — if it's genuinely not installed and the user declines to install it, no Meticulous skill can proceed, so stop there.
The read-only checks (
meticulous --version
,
npm view …
,
meticulous auth whoami
) are safe to run directly.
此skill通常作为其他Meticulous skill的子步骤运行。以下安装/更新命令(步骤1、3和5)涉及安全敏感操作——它们会安装包并连接网络——因此请将其视为尽力而为且非阻塞的操作:
  • 通常无法提前判断某个命令是否在白名单中。如果在白名单中,它会静默运行;如果不在,尝试运行时会弹出权限提示。两种结果都没问题——通过这种方式确认即可。
  • 如果命令需要您没有的权限(弹出提示,或用户拒绝),请将此视为建议而非强制的信号。告知用户建议执行某项操作——例如:“建议通过运行
    npm install --global @alwaysmeticulous/cli@latest
    来更新Meticulous CLI”——然后继续后续流程。用户拒绝提示不代表失败;这仅意味着“稍后再执行”。
  • 如果用户现在不想运行该命令,仍继续后续流程。不要中断工作流;继续执行剩余步骤,然后返回调用该skill的流程。唯一硬性要求是
    meticulous
    命令确实存在(步骤1)——如果它真的未安装且用户拒绝安装,那么任何Meticulous skill都无法继续,此时才需要停止。
只读检查命令(
meticulous --version
npm view …
meticulous auth whoami
)可以直接安全运行。

Step 1 — Check the installed version

步骤1 — 检查已安装版本

bash
meticulous --version
If the command is not found, the CLI is not installed. Install it globally (best-effort, see the note above):
bash
npm install --global @alwaysmeticulous/cli@latest
If installing isn't whitelisted, recommend the user run that command themselves. Because no Meticulous skill can run without the CLI, this is the one case where you should stop and wait if the user declines — there's nothing to continue with. Once installed, re-run
meticulous --version
to confirm it's on
PATH
, and skip to Step 4.
bash
meticulous --version
如果命令未找到,说明CLI未安装。全局安装它(尽力而为,参见上方说明):
bash
npm install --global @alwaysmeticulous/cli@latest
如果安装不在白名单中,建议用户自行运行该命令。因为没有CLI的话,任何Meticulous skill都无法运行,所以这是唯一一种如果用户拒绝就需要停止等待的情况——没有后续流程可以继续。安装完成后,重新运行
meticulous --version
确认它已在
PATH
中,然后跳至步骤4。

Step 2 — Check the latest published version

步骤2 — 检查最新发布版本

bash
npm view @alwaysmeticulous/cli version
bash
npm view @alwaysmeticulous/cli version

Step 3 — Update the CLI if outdated

步骤3 — 若版本过时则更新CLI

If the installed version already matches the latest, skip to Step 4.
Otherwise, update according to how the CLI is installed (best-effort, see the note above — if updating isn't whitelisted, recommend the user run the appropriate command and continue regardless):
  • Globally installed (typical —
    which meticulous
    resolves to a path outside the current project):
    bash
    npm install --global @alwaysmeticulous/cli@latest
  • Locally installed in the project (
    @alwaysmeticulous/cli
    appears in the project's
    package.json
    and
    which meticulous
    resolves inside
    node_modules/.bin
    ):
    bash
    npm install --save-dev @alwaysmeticulous/cli@latest
    # or, if the project uses pnpm:
    pnpm add --save-dev @alwaysmeticulous/cli@latest
    # or yarn:
    yarn add --dev @alwaysmeticulous/cli@latest
If the update ran, re-run
meticulous --version
and confirm it matches the latest before proceeding.
如果已安装版本与最新版本一致,跳至步骤4。
否则,根据CLI的安装方式进行更新(尽力而为,参见上方说明——如果更新不在白名单中,建议用户运行相应命令,无论如何都继续后续流程):
  • 全局安装(典型情况——
    which meticulous
    指向当前项目外的路径):
    bash
    npm install --global @alwaysmeticulous/cli@latest
  • 本地安装在项目中
    @alwaysmeticulous/cli
    出现在项目的
    package.json
    中,且
    which meticulous
    指向
    node_modules/.bin
    内部):
    bash
    npm install --save-dev @alwaysmeticulous/cli@latest
    # 或者,如果项目使用pnpm:
    pnpm add --save-dev @alwaysmeticulous/cli@latest
    # 或者yarn:
    yarn add --dev @alwaysmeticulous/cli@latest
如果更新已运行,重新运行
meticulous --version
并确认其版本与最新版本一致后再继续。

Step 4 — Check authentication and project selection

步骤4 — 检查身份验证和项目选择

Verify the user is authenticated with Meticulous and has a project selected:
bash
meticulous auth whoami
If the command reports that "No authentication found", stop and ask the user to run
meticulous auth whoami
themselves (it opens a browser to sign in). Do not attempt to run it on their behalf — it requires interactive sign-in.
If the command reports that "No project selected" (this happens when the user is a member of multiple projects), stop and ask the user to run
meticulous auth set-project
themselves to pick one. Do not attempt to run it on their behalf — it shows an interactive picker.
验证用户是否已通过Meticulous身份验证,且已选择项目:
bash
meticulous auth whoami
如果命令显示“未找到身份验证信息”,请停止并要求用户自行运行
meticulous auth whoami
(该命令会打开浏览器进行登录)。不要尝试代表用户运行它——这需要交互式登录。
如果命令显示“未选择项目”(当用户属于多个项目时会出现这种情况),请停止并要求用户自行运行
meticulous auth set-project
来选择一个项目。不要尝试代表用户运行它——该命令会显示交互式选择器。

Step 5 — Update the installed Meticulous skills

步骤5 — 更新已安装的Meticulous skills

The skills themselves are also under active development. Update them to the latest version (best-effort, see the note above):
bash
npx skills update --project
If this isn't whitelisted, recommend the user run it themselves. Either way — whether it ran, or the user declined — proceed with the calling skill.
skills本身也处于活跃开发阶段。将它们更新到最新版本(尽力而为,参见上方说明):
bash
npx skills update --project
如果此命令不在白名单中,建议用户自行运行。无论命令是否运行,或用户是否拒绝,都继续执行调用该skill的流程。