taubyte-cli-prereqs

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Taubyte 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),
tau
/
dream
, and (when GitHub work is in scope) authenticated
tau
profile
are in place.

在运行任何其他Taubyte技能前,先执行本技能。它确保Node.jsDocker(引擎需运行——Dream、inject及本地容器工作流必备)、
tau
/
dream
,以及(涉及GitHub操作时)已认证的
tau
配置文件均已就绪。

Stop conditions (read first)

终止条件(请先阅读)

SituationAction
Node missing and cannot be installed from this environmentStop; give OS-specific install instructions; do not run
npm i -g
without
node
.
Docker missing, daemon not running, and cannot be fixed from this environmentStop; give install/start instructions (see Docker section).
GitHub-backed work needed but no
tau
profile
/ login incomplete
Stop; follow
taubyte-auth-and-profile
(browser login hard stop applies there).
tau
or
dream
still broken after install attempts
Stop; log attempts in
.taubyte_ai/logs.txt
(or project context log per
taubyte-context-log
).

场景操作
Node.js缺失且无法在当前环境安装终止;提供对应操作系统的安装指引;未安装Node.js前不要执行
npm i -g
命令。
Docker缺失、守护进程未运行且无法在当前环境修复终止;提供安装/启动指引(详见Docker章节)。
需要基于GitHub的操作,但
tau
配置文件
/ 登录未完成
终止;遵循**
taubyte-auth-and-profile
**流程(其中包含浏览器登录强制终止机制)。
尝试安装后**
tau
dream
**仍无法正常运行
终止;将尝试过程记录至**
.taubyte_ai/logs.txt
(或根据
taubyte-context-log
**记录至项目上下文日志)。

Workflow order

工作流顺序

  1. Node.js — detect; install automatically when possible (see §1).
  2. Docker — detect CLI + daemon; install or start when possible (see §2).
  3. tau
    /
    dream
    — detect; install from
    @taubyte
    npm packages when missing (see §3).
  4. tau login
    / profile
    taubyte-auth-and-profile
    for all login policy; quick
    tau --json current
    gate here (see §4).
  5. Verify after any install (see §5).

  1. Node.js —— 检测;环境允许时自动安装(见第1节)。
  2. Docker —— 检测CLI + 守护进程环境允许时安装或启动(见第2节)。
  3. tau
    /
    dream
    —— 检测;缺失时从**
    @taubyte
    ** npm包安装(见第3节)。
  4. tau login
    / 配置文件
    —— 所有登录策略均遵循**
    taubyte-auth-and-profile
    ;在此处通过快速执行
    tau --json current
    **进行检查(见第4节)。
  5. 验证 —— 任何安装完成后执行验证(见第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 --version
bash
command -v node >/dev/null 2>&1 && node --version
command -v npm >/dev/null 2>&1 && npm --version

If
node
is missing or
node --version
fails

node
缺失或
node --version
执行失败

Prefer installing Node for the user when the environment supports it (network, permissions, non-interactive package managers):
  • Windows (e.g.
    winget
    available):
    bash
    winget install -e --id OpenJS.NodeJS.LTS --accept-package-agreements --accept-source-agreements
  • macOS (
    brew
    on PATH):
    bash
    brew install node
  • Linux (Debian/Ubuntu family, when
    apt-get
    is usable):
    bash
    sudo 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
npm i -g @taubyte/cli
or
npm i -g @taubyte/dream
until
node
and
npm
work.

当环境支持(网络、权限、非交互式包管理器可用)时,优先为用户自动安装Node.js
  • Windows(如
    winget
    可用):
    bash
    winget install -e --id OpenJS.NodeJS.LTS --accept-package-agreements --accept-source-agreements
  • macOS
    brew
    已在PATH中):
    bash
    brew install node
  • Linux(Debian/Ubuntu系列,
    apt-get
    可用时):
    bash
    sudo apt-get update && sudo apt-get install -y nodejs npm
若自动安装失败、被阻止(无sudo权限、无winget/brew、CI沙箱限制),或操作系统不明确,则终止流程,告知用户从https://nodejs.org/(或对应发行版的Node LTS包)安装Node.js LTS,然后打开新终端重新执行本技能。
node
npm
正常工作前,不要执行
npm i -g @taubyte/cli
npm i -g @taubyte/dream
命令。

2. Docker

2. Docker

Docker is required for Dream,
dream inject
, and other local container-backed Taubyte flows (see
taubyte-dream-local-operations
,
taubyte-cloud-selection
). You need both the
docker
CLI
and a running daemon (
docker info
succeeds).
Docker是Dream
dream inject
及其他基于本地容器的Taubyte流程(详见
taubyte-dream-local-operations
taubyte-cloud-selection
)的必备工具。需同时具备**
docker
CLI运行中的守护进程**(
docker info
执行成功)。

Detect

检测

bash
command -v docker >/dev/null 2>&1 && docker version
docker info
  • If
    docker
    is not in PATH
    → treat as not installed; try install workflow below.
  • If
    docker info
    fails with connection / daemon errors but
    docker version
    shows a client → the engine is stopped or the user lacks permission. Prefer starting Docker Desktop (Windows/macOS) or
    sudo systemctl start docker
    (Linux), or
    sudo usermod -aG docker $USER
    + re-login when the error is permission-related. Do not assume a fresh install fixes a stopped daemon.
bash
command -v docker >/dev/null 2>&1 && docker version
docker info
  • 若**
    docker
    不在PATH中** → 视为未安装;尝试以下安装流程。
  • 若**
    docker info
    连接/守护进程错误失败,但
    docker version
    显示客户端已安装 → 引擎已
    停止或用户无权限。优先尝试启动Docker Desktop**(Windows/macOS)或执行**
    sudo systemctl start docker
    (Linux);若错误与权限相关,执行
    sudo usermod -aG docker $USER
    **并重新登录。不要假设全新安装能解决守护进程停止的问题。

Install when the CLI is missing (automate when possible)

CLI缺失时的安装(环境允许时自动执行)

  • Windows (
    winget
    ):
    bash
    winget install -e --id Docker.DockerDesktop --accept-package-agreements --accept-source-agreements
    After install, the user may need to start Docker Desktop once (or reboot). Re-run
    docker info
    after they confirm it is running.
  • macOS (
    brew
    ):
    bash
    brew install --cask docker
    Then start Docker Desktop from Applications and re-check
    docker info
    .
  • Linux (Debian/Ubuntu, when
    apt-get
    + sudo work):
    bash
    sudo apt-get update && sudo apt-get install -y docker.io
    sudo systemctl enable --now docker
    If builds still fail with permission errors, document
    sudo usermod -aG docker <user>
    and logging out/in, or use
    sudo docker info
    only to confirm the daemon — long-term, the user should be in the
    docker
    group.
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
docker info
works.

  • Windows
    winget
    可用):
    bash
    winget install -e --id Docker.DockerDesktop --accept-package-agreements --accept-source-agreements
    安装完成后,用户可能需要启动Docker Desktop一次(或重启系统)。用户确认运行后,重新执行**
    docker info
    **检查。
  • macOS
    brew
    可用):
    bash
    brew install --cask docker
    然后从应用程序中启动Docker Desktop,重新检查**
    docker info
    **。
  • Linux(Debian/Ubuntu,
    apt-get
    +sudo可用时):
    bash
    sudo 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 EngineDocker Desktop,待**
docker info
**执行成功后重新运行本技能。

3. Taubyte CLIs on npm (
@taubyte
scope)

3. npm上的Taubyte CLI(
@taubyte
作用域)

Official
tau
and Dream packages are published on npm under the
@taubyte
organization, for example:
  • @taubyte/cli
    — provides the
    tau
    command (wrapper downloads the platform
    tau
    binary as needed).
  • @taubyte/dream
    — local cloud / Dream CLI.
官方**
tau
Dream包发布在npm的
@taubyte
**组织下,例如:
  • @taubyte/cli
    —— 提供**
    tau
    **命令(包装器会根据需要下载平台
    tau
    二进制文件)。
  • @taubyte/dream
    —— 本地云 / Dream CLI。

Detect

检测

bash
command -v tau >/dev/null 2>&1 && tau version
command -v dream >/dev/null 2>&1 && (dream --version || dream --help) || true
If
dream
fails but Node works, a broken shell alias may point to a missing binary. Try:
bash
node "$(npm root -g)/@taubyte/dream/index.js" --help
bash
command -v tau >/dev/null 2>&1 && tau version
command -v dream >/dev/null 2>&1 && (dream --version || dream --help) || true
dream
执行失败但Node.js正常,可能是损坏的shell别名指向了缺失的二进制文件。尝试:
bash
node "$(npm root -g)/@taubyte/dream/index.js" --help

Install when missing (Node + npm must work)

缺失时的安装(需Node.js + npm正常工作)

Default: global npm:
bash
npm i -g @taubyte/cli
npm i -g @taubyte/dream
Alternative (e.g. npm global path blocked):
bash
curl https://get.tau.link/cli | sh
curl https://get.tau.link/dream | sh
If 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
)

4. 认证与
tau login
(遵循
taubyte-auth-and-profile

Any flow that touches GitHub (clone,
tau new project
,
tau push
, generated repos) needs a valid Taubyte profile and GitHub auth.
Do not improvise login policy here. Load and follow
taubyte-auth-and-profile
for:
  • 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 current
Inspect Profile (and cloud if needed). If there is no profile and the upcoming work requires GitHub, apply
taubyte-auth-and-profile
and do not continue to project create, push, import, or website repo operations until auth is resolved.
If the user refuses or cannot complete required login, stop the Taubyte workflow.

任何涉及GitHub的流程(克隆、
tau new project
tau push
、生成仓库)都需要有效的Taubyte配置文件和GitHub认证。
请勿在此处自行制定登录策略。加载并遵循**
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" --help

bash
node --version
npm --version
docker version
docker info
tau version
dream --version || dream --help || node "$(npm root -g)/@taubyte/dream/index.js" --help

Hard stops (summary)

强制终止总结

  • No Node (and install not possible or failed): stop; no global
    @taubyte
    npm installs.
  • 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
    taubyte-auth-and-profile
    : stop.
  • tau
    /
    dream
    still failing after install: stop; log diagnostics to
    .taubyte_ai/logs.txt
    .
  • Do not proceed to cloud / project / resource operations until this gate passes.
  • 无Node.js(且无法安装或安装失败):终止;不执行全局
    @taubyte
    npm安装。
  • Docker无法正常工作(CLI缺失且安装失败,或守护进程未运行/用户无权限且引导后仍无法解决):在执行Dream / inject / 本地容器工作前终止。
  • GitHub操作未按**
    taubyte-auth-and-profile
    **完成认证:终止。
  • 安装后**
    tau
    /
    dream
    仍无法运行:终止;将诊断信息记录至
    .taubyte_ai/logs.txt
    **。
  • 在本检查通过前,不要继续执行云/项目/资源操作。