make-env-setup
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
Chinesemake-env-setup
make-env-setup
Get this machine ready to build a Make App: select the appropriate toolchain, verify Make login, and initialize a project folder only for a new App. Run it on a new machine, and again whenever the tools need updating. Use for resource/deploy operations and the owning skills for implementation.
makecli将本机配置为可构建Make App的状态:选择合适的工具链、验证Make登录状态,且仅为新应用初始化项目文件夹。在新机器上运行此技能,工具需要更新时也可再次运行。资源/部署操作请使用,功能实现请使用对应专属技能。
makecliSafety Rules
安全规则
- Do not print or store tokens, cookies, Authorization headers, passwords, or secrets.
- Do not manually create PRD, DSL, Service, or UI files; only run in the selected directory.
makecli app init - Interactive secret entry must be completed by the user. Do not ask the user to paste secrets into chat.
- Do not install pnpm through npm. For a new or explicitly migrated App, use the fixed Corepack/pnpm baseline below. An existing compatible npm or Yarn App keeps its declared installer and lockfile; this environment skill must not switch it to pnpm.
- 不得打印或存储token、cookie、Authorization头、密码或其他密钥信息。
- 不得手动创建PRD、DSL、Service或UI文件;仅可在选定目录中运行。
makecli app init - 交互式密钥输入必须由用户自行完成。不得要求用户将密钥粘贴到聊天框中。
- 不得通过npm安装pnpm。对于新建应用或明确要求迁移的应用,请使用下方固定的Corepack/pnpm基准版本。现有兼容的npm或Yarn应用应保留其声明的安装工具和lockfile;本环境技能不得将其切换为pnpm。
Select Project Mode
选择项目模式
- For a new App or a user-requested explicit runtime migration, follow the fixed Node.js/Corepack/pnpm baseline below. Runtime migration itself belongs to ; do not change an existing repository's manifests or lockfile in this setup flow.
make-app-runtime - For an existing Make App without an explicit migration, inspect its workspace , Node
packageManager, Node-selection file, lockfile and CI/install workflow before choosing tools. Keep the compatible declared Node and package manager, including npm or Yarn. Do not add Corepack or pnpm merely to update the local environment. If these declarations disagree, the needed runtime is unclear, or the target platform build image is incompatible, stop and report the blocker toenginesrather than guessing or creating another lockfile.make-app-runtime - If the target folder or new-versus-existing mode is unclear, ask the user before choosing a project runtime or initializing a folder.
- 对于新建应用或用户明确要求的运行时迁移,请遵循下方固定的Node.js/Corepack/pnpm基准版本。运行时迁移本身属于技能的职责;在本配置流程中不得修改现有仓库的清单文件或lockfile。
make-app-runtime - 对于未明确要求迁移的现有Make应用,在选择工具前请先检查其工作区的、Node
packageManager、Node版本选择文件、lockfile以及CI/安装工作流。保留其声明的兼容Node版本和包管理器(包括npm或Yarn)。不得仅为更新本地环境而添加Corepack或pnpm。如果这些声明存在冲突、所需运行时不明确,或与目标平台构建镜像不兼容,请停止操作并将阻塞问题上报给engines,不得猜测或创建新的lockfile。make-app-runtime - 如果目标文件夹或新建/现有模式不明确,请先询问用户,再选择项目运行时或初始化文件夹。
Install Or Update Toolchain
安装或更新工具链
This skill supports macOS, Linux, and Windows. For a new App or an explicitly migrated App, the runtime is fixed: Node.js , its bundled Corepack , and . Steps 1–3 below apply only to that mode. Do not substitute a moving LTS release, a Homebrew or global pnpm binary, or a newer Corepack release.
22.20.00.34.0pnpm@10.20.0For an existing Make App without migration, verify its declared Node version with the active Node binary and use its established npm, Yarn or Corepack-managed pnpm workflow. If its declared Node is not installed, ask before installing that version; do not install as an automatic replacement. Continue with the shared git, makecli and Skill checks, without rewriting App files.
22.20.0-
Ensure exact Node.jsand
22.20.0are available. If either is missing, install it with the platform's own method only after the user confirms.gitPlatform Node.js 22.20.0git macOS Install and select with thennvm install 22.20.0; if nvm is unavailable, use an exact-version manager selected by the usernvm use 22.20.0, or Homebrew if already presentxcode-select --installLinux Install and select with thennvm install 22.20.0; if nvm is unavailable, use an exact-version manager selected by the usernvm use 22.20.0distro package, for example apt install gitWindows Use an exact-version manager such as nvm-windows to install and select , or the official Node.js22.20.0installer22.20.0winget install Git.GitDo not use a moving package-manager formula such as,brew install node, orapt install nodejsfor the Make App runtime. If no exact-version Node manager is available, stop and ask the user to select one.winget install OpenJS.NodeJS.LTS -
Verify the fixed Node.js and Corepack baseline before installing pnpm. The checks below are cross-platform and must both pass:bash
node -e 'if (process.versions.node !== "22.20.0") { throw new Error(`Make Apps require Node.js 22.20.0; got ${process.versions.node}`) }' node -e 'const { execFileSync } = require("node:child_process"); const actual = execFileSync("corepack", ["--version"], { encoding: "utf8" }).trim(); if (actual !== "0.34.0") { throw new Error(`Corepack must report 0.34.0; got ${actual}`) }' -
Enable Corepack and cache the fixed new/migrated App pnpm baseline. Do not install pnpm through npm, Homebrew, or another global package manager. Use, not the deprecated
corepack install -g.corepack preparebashcorepack enable corepack install -g pnpm@10.20.0 node -e 'const { execFileSync } = require("node:child_process"); const actual = execFileSync("corepack", ["pnpm", "--version"], { encoding: "utf8" }).trim(); if (actual !== "10.20.0") { throw new Error(`pnpm must report 10.20.0; got ${actual}`) }' -
Install or update. If
makecliexists, runmakecli; otherwise runmakecli update --skip-skills.npm install -g @qfeius/makecliknows how it was installed: an npm or pnpm install is upgraded through that package manager, and any other installation replaces the binary in place.makecli updateIf the npm global install fails withon macOS or Linux, do not useEACCES. Point npm's global prefix at a user-owned directory, add it tosudo, then retry:PATHbashnpm config set prefix "$HOME/.npm-global" export PATH="$HOME/.npm-global/bin:$PATH" # also add this line to the shell profile -
Install or update Make platform skills every run.bash
npx skills add qfeius/make-platform-skills --all -yShow a compact Make skills result based on the command output, such as installed, updated, or already current.
本技能支持macOS、Linux和Windows系统。对于新建应用或明确迁移的应用,运行时版本是固定的:Node.js 、其捆绑的Corepack ,以及。以下步骤1-3仅适用于该模式。不得使用动态LTS版本、Homebrew或全局pnpm二进制文件,或更新的Corepack版本替代。
22.20.00.34.0pnpm@10.20.0对于未迁移的现有Make应用,请使用当前激活的Node二进制文件验证其声明的Node版本,并沿用其已建立的npm、Yarn或Corepack管理的pnpm工作流。如果其声明的Node版本未安装,请先询问用户再安装该版本;不得自动安装作为替代。继续执行通用的git、makecli和技能检查,不得修改应用文件。
22.20.0-
确保已安装精确版本的Node.js和
22.20.0。如果两者任一缺失,仅在用户确认后,使用对应平台的原生方法安装。git平台 Node.js 22.20.0git macOS 使用 再执行nvm install 22.20.0来安装并选择版本;如果没有nvm,使用用户选择的精确版本管理器nvm use 22.20.0,如果已安装Homebrew也可通过Homebrew安装xcode-select --installLinux 使用 再执行nvm install 22.20.0来安装并选择版本;如果没有nvm,使用用户选择的精确版本管理器nvm use 22.20.0发行版自带的包管理器,例如 apt install gitWindows 使用nvm-windows之类的精确版本管理器安装并选择 ,或使用官方Node.js22.20.0安装包22.20.0winget install Git.Git不得为Make App运行时使用动态的包管理器安装方式,例如、brew install node或apt install nodejs。如果没有可用的精确版本Node管理器,请停止操作并要求用户选择一个。winget install OpenJS.NodeJS.LTS -
在安装pnpm之前,验证固定的Node.js和Corepack基准版本。以下检查是跨平台的,必须全部通过:bash
node -e 'if (process.versions.node !== "22.20.0") { throw new Error(`Make Apps require Node.js 22.20.0; got ${process.versions.node}`) }' node -e 'const { execFileSync } = require("node:child_process"); const actual = execFileSync("corepack", ["--version"], { encoding: "utf8" }).trim(); if (actual !== "0.34.0") { throw new Error(`Corepack must report 0.34.0; got ${actual}`) }' -
启用Corepack并缓存固定的新建/迁移应用pnpm基准版本。不得通过npm、Homebrew或其他全局包管理器安装pnpm。使用,不要使用已弃用的
corepack install -g。corepack preparebashcorepack enable corepack install -g pnpm@10.20.0 node -e 'const { execFileSync } = require("node:child_process"); const actual = execFileSync("corepack", ["pnpm", "--version"], { encoding: "utf8" }).trim(); if (actual !== "10.20.0") { throw new Error(`pnpm must report 10.20.0; got ${actual}`) }' -
安装或更新。如果已存在
makecli,运行makecli;否则运行makecli update --skip-skills。npm install -g @qfeius/makecli会识别自身的安装方式:通过npm或pnpm安装的会通过对应包管理器升级,其他安装方式则直接替换二进制文件。makecli update如果在macOS或Linux上npm全局安装因失败,不要使用EACCES。将npm的全局前缀设置为用户拥有的目录,将其添加到sudo中,然后重试:PATHbashnpm config set prefix "$HOME/.npm-global" export PATH="$HOME/.npm-global/bin:$PATH" # also add this line to the shell profile -
每次运行时都安装或更新Make平台技能。bash
npx skills add qfeius/make-platform-skills --all -y根据命令输出显示简洁的Make技能结果,例如已安装、已更新或已是最新版本。
Verify Versions
验证版本
For a new or explicitly migrated App, run all checks and show a compact summary:
bash
node --version
npm --version
corepack --version
corepack pnpm --version
git --version
makecli versionIn that mode, Node must report exactly , Corepack exactly , and pnpm exactly . If any check fails, stop and repair the active runtime; do not continue with a different version.
v22.20.00.34.010.20.0For an existing Make App without migration, check , , , and only the package-manager command declared by the project (, , or for a compatible pnpm App). Compare them with the inspected manifest, Node-selection file and CI/install workflow. Do not require the fixed new-App triple or run Corepack checks for an npm/Yarn App. If they do not agree, stop and hand the compatibility blocker to .
node --versiongit --versionmakecli versionnpm --versionyarn --versioncorepack pnpm --versionmake-app-runtime对于新建或明确迁移的应用,运行所有检查并显示简洁的汇总结果:
bash
node --version
npm --version
corepack --version
corepack pnpm --version
git --version
makecli version在该模式下,Node必须精确显示,Corepack精确显示,pnpm精确显示。如果任何检查失败,请停止操作并修复当前运行时;不得使用其他版本继续。
v22.20.00.34.010.20.0对于未迁移的现有Make应用,检查、、,以及仅项目声明的包管理器命令(npm/Yarn应用对应/,兼容的pnpm应用对应)。将其与检查过的清单文件、Node版本选择文件和CI/安装工作流进行比对。不得要求使用新建应用的固定三件套版本,也不得对npm/Yarn应用运行Corepack检查。如果不一致,请停止操作并将兼容性阻塞问题移交处理。
node --versiongit --versionmakecli versionnpm --versionyarn --versioncorepack pnpm --versionmake-app-runtimeVerify Token With Guided Login
通过引导式登录验证Token
After the environment is configured successfully, check the current token:
bash
makecli configure verify --output=jsonIf verification succeeds, continue to project folder selection or initialization as appropriate.
If verification fails because the token is missing, expired, invalid, or belongs to the wrong environment:
- Run:
The command opens the browser, waits up to 60 seconds for the login callback, then exits on its own. If it prints an authorization URL instead of opening a browser, relay that URL to the user.bash
makecli login --timeout=60s - If the command exits successfully, login is done; continue to project folder selection or initialization as appropriate.
- If the command exits with a timeout or callback error, tell the user:
Then stop and wait for the user to replytext
请在浏览器中完成 makecli 登录。完成后回复“已经完成登录”。.已经完成登录 - After the user replies, run . If
makecli configure verify --output=jsonisvalid, login succeeded; continue. Iftrueisvalid, go back to step 1.false
If browser login is not convenient, offer the token fallback:
bash
makecli configure tokenThe user must complete interactive secret entry in their own terminal. After the user finishes, run to confirm the token. If is , ask the user to re-enter the token, or fall back to the guided flow above.
makecli configure verify --output=jsonvalidfalsemakecli login环境配置成功后,检查当前token:
bash
makecli configure verify --output=json如果验证成功,根据情况继续进行项目文件夹选择或初始化。
如果因token缺失、过期、无效或属于错误环境导致验证失败:
- 运行:
该命令会打开浏览器,最多等待60秒等待登录回调,然后自动退出。如果它打印了授权URL而不是打开浏览器,请将该URL转发给用户。bash
makecli login --timeout=60s - 如果命令成功退出,说明登录完成;根据情况继续进行项目文件夹选择或初始化。
- 如果命令因超时或回调错误退出,请告知用户:
然后停止操作,等待用户回复text
请在浏览器中完成 makecli 登录。完成后回复“已经完成登录”。。已经完成登录 - 用户回复后,运行。如果
makecli configure verify --output=json为valid,说明登录成功;继续操作。如果true为valid,返回步骤1。false
如果不方便使用浏览器登录,可提供token备选方案:
bash
makecli configure token用户必须在自己的终端中完成交互式密钥输入。用户完成后,运行确认token。如果为,请用户重新输入token,或回退到上述引导式流程。
makecli configure verify --output=jsonvalidfalsemakecli loginInitialize App Project Folder
初始化应用项目文件夹
For an existing Make App without a requested reinitialization, do not run . Keep its current project folder and report that location. The steps below apply only to a new App or a user-requested initialization.
makecli app initmakecli app init- Pick a candidate:
- If the user has already described the app they want to build, recommend a folder name derived from that description.
- Otherwise, if the current directory is not an existing project, recommend initializing in place.
- Otherwise recommend a generic name such as .
make_app
- Confirm with the user:
If the user replies anything other thantext
是否使用 <app-folder> 作为 App 目录?请回复 “是” 或 “否”。or是, ask again with the same prompt.否 - If the user replies , ask:
否Accept an absolute or relative path as provided.text请输入 App 目录地址: - Run , or
makecli app init <app-folder>with no argument when initializing the current directory. The command creates the directory if needed and is idempotent.makecli app init - If init fails with an invalid key error, the error message states the naming rule: derive a compliant folder name from the chosen one (for example →
contract-ledger), tell the user the adjusted name, and retry. For other errors, report the error and ask the user whether to retry or choose another directory. Continue only after init succeeds.contract_ledger
对于未要求重新初始化的现有Make应用,不得运行。保留其当前项目文件夹并告知该位置。以下步骤仅适用于新建应用或用户要求初始化的情况。
makecli app initmakecli app init- 选择候选目录:
- 如果用户已经描述了他们想要构建的应用,推荐一个从该描述派生的文件夹名称。
- 否则,如果当前目录不是现有项目,推荐就地初始化。
- 否则推荐一个通用名称,例如。
make_app
- 向用户确认:
如果用户回复的不是text
是否使用 <app-folder> 作为 App 目录?请回复 “是” 或 “否”。或是,使用相同提示再次询问。否 - 如果用户回复,询问:
否接受用户提供的绝对路径或相对路径。text请输入 App 目录地址: - 运行,如果是初始化当前目录则运行不带参数的
makecli app init <app-folder>。该命令会在需要时创建目录,且具有幂等性。makecli app init - 如果初始化因key无效错误失败,错误消息会说明命名规则:从所选名称派生出符合规则的文件夹名称(例如→
contract-ledger),告知用户调整后的名称,然后重试。对于其他错误,报告错误并询问用户是重试还是选择其他目录。仅在初始化成功后继续。contract_ledger
Setup Completion Output
配置完成输出
End only after the selected toolchain is verified and the token is valid (initial verification passed or the login flow succeeded). A new App also requires successful ; an existing App requires its declared runtime and folder to be verified without reinitialization. Use a concise readiness report:
makecli app init- Tool versions: Node, git, makecli and the selected project's package manager; include Corepack only when that project's workflow requires it.
- Make skills result.
- Login status: already valid or refreshed with .
makecli login - App folder: the initialized or verified existing directory.
Keep the completion output concise and next-step focused. Omit negative summaries about actions not performed.
If everything passes, say:
text
Make 开发环境已经准备好,可以进行下一步开发 App。For a newly initialized App, provide this small example:
text
App 参考示例:
我要做一个 Make App,用来演示合同台账管理。
角色包括管理员和业务人员。
核心流程是新建合同、维护付款计划、查看合同列表和详情。
请先和我确认需求细节,生成 apps/docs/PRD.md,再进行 DSL 建模;DSL 必须先 diff,等我确认后才 apply。仅在所选工具链验证通过且token有效(初始验证通过或登录流程成功)后才可结束。新建应用还需要成功;现有应用则需要验证其声明的运行时和文件夹,无需重新初始化。使用简洁的就绪报告:
makecli app init- 工具版本:Node、git、makecli以及所选项目的包管理器;仅当项目工作流需要时才包含Corepack。
- Make技能结果。
- 登录状态:已有效或通过刷新。
makecli login - 应用文件夹:已初始化的目录或已验证的现有目录。
保持完成输出简洁,聚焦下一步操作。省略关于未执行操作的负面总结。
如果所有检查都通过,输出:
text
Make 开发环境已经准备好,可以进行下一步开发 App。对于新初始化的应用,提供以下小示例:
text
App 参考示例:
我要做一个 Make App,用来演示合同台账管理。
角色包括管理员和业务人员。
核心流程是新建合同、维护付款计划、查看合同列表和详情。
请先和我确认需求细节,生成 apps/docs/PRD.md,再进行 DSL 建模;DSL 必须先 diff,等我确认后才 apply。