安装 ProtoNote CLI
在你的电脑上安装命令行工具,用浏览器完成账号授权,再让本地 AI 工作区安全地读取、校验和提交线上原型。
AI Agent 安装指南(纯文本,包含 CLI 和 Skill 完整步骤) · Agent 入口
安装前请确认 Node.js 版本CLI 需要 Node.js 22.13.0 或更高版本。授权不会写入原型文件或 Codex 对话。
01
检查运行环境
打开 PowerShell、命令提示符或终端,确认 Node.js 版本满足要求:
node --version
npm.cmd --versionnode --version
npm --version02
安装 CLI
推荐先下载固定版本包,再从本地文件安装,便于校验和回滚。下面的命令会读取 npm prefix -g,兼容 nvm、Homebrew、Conda、Hermes 等非标准 Node.js 环境,并把 CLI 目录加入当前 Shell 和用户级 PATH:
$ErrorActionPreference = "Stop"
$version = "0.2.1"
$package = Join-Path $env:TEMP "protonote-cli-$version.tgz"
Invoke-WebRequest -Uri "https://789779.xyz/downloads/protonote-cli-0.2.1.tgz" -OutFile $package
if ((Get-FileHash -Algorithm SHA256 -LiteralPath $package).Hash -ne "5bc1eeae96541b3a91662124fa76c56570f9d8acf87de6c6b2c07bbe8aa9cc0b") { throw "CLI SHA-256 校验失败" }
npm.cmd install -g $package
if ($LASTEXITCODE -ne 0) { throw "CLI 安装失败" }
$npmPrefix = (npm.cmd prefix -g).Trim()
if (-not $npmPrefix) { throw "无法读取 npm 全局安装目录" }
$env:Path = "$npmPrefix;$env:Path"
$userPath = [Environment]::GetEnvironmentVariable("Path", "User")
$userPathParts = @($userPath -split ";" | Where-Object { $_.Trim() })
if (-not ($userPathParts | Where-Object { $_.TrimEnd("\") -ieq $npmPrefix.TrimEnd("\") })) {
$newUserPath = if ($userPath) { "$userPath;$npmPrefix" } else { $npmPrefix }
[Environment]::SetEnvironmentVariable("Path", $newUserPath, "User")
}
Get-Command protonote.cmd -ErrorAction Stop | Out-Null
protonote.cmd --version
protonote.cmd auth statusset -eu
version="0.2.1"
package="${TMPDIR:-/tmp}/protonote-cli-${version}.tgz"
curl --fail --location "https://789779.xyz/downloads/protonote-cli-0.2.1.tgz" --output "$package"
if command -v sha256sum >/dev/null 2>&1; then actual=$(sha256sum "$package"); else actual=$(shasum -a 256 "$package"); fi
[ "${actual%% *}" = "5bc1eeae96541b3a91662124fa76c56570f9d8acf87de6c6b2c07bbe8aa9cc0b" ] || { echo "CLI SHA-256 校验失败" >&2; exit 1; }
npm install --global "$package"
npm_prefix="$(npm prefix --global)"
if [ -z "$npm_prefix" ]; then echo "无法读取 npm 全局安装目录" >&2; exit 1; fi
npm_bin="${npm_prefix}/bin"
if [ ! -x "$npm_bin/protonote" ]; then npm_bin="$npm_prefix"; fi
export PATH="$npm_bin:$PATH"
shell_rc=""
login_shell="${SHELL:-/bin/sh}"
case "${login_shell##*/}" in
zsh) shell_rc="${ZDOTDIR:-$HOME}/.zshrc" ;;
bash) shell_rc="$HOME/.bashrc" ;;
*) shell_rc="$HOME/.profile" ;;
esac
path_line=$(printf 'export PATH="%s:$PATH"' "$npm_bin")
if [ -n "$shell_rc" ]; then
touch "$shell_rc"
if ! grep -Fqx "$path_line" "$shell_rc" 2>/dev/null; then
printf '\n# ProtoNote CLI (npm global bin)\n%s\n' "$path_line" >> "$shell_rc"
fi
fi
hash -r 2>/dev/null || true
command -v protonote
protonote --version
protonote auth status也可以把下面这句话发送给 Codex、Cursor 或其他 AI Agent,让它按本页流程协助安装:
请按照 https://789779.xyz/install/cli 安装 ProtoNote CLI,完成 Node.js 检查、PATH 可发现性、CLI 版本和 auth status 验证;不要索取或输出我的授权令牌。03
完成浏览器授权
CLI 会打开 ProtoNote 登录页。请保持当前终端运行,直到授权完成:
protonote.cmd auth loginprotonote auth login浏览器跳转到 127.0.0.1 的回调地址属于正常现象。授权链接只在当前登录流程中有效,不要转发给其他人。
04
验证安装结果
安装命令最后会自动检查命令可发现性、CLI 版本和账号状态;手动复核时执行:
protonote.cmd --version
protonote.cmd auth statuscommand -v protonote
protonote --version
protonote auth status如果 zsh 启动时提示 ~/.local/bin/env 不是 Shell 脚本,这是 Hermes 的独立配置问题:先备份 ~/.zshrc,再删除其中 source 这个二进制文件的错误行,然后重新打开终端。不要把该二进制文件当作脚本执行。
之后再安装 Skill,并在需要使用 ProtoNote 的 Codex 工作区调用 @ProtoNote Prototype Skill。
NEXT STEP
去安装 Skill继续安装 Skill
CLI 只负责本机连接和文件同步;安装 Skill 后,Codex 才能按项目规则工作。
