# @augmentd-labs/canvas-cli 中文文档

规范地址：https://npmcn.com/package/%40augmentd-labs/canvas-cli/

版本：2\.15\.4
npm 元数据更新时间：2026-11-03T13:37:48.920Z
中文译文更新时间：2026-11-08T11:15:15.781Z
软件包许可：AGPL-3\.0-or-later

本文由上游 README 翻译，可能存在偏差，请结合原文核对 API、命令与配置。版权与许可归原作者所有。

原始 npm 页面：https://www.npmjs.com/package/%40augmentd-labs/canvas-cli
原文对照：https://npmcn.com/package/%40augmentd-labs/canvas-cli/?lang=original
项目主页：https://github.com/canvas-ui/canvas-cli#readme
源码仓库：https://github.com/canvas-ui/canvas-cli

## 关键信息（来自 npm 元数据）

- 包体积（解压后）：476 kB，238 个文件
- 模块格式：ES Module
- TypeScript 类型：未声明
- 运行依赖：9 个
- 首次发布：2026-10-01T22:19:53.224Z
- 最新版本发布：2026-11-03T13:37:48.522Z
- 近 30 天下载量：1794（2026-10-07 至 2026-11-05，npm 官方下载统计）
- 已发布版本数：15（近 12 个月 15 个）

## 中文简介

帆布CLI

## 安装

```sh
npm install @augmentd-labs/canvas-cli
```

也可以使用：`pnpm add @augmentd-labs/canvas-cli`、`yarn add @augmentd-labs/canvas-cli`、`bun add @augmentd-labs/canvas-cli`

## README

![Canvas](https://raw.githubusercontent.com/canvas-ai/.github/main/banners/canvas-banner_1200x480.jpg)

# 帆布CLI

用于管理 Canvas 工作空间、上下文、点文件以及 与综合AI协助的文档.

## 安装

### 单线条( Linux / macOS)

```bash
curl -fsSL https://raw.githubusercontent.com/canvas-ui/canvas-cli/main/scripts/install.sh | bash
```

这解决了最新的 GitHub 发布, 下载了单文件 用于您的平台的二进制, 校验它与发布 `SHA256SUMS`, (中文(简体) ), 安装到 `~/.local/bin/canvas` 与快捷键相接 (单位:千美元)`ws`, (中文(简体) ), `ctx`, (中文(简体) ), `context`, (中文(简体) ), `dot`, (中文(简体) ), `agent`, (中文(简体) ), `ag`, (中文(简体) ), `hi`并主动提出 电线壳 快速整合到您的 rc 文件 .

不需要运行时间——二进制是包编成的自成一体的.

要初始化本地代理, 请选择 AgentD 仓库或下载存档 :

```bash
canvas init agent . --runtime-package git@github.com:canvas-ui/canvas-agentd.git
canvas init agent . --runtime-package ~/Downloads/canvas-agentd-main.zip
canvas init agent . --runtime-package ./canvas-agentd-0.3.2.tgz
```

本地运行时间支持Linux x64/arm64. Git来源使用您的 Git 证书; Git寄存器在没有子模块的情况下被克隆并被打包安装. 津巴布韦 需要档案 `unzip`。这两个来源都在 `~/.canvas/runtime/agent`。 。 。 . 随后开始重用已安装的软件包. 没有明确来源,管理 代理安装用途 `https://github.com/canvas-ui/canvas-agentd.git`。 。 。 .

旗帜可以通过管子传递:

```bash
# Non-interactive, prompt integration wired into ~/.bashrc (or ~/.zshrc)
curl -fsSL .../install.sh | bash -s -- --prompt

# Pin a version, install elsewhere, skip the extras
curl -fsSL .../install.sh | bash -s -- --version 2.1.13 --dir ~/bin --no-prompt --no-shortcuts
```

| 旗帜 | 效果 |
| --- | --- |
| `--version <ver>` | 安装一个特定的释放( N)`2.1.11` 或者说 `v2.1.11`(中文(简体) ) |
| `--dir <path>` | 安装目录( 默认) `~/.local/bin`,或 `$CANVAS_INSTALL_DIR`(中文(简体) ) |
| `--prompt` 编号 : `--no-prompt` | 电线 / 跳过快速集成而不被询问 |
| `--no-shortcuts` | 只安装 `canvas` |
| `--local [dir]` | Dev 安装: 围绕一个源检出( 见下文) 的包裹 |

运行 `scripts/install.sh` 随时更新.

### 单行线( Windows)

```powershell
irm https://raw.githubusercontent.com/canvas-ui/canvas-cli/main/scripts/install.ps1 | iex
```

安装 `canvas.exe` 输入 `%LOCALAPPDATA%\Programs\canvas`,写 `.cmd` shims 用于快捷键,并将目录添加到您的用户 PATH 中.

### 手动二进制下载

每次发行都附带单文件二进制, 下载为- as, 而不是 存档 :

| 平台 | 建筑 | 资产 |
| --- | --- | --- |
| **链接** | x64 (韩语) | [画布- linux](https://github.com/canvas-ui/canvas-cli/releases/latest/download/canvas-linux) |
| **链接** | 阿尔马-64 | [帆布- linux- 臂](https://github.com/canvas-ui/canvas-cli/releases/latest/download/canvas-linux-arm) |
| **马科斯** | x64 (韩语) | [画布macos](https://github.com/canvas-ui/canvas-cli/releases/latest/download/canvas-macos) |
| **马科斯** | ARM64 (平面硅) | [帆布- macos- 臂](https://github.com/canvas-ui/canvas-cli/releases/latest/download/canvas-macos-arm) |
| **窗口** | x64 (韩语) | [画布窗.exe](https://github.com/canvas-ui/canvas-cli/releases/latest/download/canvas-windows.exe) |

这些稳定的URL总是对最新发布的解析. 下载 [SHA256SUMS (英语)](https://github.com/canvas-ui/canvas-cli/releases/latest/download/SHA256SUMS) 以验证二进制.

```bash
sha256sum -c SHA256SUMS --ignore-missing   # every release ships SHA256SUMS
chmod +x canvas-linux
mv canvas-linux ~/.local/bin/canvas
```

macOS 和 Windows 二进制 **尚未签名**所以守门人和 SmartScreen将会在首跑时发出警告.

### 无

```bash
npx @augmentd-labs/canvas-cli              # one-off
npm install -g @augmentd-labs/canvas-cli   # installs the `canvas` command
```

没有瞄准镜 `canvas-cli` npmjs上的名称是一个不相关的软件包——使用 范围名称。 npm 软件包只安装 `canvas` 命令; 快捷键 (单位:千美元)`ctx`, (中文(简体) ), `context`, (中文(简体) ), `dot`, (中文(简体) ), `ws`, (中文(简体) ), `agent`, (中文(简体) ), `ag`, (中文(简体) ), `hi`与独立的船 二进制和源安装. 节点.js v20 LTS或更新.

### 来源(发展)

```bash
git clone https://github.com/canvas-ui/canvas-cli ~/Code/canvas/canvas-cli
cd ~/Code/canvas/canvas-cli
pnpm install                 # corepack enable, if pnpm is missing

# Wrappers in ~/.local/bin pointing at this checkout (bun if present, else node)
scripts/install.sh --local

# …or run it directly
node bin/canvas.js --help
```

`--local` 写小 `exec`\- 包装器,所以编辑到检查生效 即刻不再拖延.

## 壳牌快速整合

`scripts/update-prompt.sh` 用 Canvas 连接前缀您的提示 状态和已绑定的上下文 URL :

```
[● (work) admin@dev://universe://work/reports] user@host:~$
```

点是 **绿色** 当被捆绑的遥控器回答的时候, **红色** 当它是 无法到达或无所约束 **黄色** 当一个遥控器被束缚的时候 还没证实 这个状态是由 `canvas remote bind`, (中文(简体) ), `canvas remote ping` 财务报告和审定财务报表 `canvas context bind`; 以 错误仍然计为可达 .

上下文 URL 读取自 `~/.canvas/config/cli-session.json` 并刷新过 从服务器最多每30秒(`CANVAS_CONTEXT_UPDATE_TIMEOUT`, (中文(简体) ), 0.5分超时 死遥控器永远不会耽误你的提示.

安装器为您设置此功能( T)`--prompt`) (中文(简体) ). 手动:

```bash
mkdir -p ~/.canvas/scripts
curl -fsSL https://raw.githubusercontent.com/canvas-ui/canvas-cli/main/scripts/update-prompt.sh \
  -o ~/.canvas/scripts/update-prompt.sh

# ~/.bashrc or ~/.zshrc
[ -f "$HOME/.canvas/scripts/update-prompt.sh" ] && . "$HOME/.canvas/scripts/update-prompt.sh"
```

钩住它 `PROMPT_COMMAND` 击打和 `precmd_functions` 在兹什,保持你的 现有 `PS1` 状态区后面完好无损 颜色代码被标记 不打印,所以线条编辑和包装保持正确.

要求数 `jq` 财务报告和审定财务报表 `curl`; 无 `jq` 剧本会让您的提示不受影响. 还没有对应的动力壳.

## 使用量

```bash
canvas --help
```

### 语法

每个级别都有一个形状:

```
canvas <module> [<resource>] [<noun>] <verb> [<term>…] [--flags]
```

```bash
ctx note add "buy milk" --title Groceries    # noun, then verb
ctx note list
ctx notes                                    # plural noun == "<noun> list"
ctx note rm <docId>                          # unlink from this context
ws universe file list                        # same grammar, workspace scope
ws universe note add ./notes.md --title X
ag lucy sessions                             # and for agents
```

其余的有四条规则:

-   **复数名词列出.** `ctx notes` 实值 `ctx note list`在任何深处.
    
-   **`rm` 解开链接, `delete` 摧毁.** `ctx note rm <id>` 丢弃文档 从这个角度出发,放在工作空间; `ctx note delete <id>` 摧毁它和要求 `--force`。 。 。 .
    
-   **地址会比名词,名词会比资源.** `ctx note list` 这是 注意名词, 即使您有上下文 `note` - 把它当作 `ctx user@remote:note`。 。 。 .
    
-   **`-` 从 stdin 读取参数**,对于每个名词,CLI可以创建:
    
    ```bash
    journalctl --user --since today | grep -i err | ctx note add - --title "errors"
    echo https://example.com | ctx tab add -
    ```
    
    仅 `-` 拉起管子,所以没有什么挂 等待的一丁点 你从来没有的意思 发送. `file add` 是例外:它的参数是磁盘上的路径.
    

`--help` 在每个级别工作并打印您要求的用字行 关于: `canvas ws --help`, (中文(简体) ), `canvas ctx note --help`, (中文(简体) ), `canvas ctx note add --help`。 。 。 .

### 模块

| 模块 | 别名 | 它会做什么 |
| --- | --- | --- |
| `workspace` | `ws` | 管理工作空间 |
| `context` | `ctx` | 管理上下文 |
| `agent` | `ag`, (中文(简体) ), `hi` | 管理代理并提示他们 |
| `remote` | `remotes` | 管理远程 Canvas 服务器 |
| `dot` |  | 工作空间后置的点文件管理器( per- device 链接映射) |
| `role` | `ag-role` | 集装箱/作用(定位) |
| `auth` |  | 认证 & API 令牌 |
| `alias` |  | 资源别名 |
| `config` | `cfg`, (中文(简体) ), `settings` | CLI 配置 |
| `server` |  | 管理本地 Canvas 服务器( PM2) |

这个 `ws`, (中文(简体) ), `ctx`, (中文(简体) ), `context`, (中文(简体) ), `dot`, (中文(简体) ), `agent`, (中文(简体) ), `ag` 财务报告和审定财务报表 `hi` 二进制是独立的 模块的快捷键. `ag` 财务报告和审定财务报表 `hi` 两个拼法是: `canvas agent`,直到使用量稳定在一个.

```bash
# Workspaces and contexts
canvas ws list                 # or: canvas workspaces
canvas ws universe             # a named resource shows itself
canvas ws universe trees       # the trees in it; `tree` shows one
canvas ws universe tree rm /old/path -r --purge
canvas ctx bind <context>
canvas ctx                     # the bound context
canvas ctx tree paths          # one path per line
canvas contexts

# A context is a path in one tree of one workspace — `create` takes all three
canvas ctx create MBAG universe://project-foo/tasks/baz
canvas ctx create MBAG --workspace universe --url /project-foo/tasks/baz \
    --tree directory --base-url /project-foo

# Remotes, tokens and this device
canvas remote admin@dev            # a known remote id is a resource too
canvas remote admin@dev ping
canvas remote admin@dev device     # how this machine is registered there
canvas auth tokens                 # token list | create | rm | set
canvas dot device                  # this machine
canvas dot devices                 # every entry → device → local path

# Config (list | show | get | set | delete | edit | validate)
canvas config get server.url
canvas config set server.url http://127.0.0.1:8001
```

### 名词

名词是文档的图案,所以词汇表是网络和网络的同一种 服务器使用。 两者 `ctx` 财务报告和审定财务报表 `ws` 携带全套设备:

| 名词 | 多元 | 司马 | 动词 |
| --- | --- | --- | --- |
| `note` | `notes` | `data/schema/note` | 列表,添加,获取,rm,删除 |
| `tab` | `tabs` | `data/schema/tab` | 列表,添加,获取,rm,删除 |
| `todo` (单位:千美元)`task`(中文(简体) ) | `todos` | `data/schema/task` | 列表,添加,获取,rm,删除 |
| `link` | `links` | `data/schema/link` | 列表,添加,获取,rm,删除 |
| `file` | `files` | `data/schema/file` | 列表、添加、上传、索引、获取、rm、删除 |
| `email` | `emails` | `data/schema/message/email` | 列表,获取, rm, 删除 |
| `identity` | `identities` | `data/schema/identity` | 列表,获取, rm, 删除 |
| `dotfile` | `dotfiles` | `data/schema/dotfile` | 列表,获取(属于 `canvas dot`(中文(简体) ) |
| `doc` | `docs` | _任意_ | 列表,获取, rm, 删除 |
| `tree` | `trees` | —— 说 | 显示、路径、 rm _(工作空间)_ |

```bash
ctx todo add "ship the refactor" --due 2026-09-01T09:00:00Z --task-priority 2
ctx tab add https://example.com --title "Example"
ctx link add git+ssh://git@github.com/canvas-ui/canvas-cli --title canvas-cli
ctx file add ./report.pdf        # uploads the bytes (embeddable)
ctx file index ~/Photos          # records a device pointer, bytes stay put
ws work note add "meeting recap" --path notes:/standup
ctx doc list --feature data/schema/event    # any schema, by feature
```

列表按计划提供——注释显示其预览和标签,文件显示其 大小、 类型和字节是否为 `stored` 或在一个 `device:<id>`,一个待办事宜 状况、到期日和优先顺序. `-f json` 总是带着整个文件, `-f csv` 同样的柱子没有剪接.

上下文可以包含 **保存视图** ——功能过滤网络工具箱 坚持下去 通过上下文列出将视图折叠成 web 确实如此, 因此过滤到注释的上下文会列出即使它持有也没有标签 几百个. `ctx show` 打印为 `filter`,以及 `--all` 列表通过它 :

```bash
ctx show                         # filter  any: text, text/plain, note
ctx tabs                         # (empty) — this context filters to …
ctx tabs --all                   # every tab in the context
ctx update --clear-filter        # drop the saved view for good
```

`--clear-filter` 清除网络制作的绑定和工具箱芯片 因此,过滤器不会回到下一个工具箱中保存。 排序顺序和 其他视图设置则单独存在.

### 大赦国际的援助

```bash
# Prompt an agent (the default verb, so it can be elided)
hi lucy "whats the weather today"
canvas agent lucy "any new PRs to review?"

# Pipe stdin into the prompt
tail -n500 /var/log/syslog | hi linus "any idea what those ACPI errors are?"

# Conversations
ag lucy sessions                        # * marks the one it is talking in
ag lucy session new "refactor spike"
ag lucy session use <sessionId>
hi lucy --session <sessionId> "back to this one"

# What can it actually do?
ag lucy tools                           # tools the runtime exposes to it
ag lucy skills
ag lucy skill add ./my-skill            # a path or URL, or --name for inline

# Workspace-bound queries
canvas ws work agent prompt lucy "any new emails for this customer?"
hi lucy --workspace work --context foo "draft a reply please"
```

### 远程

远程识别为 `user@remote-name`。第一个添加的远程成为 默认; `bind` 开关之间.

```bash
canvas remote add idnc_sk@canvas https://canvas.idnc.sk    # prompts for login if no --token
canvas remote add admin@dev http://127.0.0.1:8001 --token <api-token>
canvas remotes                                              # list remotes
canvas remote bind admin@dev
```

### 软件包(懒惰模块)

核心CLI是auth,远程(包括工作空间镜像-) `canvas remote mirror …`,自2.11.0起构建),工作空间,背景,代理和配置. 本地服务器或桌面应用程序生活在一个被获取的单独软件包中 输入 `~/.canvas/packages/<name>` (无全局npm,无sudo)和 从那里装入 :

| 软件包 | 命令 | 带来 |
| --- | --- | --- |
| `server` | `canvas server …` | pm2 下的本地帆布服务器检出 |
| `desktop` | `canvas desktop …` | 此平台的桌面应用程序发布 |

在软件包存在之前使用其中一项命令可以显示它是什么,并且 提供下载; `--yes` / 非交互运行获得安装命令 换句话说. `canvas package list | install <name> | update | remove` 管理 他们。 每个软件包是一个自成一体的文件,发布到 npm 为 `@augmentd-labs/canvas-cli-<name>` (单位:千美元)`CANVAS_PACKAGE_SPEC_<NAME>` 覆盖 `latest` 带有版本、 tarball 或 git spec 的 ditt- tag; 从源检出 工作空间复制件在 `packages/cli-*` 直接使用.

### 更新( E)`canvas update`(中文(简体) )

一个命令保持所有布置在这个设备上的电流:

```bash
canvas update                 # check, show the plan, apply (asks first on a terminal)
canvas update check           # report only; `canvas update --check` does the same
canvas update cli --to 2.7.1  # pin the CLI to one release
canvas update edge            # just the canvas-edge daemon (or: packages | services | server)
canvas update --yes --skip-restart
```

| 组件 | 如何检查 | 如何更新 |
| --- | --- | --- |
| `cli` | 最新的 GitHub 释放( 二进制) 或 npm 登记册 | 发布二进制下载此平台旁边的资产, 验证 `SHA256SUMS`,运行一次,然后将其换入(与 `install.sh`); npm 安装运行 `npm install -g`; 源检出留给 `git pull` |
| `package:<name>` | `latest` npm vs 已安装的版本(一个已退役的软件包) - `mirror` ——删除) | `npm update` 内 `~/.canvas/packages/<name>` |
| `service:edge` | `latest` 联 合 国 `@augmentd-labs/canvas-edge` npm 对 `~/.canvas/edge` (内置镜像模块) | `npm update` ,然后当守护进程镜像存在时,守护进程会在 pm2(或重生) 下重新创建 |
| `service:server` | 远程分支头部对 `~/.canvas/server` (服务器包) | `git pull --ff-only` + 键 `npm install`,则 `pm2 restart` 运行时 |

软件包先行(它们携带服务更新器),然后服务,CLI 最后一个——新的 `canvas` 用于您的下一个命令。 没有终点站 除非 `--yes` 给出。 设定 `GITHUB_TOKEN` 若为 未校正的 GitHub API 费率限制会出问题。 软件包可以曝光 它的运行 `canvas update` 导出 `services` 从其模块 (单位:千美元)`{ id, label, installed(), latest(), update({ io, onStep }), restart?({ io }) }`) (中文(简体) ).

### 镜像( roaming profile)

`canvas remote mirror` (别名) `canvas mirror`) 将中枢的工作空间作为真正的文件夹同步到此上 机器(`~/Workspaces/<workspace>` (默认)通过 `canvas-fuse --mirror`数字 : 绑定的文件夹可以停机 其他的都是按要求取来的, 离线的编辑在枢纽可被达到时被按下,以及一个文件 两侧的更改从未被覆盖——中枢的版本保留了名称 你被保存在它的旁边 `name (conflict from <device> <date>).ext` (单位:千美元)`--conflicts rename`,默认值). 使用 `--conflicts prompt` 给枢纽的 冲突收件箱。 现有镜像 `conflicts: "prompt"` 留着 设置; 更改为 `"rename"` 内 `mirrors.json` 并重新启动镜像到 使用冲突副本.

`canvas remote mirror init` 是第一运行的向导( arrow- key 提示于 a) 终端, 管道时的平面读取线: 登录到服务器( 或选择一个) 配置远程, 选择镜像根, 然后选择 **镜像** 工作空间 从枢机作为本地文件夹(先过滤或守护进程,然后是多选择的) 工作空间,那么——只有在您想要的时候——要保持离线/限制的文件夹 同步到)或 **发布** 本地文件夹作为新的中枢工作空间,保留在其中 同步到位,或两者兼有。 pm2 在写东西前被检查: 当它被写入时 缺少要安装的向导提议, 或继续无监督 (单位:千美元)`--no-service` 跳过问题). 也一样 `canvas-edge`,则 文件夹同步守护进程( s)`@augmentd-labs/canvas-edge`在无法找到时 术士们提议取回它`canvas remote mirror edge install`: npm 软件包 输入 `~/.canvas/edge`,没有全局npm,没有sudo; `CANVAS_EDGE_PACKAGE` 覆盖 谱; `canvas remote mirror edge update` 拖动最新的并重新启动)——或本地检出,其路径在 `mirrors.json` (单位:千美元)`edgeBin`· ; `CANVAS_EDGE_BIN` 推翻它). 运行向导 之后再次添加或重新启动所配置的内容。 文件夹名称保留工作空间的大小写 (单位:千美元)`~/Workspaces/Universe`); 小写 `name` 中心的身份.

```bash
canvas remote mirror init                                  # wizard: hub login, root, mirror and/or publish, start
canvas remote mirror init --hub-url https://canvas.example.org --email me@x.org --password … \
    --root ~/Workspaces --workspace Universe,devel:UI/,Docs/ --publish ~/Code/UI:ui --conflicts rename --service --yes
canvas remote mirror add work --pin Contracts/ --conflicts rename
canvas remote mirror publish ~/Code/UI --name ui           # this folder becomes workspace 'ui' on the hub, synced in place (daemon)
canvas remote mirror publish ~/Notes --attach              # sync into an existing hub workspace of the same name
canvas remote mirror status                                # daemon state, cursor/head, pending, conflicts, lag
canvas remote mirror sync                                  # reconcile now
canvas remote mirror pin add devel Photos/2026/
canvas remote mirror conflicts                             # what waits in the hub inbox
canvas remote mirror conflicts devel --resolve 100042 --keep both
canvas remote mirror restart all                           # stop + start (after editing mirrors.json, or a dead mount)
canvas remote mirror service install                       # pm2 processes, restart on crash, start at login
canvas remote mirror stop all
```

状态 : `config/mirrors.json` (此设备的镜像列表), mount 自己的 缓存/引导器 `~/.canvas/<remote>/fuse/workspaces/<workspace>/`,则 设备在中枢上的状态报告(Workspace QQ Sync). 要求 `canvas-fuse` 二进制( e)`CANVAS_FUSE_BIN` 覆盖搜索)和,用于 `service`, 第2页.

### 输出格式

接受名单 `-f, --format` 与 `table` (违约), `json` 或者说 `csv`· ; `-r, --raw` 丢弃生的API JSON. 表格显示您要求的要紧栏 大约并剪接长值; `json` 总是完整的记录 `csv` 带有表格中的列未与ISO时间戳相连接.

```bash
canvas ws list -f json
canvas ctx notes -f csv
canvas ctx note get <docId>       # one record, down the page
```

## 配置

CLI保持状态 `~/.canvas/` (单位:千美元)`%USERPROFILE%\Canvas\` 在窗口上, 绝对可以 `CANVAS_USER_HOME`:

| 文件 | 目录 |
| --- | --- |
| `config/cli.json` | 常规设置( O)`canvas config list | get | set | edit`(中文(简体) ) |
| `config/remotes.json` | 以 URL 和 认证 符号注册的远程 —— 通过 `canvas remote add | bind | rename`,不是通过手 |
| `config/cli-session.json` | 当前会话: 绑定远程及其状态、 绑定上下文和 URL |
| `config/cli-aliases.json` | 用户定义的命令别名( N)`canvas alias`(中文(简体) ) |
| `config/mirrors.json` | 在此设备上映射的工作空间( W)`canvas remote mirror init | add | remove`(中文(简体) ) |
| `scripts/update-prompt.sh` | 安装后即时集成 |

AI 提示`hi`, (中文(简体) ), `canvas agent`(c) 与被捆绑的Canvas上的特工对峙 服务器 – 模型/ 提供者配置在服务器侧, 不在 CLI 中 .

## 释放

见 [发 言](https://npmcn.com/package/%40augmentd-labs/canvas-cli/RELEASE.md)。 。 。 .

## 许可证

版权(C)2024-2026 Jozef Melich.

罐头CLI根据以下规定获得许可证: **[AGPL-3.0- 或- 后期](https://npmcn.com/package/%40augmentd-labs/canvas-cli/LICENSE)** 且无 其他术语。 这一构成部分不向任何人提供商业豁免. Canvas客户端在所有情况下都保留自由软件.

贡献不需要CLA在这里, 只有一个DCO注册(`git commit -s`) (中文(简体) ). 见 [捐款额](https://npmcn.com/package/%40augmentd-labs/canvas-cli/CONTRIBUTING.md)。双许可的Canvas组件是: 列入清单 [通知](https://npmcn.com/package/%40augmentd-labs/canvas-cli/NOTICE)。 。 。 .

* * *

这个项目的资金来自: [强化实验室](https://augmentd.eu/en/labs)

### Nginx 客户端证书认证后的远程

Canvas 登录前配置身份 :

```sh
canvas remote add user@private https://canvas.example.org --tls-cert /absolute/path/client-chain.crt --tls-key /absolute/path/client.key
canvas remote tls set user@private --tls-cert /absolute/path/client-chain.crt --tls-key /absolute/path/client.key
canvas remote tls show user@private
canvas remote tls clear user@private
```

证书文件首先包含叶子,然后发行中间体. 使用一个 保护未加密的 RSA 或 EC PEM 私人密钥 (`chmod 600` 在 Unix; 仅限用户 视窗上的ACL). 证书/ 密钥路径保存于 `tls.certFile` 财务报告和审定财务报表 `tls.keyFile` 在共享远程商店。 扫描密码/ API- token 登录保留 所需经费。 服务器证书验证仍然启用 .

镜像上载接受相同的 `--tls-cert`编号 :`--tls-key` 选项 `--hub-url`;一个已选中的中枢使用已保存的 TLS 设置 。 守护进程镜像 • FUSE镜像需要画布-引信0.1.0或更新. 生成的多克配置只绑定证书/密钥并设定 `CANVAS_TLS_CERT`编号 :`CANVAS_TLS_KEY` 到容器路径。 源路径必须存在 在 Docker 主机上; 在其它位置部署时安全移动证书文件.

更新后, 替换相同路径的文件并重新启动守护进程镜像, 货架和集装箱 短 CLI 命令在每个引用上加载文件 。 电话 配置幸存了登录/登录和远程重命名. 清理配置 不删除证书/密钥文件或 Windows 本地导入.

为协调开发,在画布-api-客户端发布0.4.0之前,将其包装 从兄弟的帆布 常见的检查, 并安装焦油球 本地。 发布 共享包在释放此 CLI 之前; 不替换生产 证书文件进入测试中 .

## 常见问题

### @augmentd-labs/canvas-cli 是什么？

帆布CLI

### 如何安装 @augmentd-labs/canvas-cli？

在项目目录运行 npm install @augmentd-labs/canvas-cli，或使用 pnpm add / yarn add / bun add。它还提供命令行工具 canvas，可以用 npx canvas 直接运行。

### @augmentd-labs/canvas-cli 支持 TypeScript 吗？

该包的 package\.json 没有声明类型入口。需要类型提示时，可以在 npm 上查找社区维护的 @types/augmentd-labs\_\_canvas-cli 是否存在。

### @augmentd-labs/canvas-cli 支持 ESM 还是 CommonJS？

以 ES Module 形式发布，推荐使用 import 引入。在 CommonJS 项目中，Node\.js 20\.19\+ / 22\.12\+ 可以直接 require\(\) 不含顶层 await 的 ES Module，更早的版本需要改用动态 import\(\)。

### @augmentd-labs/canvas-cli 可以商用吗？

@augmentd-labs/canvas-cli 使用 AGPL-3\.0-or-later 许可。最严格的 Copyleft：除分发外，通过网络向用户提供基于它的服务也需要开源对应源码。闭源 SaaS 使用前务必评估。以上为概括，不构成法律意见，请以许可原文为准。

### @augmentd-labs/canvas-cli 的下载量有多少？

根据 npm 官方下载统计，@augmentd-labs/canvas-cli 在 2026/10/07 – 2026/11/05 这 30 天内被下载 1,794 次，日均约 60 次。下载量会把 CI 构建、镜像同步和作为其他包依赖的安装一并计入，适合横向比较热度，不能直接等同于使用人数。

### @augmentd-labs/canvas-cli 还在维护吗？

最新版本 2\.15\.4 发布于 2026/11/03（4 天前）；至今共发布 15 个版本，其中过去 12 个月发布了 15 个；首次发布于 2026/10/02。发布频率只是参考信号：功能稳定的工具可能很少需要更新，建议结合源码仓库的 issue 和提交记录判断。

