@doist/outline-cli

中文文档
2.6.0发布于 2026/11/11MITES Module近 30 天下载 4301

维基语录/知识基础 API

此软件包已被标记为弃用

Moved to @todoist/outline-cli. Run: npm uninstall -g @doist/outline-cli && npm install -g @todoist/outline-cli

中文使用文档
文档目录11 节
  1. 安装
  2. 代理技能
  3. 卸载
  4. 本地设置
  5. 设置
  6. OAuth 登录( 建议)
  7. 手动令牌登录
  8. 配置
  9. 图标
  10. 输出模式
  11. 发展

大纲 CLI

用于 大纲 维基/知识基础 API.

安装

需要节点24+.

npm install -g @doist/outline-cli

代理技能

为您的编码代理安装技能 :

ol skill install claude-code
ol skill install codex
ol skill install cursor
ol skill install gemini
ol skill install pi
ol skill install universal

技能安装到 ~/<agent-dir>/skills/outline-cli/SKILL.md (例如:. ~/.claude/ 为克来德码, ~/.agents/ (为普世等). 在更新CLI时,所安装的技能会被自动更新. 这个 universal 代理与 Amp 、 OpenCode 和其他从 ~/.agents/。 。 。 .

ol skill list
ol skill uninstall <agent>

卸载

首先,删除任何已安装的代理技能:

ol skill uninstall <agent>

然后解开CLI:

npm uninstall -g @doist/outline-cli

本地设置

git clone https://github.com/todoist/outline-cli.git
cd outline-cli
npm install
npm run build
npm link

设置

ol auth login
ol auth login --base-url <your-outline-url>
ol auth login --client-id <your-client-id>
ol auth login --callback-port 54969
ol auth status
ol auth logout

设置 :

  1. 在大纲中创建一个公开的 OAuth 应用程序( 设置 )
  2. 设置重定向 URI 到 http://localhost:54969/callback
  3. 运行 ol auth login 时输入 OAuth 客户端标识 (或直接通过它与 --client-id <your-client-id>(中文(简体) )
  4. 如果需要,请通过 --base-url <your-outline-url> 或设置 OUTLINE_URL (对于自办实例或非默认 URL)
  5. 如果需要,请通过 --callback-port <port> 或设置 OUTLINE_OAUTH_CALLBACK_PORT 和登记 http://localhost:<port>/callback 在您的 OAuth 应用程序中

客户端ID被保存用于未来的登录. 您也可以设置 OUTLINE_OAUTH_CLIENT_ID 您的本地环境.

手动令牌登录

如果您喜欢直接使用 API 令牌 :

ol auth token <your-api-token>   # save a token (verifies it against your instance)
ol auth token                    # prompt for the token interactively
ol auth token view               # print the stored token to stdout (refreshes an expiring OAuth token first)

在设置下 API Tokens 生成一个符号 。 过 --base-url <your-outline-url> 如果该标志属于自主办实例.

您也可以完全通过设置跳过存储一个符号 OUTLINE_API_TOKEN 内 你的环境.

配置

调试分辨率 : OUTLINE_API_TOKEN (原始内容存档于2018-10-21) (中文(简体) ). env var ~/.config/outline-cli/config.json。 。 。 .

基础 URL 分辨率 : OUTLINE_URL var – 配置文件 – https://app.getoutline.com。 。 。 .

OAuth 登录的回调端口分辨率 : --callback-port → OUTLINE_OAUTH_CALLBACK_PORT → 54969。 。 。 .

自办个案:通过 --base-url 或设置 OUTLINE_URL (你还可以以互动方式提供).

图标

# Search
ol search "query" --limit 10 --offset 10 --collection <id> --status published

# Documents (alias: ol doc)
ol document list --collection <id> --sort updatedAt --direction DESC
ol document get <urlId>              # renders markdown for terminal
ol document get <urlId> --raw        # outputs raw markdown
ol document open <urlId>             # opens in browser
ol document create --title "Title" --collection <id> --file doc.md --publish
ol document update <urlId> --file updated.md
cat notes.md | ol document update <urlId> --stdin # reads markdown from stdin
ol document update <urlId> --publish # publishes a draft
ol document update <urlId> --publish --collection <id> # publishes a draft that has no collection
ol document update <urlId> --file updated.md --if-updated-at <updatedAt> # fails if saved since then
ol document delete <urlId> --confirm
ol document restore <urlId>          # restores from trash
ol document move <urlId> --collection <target-id>
ol document archive <urlId>
ol document unarchive <urlId>

# Collections (alias: ol col)
ol collection list
ol collection get <id>
ol collection create --name "Engineering" --color "#4CAF50"
ol collection update <id> --name "New Name"
ol collection delete <id> --confirm

输出模式

所有命令支持 :

  • 默认: 彩色可读输出
  • --json: 印得很漂亮的 JSON( 必要领域)
  • --json --full: 所有字段
  • --ndjson: 每行有一个 JSON 对象(用于管道)

发展

npm install
npm run dev          # watch mode
npm run type-check   # typecheck without emitting
npm run test         # run tests
npm run build        # compile to dist/

版本与发布记录

@doist/outline-cli 共发布 57 个版本,首次发布于 2026/03/25;过去 12 个月发布了 57 个版本。

版本发布日期距今
2.6.0latest2026/11/112 天前
2.5.42026/11/112 天前
2.5.32026/11/112 天前
2.5.22026/11/112 天前
2.5.12026/11/094 天前
2.5.02026/11/076 天前

关于 @doist/outline-cli 的常见问题

@doist/outline-cli 是什么?

维基语录/知识基础 API注意:该包已被作者标记为弃用——Moved to @todoist/outline-cli. Run: npm uninstall -g @doist/outline-cli && npm install -g @todoist/outline-cli

如何安装 @doist/outline-cli?

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

@doist/outline-cli 支持 TypeScript 吗?

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

@doist/outline-cli 支持 ESM 还是 CommonJS?

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

@doist/outline-cli 需要什么版本的 Node.js?

package.json 的 engines 字段要求 Node.js >=24。版本不符时 npm 默认只给出警告,开启 engine-strict 后会拒绝安装。

@doist/outline-cli 可以商用吗?

@doist/outline-cli 使用 MIT 许可。宽松许可:允许商业使用、修改和再分发,通常只需在分发时保留原版权与许可声明。以上为概括,不构成法律意见,请以许可原文为准。

@doist/outline-cli 的下载量有多少?

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

@doist/outline-cli 还在维护吗?

最新版本 2.6.0 发布于 2026/11/11(2 天前);至今共发布 57 个版本,其中过去 12 个月发布了 57 个;首次发布于 2026/03/25。作者已将其标记为弃用,新项目建议寻找替代方案。