@doist/outline-cli

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

CLI for the Outline wiki/knowledge base API

此软件包已被标记为弃用

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

原始使用文档
文档目录11 节
  1. Installation
  2. Agent Skills
  3. Uninstallation
  4. Local Setup
  5. Setup
  6. OAuth login (recommended)
  7. Manual token login
  8. Configuration
  9. Commands
  10. Output modes
  11. Development

Outline CLI

CLI for the Outline wiki/knowledge base API.

Installation

Requires Node 24+.

npm install -g @doist/outline-cli

Agent Skills

Install skills for your coding agent:

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

Skills are installed to ~/<agent-dir>/skills/outline-cli/SKILL.md (e.g. ~/.claude/ for claude-code, ~/.agents/ for universal, etc.). When updating the CLI, installed skills are updated automatically. The universal agent is compatible with Amp, OpenCode, and other agents that read from ~/.agents/.

ol skill list
ol skill uninstall <agent>

Uninstallation

First, remove any installed agent skills:

ol skill uninstall <agent>

Then uninstall the CLI:

npm uninstall -g @doist/outline-cli

Local Setup

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

Setup

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

Setup:

  1. Create a public OAuth app in Outline (Settings → Applications)
  2. Set the redirect URI to http://localhost:54969/callback
  3. Run ol auth login and enter your OAuth client ID when prompted (or pass it directly with --client-id <your-client-id>)
  4. If needed, pass --base-url <your-outline-url> or set OUTLINE_URL (for self-hosted instances or non-default URLs)
  5. If needed, pass --callback-port <port> or set OUTLINE_OAUTH_CALLBACK_PORT and register http://localhost:<port>/callback in your OAuth app

The client ID is saved for future logins. You can also set OUTLINE_OAUTH_CLIENT_ID for your local environment.

Manual token login

If you prefer using an API token directly:

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)

Generate a token in Outline under Settings → API Tokens. Pass --base-url <your-outline-url> if the token belongs to a self-hosted instance.

You can also skip storing a token entirely by setting OUTLINE_API_TOKEN in your environment.

Configuration

Token resolution: OUTLINE_API_TOKEN env var → ~/.config/outline-cli/config.json.

Base URL resolution: OUTLINE_URL env var → config file → https://app.getoutline.com.

Callback port resolution for OAuth login: --callback-port → OUTLINE_OAUTH_CALLBACK_PORT → 54969.

Self-hosted instances: pass --base-url or set OUTLINE_URL (you can still provide it interactively).

Commands

# 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

Output modes

All commands support:

  • Default: colored human-readable output
  • --json: pretty-printed JSON (essential fields)
  • --json --full: all fields
  • --ndjson: one JSON object per line (for piping)

Development

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 是什么?

CLI for the Outline wiki/knowledge base 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。作者已将其标记为弃用,新项目建议寻找替代方案。