taubyte-cli-prereqs
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseTaubyte CLI prerequisites (hard gate)
Taubyte CLI 前置要求(硬性检查)
Purpose
目的
Run this skill before any other Taubyte skill. It ensures Node.js, Docker (engine running — needed for Dream, inject, and local container workflows), / , and (when GitHub work is in scope) authenticated profile are in place.
taudreamtau在运行任何其他Taubyte技能前,先执行本技能。它确保Node.js、Docker(引擎需运行——Dream、inject及本地容器工作流必备)、 / ,以及(涉及GitHub操作时)已认证的配置文件均已就绪。
taudreamtauStop conditions (read first)
终止条件(请先阅读)
| Situation | Action |
|---|---|
| Node missing and cannot be installed from this environment | Stop; give OS-specific install instructions; do not run |
| Docker missing, daemon not running, and cannot be fixed from this environment | Stop; give install/start instructions (see Docker section). |
GitHub-backed work needed but no | Stop; follow |
| Stop; log attempts in |
| 场景 | 操作 |
|---|---|
| Node.js缺失且无法在当前环境安装 | 终止;提供对应操作系统的安装指引;未安装Node.js前不要执行 |
| Docker缺失、守护进程未运行且无法在当前环境修复 | 终止;提供安装/启动指引(详见Docker章节)。 |
需要基于GitHub的操作,但无 | 终止;遵循** |
尝试安装后** | 终止;将尝试过程记录至** |
Workflow order
工作流顺序
- Node.js — detect; install automatically when possible (see §1).
- Docker — detect CLI + daemon; install or start when possible (see §2).
- /
tau— detect; install fromdreamnpm packages when missing (see §3).@taubyte - / profile —
tau loginfor all login policy; quicktaubyte-auth-and-profilegate here (see §4).tau --json current - Verify after any install (see §5).
- Node.js —— 检测;环境允许时自动安装(见第1节)。
- Docker —— 检测CLI + 守护进程;环境允许时安装或启动(见第2节)。
- /
tau—— 检测;缺失时从**dream** npm包安装(见第3节)。@taubyte - / 配置文件 —— 所有登录策略均遵循**
tau login;在此处通过快速执行taubyte-auth-and-profile**进行检查(见第4节)。tau --json current - 验证 —— 任何安装完成后执行验证(见第5节)。
1. Node.js
1. Node.js
Detect
检测
bash
command -v node >/dev/null 2>&1 && node --version
command -v npm >/dev/null 2>&1 && npm --versionbash
command -v node >/dev/null 2>&1 && node --version
command -v npm >/dev/null 2>&1 && npm --versionIf node
is missing or node --version
fails
nodenode --version若node
缺失或node --version
执行失败
nodenode --versionPrefer installing Node for the user when the environment supports it (network, permissions, non-interactive package managers):
-
Windows (e.g.available):
wingetbashwinget install -e --id OpenJS.NodeJS.LTS --accept-package-agreements --accept-source-agreements -
macOS (on PATH):
brewbashbrew install node -
Linux (Debian/Ubuntu family, whenis usable):
apt-getbashsudo apt-get update && sudo apt-get install -y nodejs npm
If automated install fails, is blocked (no sudo, no winget/brew, CI sandbox), or the OS is unclear, stop and ask the user to install Node.js LTS from https://nodejs.org/ (or their distro’s Node LTS packages), then open a new terminal and rerun this skill.
Do not run or until and work.
npm i -g @taubyte/clinpm i -g @taubyte/dreamnodenpm当环境支持(网络、权限、非交互式包管理器可用)时,优先为用户自动安装Node.js:
-
Windows(如可用):
wingetbashwinget install -e --id OpenJS.NodeJS.LTS --accept-package-agreements --accept-source-agreements -
macOS(已在PATH中):
brewbashbrew install node -
Linux(Debian/Ubuntu系列,可用时):
apt-getbashsudo apt-get update && sudo apt-get install -y nodejs npm
若自动安装失败、被阻止(无sudo权限、无winget/brew、CI沙箱限制),或操作系统不明确,则终止流程,告知用户从https://nodejs.org/(或对应发行版的Node LTS包)安装Node.js LTS,然后打开新终端重新执行本技能。
在和正常工作前,不要执行或命令。
nodenpmnpm i -g @taubyte/clinpm i -g @taubyte/dream2. Docker
2. Docker
Docker is required for Dream, , and other local container-backed Taubyte flows (see , ). You need both the CLI and a running daemon ( succeeds).
dream injecttaubyte-dream-local-operationstaubyte-cloud-selectiondockerdocker infoDocker是Dream、及其他基于本地容器的Taubyte流程(详见、)的必备工具。需同时具备** CLI和运行中的守护进程**(执行成功)。
dream injecttaubyte-dream-local-operationstaubyte-cloud-selectiondockerdocker infoDetect
检测
bash
command -v docker >/dev/null 2>&1 && docker version
docker info- If is not in PATH → treat as not installed; try install workflow below.
docker - If fails with connection / daemon errors but
docker infoshows a client → the engine is stopped or the user lacks permission. Prefer starting Docker Desktop (Windows/macOS) ordocker version(Linux), orsudo systemctl start docker+ re-login when the error is permission-related. Do not assume a fresh install fixes a stopped daemon.sudo usermod -aG docker $USER
bash
command -v docker >/dev/null 2>&1 && docker version
docker info- 若**不在PATH中** → 视为未安装;尝试以下安装流程。
docker - 若**因连接/守护进程错误失败,但
docker info显示客户端已安装 → 引擎已停止或用户无权限。优先尝试启动Docker Desktop**(Windows/macOS)或执行**docker version(Linux);若错误与权限相关,执行sudo systemctl start docker**并重新登录。不要假设全新安装能解决守护进程停止的问题。sudo usermod -aG docker $USER
Install when the CLI is missing (automate when possible)
CLI缺失时的安装(环境允许时自动执行)
-
Windows ():
wingetbashwinget install -e --id Docker.DockerDesktop --accept-package-agreements --accept-source-agreementsAfter install, the user may need to start Docker Desktop once (or reboot). Re-runafter they confirm it is running.docker info -
macOS ():
brewbashbrew install --cask dockerThen start Docker Desktop from Applications and re-check.docker info -
Linux (Debian/Ubuntu, when+ sudo work):
apt-getbashsudo apt-get update && sudo apt-get install -y docker.io sudo systemctl enable --now dockerIf builds still fail with permission errors, documentand logging out/in, or usesudo usermod -aG docker <user>only to confirm the daemon — long-term, the user should be in thesudo docker infogroup.docker
If install is not possible (no admin, winget/brew/apt unavailable, headless policy), stop and point the user to https://docs.docker.com/get-docker/ for Docker Engine or Docker Desktop, then rerun this skill once works.
docker info-
Windows(可用):
wingetbashwinget install -e --id Docker.DockerDesktop --accept-package-agreements --accept-source-agreements安装完成后,用户可能需要启动Docker Desktop一次(或重启系统)。用户确认运行后,重新执行****检查。docker info -
macOS(可用):
brewbashbrew install --cask docker然后从应用程序中启动Docker Desktop,重新检查****。docker info -
Linux(Debian/Ubuntu,+sudo可用时):
apt-getbashsudo apt-get update && sudo apt-get install -y docker.io sudo systemctl enable --now docker若构建仍因权限错误失败,记录**及注销/登录步骤;仅在确认守护进程时使用sudo usermod -aG docker <user>——长期来看,用户应加入sudo docker info**用户组。docker
若安装不可行(无管理员权限、winget/brew/apt不可用、无头策略限制),则终止流程,引导用户前往https://docs.docker.com/get-docker/安装Docker Engine或Docker Desktop,待****执行成功后重新运行本技能。
docker info3. Taubyte CLIs on npm (@taubyte
scope)
@taubyte3. npm上的Taubyte CLI(@taubyte
作用域)
@taubyteOfficial and Dream packages are published on npm under the organization, for example:
tau@taubyte- — provides the
@taubyte/clicommand (wrapper downloads the platformtaubinary as needed).tau - — local cloud / Dream CLI.
@taubyte/dream
Browse or confirm versions: https://www.npmjs.com/search?q=scope%3A%40taubyte.
官方**和Dream包发布在npm的**组织下,例如:
tau@taubyte- —— 提供**
@taubyte/cli**命令(包装器会根据需要下载平台tau二进制文件)。tau - —— 本地云 / Dream CLI。
@taubyte/dream
Detect
检测
bash
command -v tau >/dev/null 2>&1 && tau version
command -v dream >/dev/null 2>&1 && (dream --version || dream --help) || trueIf fails but Node works, a broken shell alias may point to a missing binary. Try:
dreambash
node "$(npm root -g)/@taubyte/dream/index.js" --helpbash
command -v tau >/dev/null 2>&1 && tau version
command -v dream >/dev/null 2>&1 && (dream --version || dream --help) || true若执行失败但Node.js正常,可能是损坏的shell别名指向了缺失的二进制文件。尝试:
dreambash
node "$(npm root -g)/@taubyte/dream/index.js" --helpInstall when missing (Node + npm must work)
缺失时的安装(需Node.js + npm正常工作)
Default: global npm:
bash
npm i -g @taubyte/cli
npm i -g @taubyte/dreamAlternative (e.g. npm global path blocked):
bash
curl https://get.tau.link/cli | sh
curl https://get.tau.link/dream | shIf install fails, stop immediately (see stop conditions).
默认方式:全局npm安装:
bash
npm i -g @taubyte/cli
npm i -g @taubyte/dream替代方式(如npm全局路径被阻止):
bash
curl https://get.tau.link/cli | sh
curl https://get.tau.link/dream | sh若安装失败,立即终止流程(详见终止条件)。
4. Auth and tau login
(defer to taubyte-auth-and-profile
)
tau logintaubyte-auth-and-profile4. 认证与tau login
(遵循taubyte-auth-and-profile
)
tau logintaubyte-auth-and-profileAny flow that touches GitHub (clone, , , generated repos) needs a valid Taubyte profile and GitHub auth.
tau new projecttau pushDo not improvise login policy here. Load and follow for:
taubyte-auth-and-profile- ,
tau login,tau login --new,--name,--token--provider github - Browser-based login (tell user, stop until done — see that skill)
- Non-interactive patterns with
taubyte-execution-modes
Minimal gate check in this skill only:
bash
tau --json currentInspect Profile (and cloud if needed). If there is no profile and the upcoming work requires GitHub, apply and do not continue to project create, push, import, or website repo operations until auth is resolved.
taubyte-auth-and-profileIf the user refuses or cannot complete required login, stop the Taubyte workflow.
任何涉及GitHub的流程(克隆、、、生成仓库)都需要有效的Taubyte配置文件和GitHub认证。
tau new projecttau push请勿在此处自行制定登录策略。加载并遵循****流程处理:
taubyte-auth-and-profile- 、
tau login、tau login --new、--name、--token--provider github - 基于浏览器的登录(告知用户,终止流程直至完成——详见该技能)
- 结合**的非交互式**模式
taubyte-execution-modes
本技能仅执行最小化检查:
bash
tau --json current检查配置文件(必要时检查云环境)。若无配置文件且后续工作需要GitHub,则执行**流程,在认证完成前不要**继续执行项目创建、推送、导入或网站仓库操作。
taubyte-auth-and-profile若用户拒绝或无法完成必要的登录,终止Taubyte工作流。
5. Verify after installs
5. 安装后的验证
bash
node --version
npm --version
docker version
docker info
tau version
dream --version || dream --help || node "$(npm root -g)/@taubyte/dream/index.js" --helpbash
node --version
npm --version
docker version
docker info
tau version
dream --version || dream --help || node "$(npm root -g)/@taubyte/dream/index.js" --helpHard stops (summary)
强制终止总结
- No Node (and install not possible or failed): stop; no global npm installs.
@taubyte - No working Docker (CLI missing and install failed, or daemon not running / no permission after user guidance): stop before Dream / inject / local container work.
- GitHub work without completed auth per : stop.
taubyte-auth-and-profile - /
taustill failing after install: stop; log diagnostics todream..taubyte_ai/logs.txt - Do not proceed to cloud / project / resource operations until this gate passes.
- 无Node.js(且无法安装或安装失败):终止;不执行全局npm安装。
@taubyte - Docker无法正常工作(CLI缺失且安装失败,或守护进程未运行/用户无权限且引导后仍无法解决):在执行Dream / inject / 本地容器工作前终止。
- GitHub操作未按****完成认证:终止。
taubyte-auth-and-profile - 安装后**/
tau仍无法运行:终止;将诊断信息记录至dream**。.taubyte_ai/logs.txt - 在本检查通过前,不要继续执行云/项目/资源操作。