outline

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Outline Wiki Skill

Outline Wiki Skill

Search, read, create, and manage documents in any Outline wiki instance. Works with all AI clients supporting the Agent Skills Standard.
在任意Outline wiki实例中搜索、阅读、创建和管理文档。支持所有兼容Agent Skills Standard的AI客户端。

Requirements

要求

  • Python 3.8+
  • Dependencies:
    pip install -r requirements.txt
  • Python 3.8及以上版本
  • 依赖安装:
    pip install -r requirements.txt

Setup

配置步骤

  1. Get your API key from your Outline wiki:
    • Go to Settings > API Tokens
    • Create a new token with appropriate permissions
  2. Configure the environment:
    bash
    cp .env.example .env
    # Edit .env with your API key
  3. Set the environment variables:
    bash
    export OUTLINE_API_KEY=your-api-key-here
    # Optional: for self-hosted instances
    export OUTLINE_API_URL=https://your-wiki.example.com/api
  1. 从你的Outline wiki获取API密钥:
    • 前往设置 > API令牌
    • 创建一个具有合适权限的新令牌
  2. 配置环境:
    bash
    cp .env.example .env
    # 编辑.env文件,填入你的API密钥
  3. 设置环境变量:
    bash
    export OUTLINE_API_KEY=your-api-key-here
    # 可选:针对自托管实例
    export OUTLINE_API_URL=https://your-wiki.example.com/api

Usage

使用方法

Search documents

搜索文档

bash
python3 scripts/outline.py search "deployment guide"
python3 scripts/outline.py search "API documentation" --limit 10
python3 scripts/outline.py search "onboarding" --collection-id <id>
bash
python3 scripts/outline.py search "deployment guide"
python3 scripts/outline.py search "API documentation" --limit 10
python3 scripts/outline.py search "onboarding" --collection-id <id>

Read a document

阅读文档

bash
python3 scripts/outline.py read <document-id>
python3 scripts/outline.py read <document-id> --json
bash
python3 scripts/outline.py read <document-id>
python3 scripts/outline.py read <document-id> --json

List collections

列出集合

bash
python3 scripts/outline.py list-collections
python3 scripts/outline.py list-collections --limit 50
bash
python3 scripts/outline.py list-collections
python3 scripts/outline.py list-collections --limit 50

List documents in a collection

列出集合中的文档

bash
python3 scripts/outline.py list-documents --collection-id <id>
bash
python3 scripts/outline.py list-documents --collection-id <id>

Get collection details

获取集合详情

bash
python3 scripts/outline.py get-collection <collection-id>
bash
python3 scripts/outline.py get-collection <collection-id>

Create a document

创建文档

bash
python3 scripts/outline.py create --title "New Guide" --collection-id <id>
python3 scripts/outline.py create --title "Guide" --collection-id <id> --text "# Content here"
python3 scripts/outline.py create --title "Draft" --collection-id <id> --draft
bash
python3 scripts/outline.py create --title "New Guide" --collection-id <id>
python3 scripts/outline.py create --title "Guide" --collection-id <id> --text "# Content here"
python3 scripts/outline.py create --title "Draft" --collection-id <id> --draft

Update a document

更新文档

bash
python3 scripts/outline.py update <document-id> --title "Updated Title"
python3 scripts/outline.py update <document-id> --text "New content"
python3 scripts/outline.py update <document-id> --publish
bash
python3 scripts/outline.py update <document-id> --title "Updated Title"
python3 scripts/outline.py update <document-id> --text "New content"
python3 scripts/outline.py update <document-id> --publish

Export document as markdown

将文档导出为markdown格式

bash
python3 scripts/outline.py export <document-id>
python3 scripts/outline.py export <document-id> --output doc.md
bash
python3 scripts/outline.py export <document-id>
python3 scripts/outline.py export <document-id> --output doc.md

Test authentication

测试身份验证

bash
python3 scripts/outline.py auth-info
bash
python3 scripts/outline.py auth-info

JSON Output

JSON输出

Add
--json
flag to any command for machine-readable output:
bash
python3 scripts/outline.py search "query" --json
python3 scripts/outline.py read <id> --json
在任意命令后添加
--json
标志即可获得机器可读的输出:
bash
python3 scripts/outline.py search "query" --json
python3 scripts/outline.py read <id> --json

Operations Reference

操作参考

CommandDescriptionRequired Args
searchFull-text searchquery
readGet document contentdocument_id
list-collectionsList all collections-
list-documentsList docs (optionally in collection)-
get-collectionGet collection detailscollection_id
createCreate new document--title, --collection-id
updateUpdate existing documentdocument_id
exportExport as markdowndocument_id
auth-infoTest API connection-
命令描述必填参数
search全文搜索query
read获取文档内容document_id
list-collections列出所有集合-
list-documents列出文档(可指定集合)-
get-collection获取集合详情collection_id
create创建新文档--title, --collection-id
update更新现有文档document_id
export导出为markdown格式document_id
auth-info测试API连接-

Environment Variables

环境变量

VariableRequiredDefaultDescription
OUTLINE_API_KEYYes-Your Outline API token
OUTLINE_API_URLNohttps://app.getoutline.com/apiAPI URL
OUTLINE_TIMEOUTNo30Request timeout (seconds)
变量名是否必填默认值描述
OUTLINE_API_KEY-你的Outline API令牌
OUTLINE_API_URLhttps://app.getoutline.com/apiAPI地址
OUTLINE_TIMEOUT30请求超时时间(秒)

Troubleshooting

故障排除

ErrorSolution
API key not configuredSet OUTLINE_API_KEY environment variable
Authentication failedVerify API key is valid and not expired
Connection timeoutCheck OUTLINE_API_URL and network connectivity
Document not foundVerify document ID is correct
Permission deniedCheck API token has required permissions
错误解决方法
API密钥未配置设置OUTLINE_API_KEY环境变量
身份验证失败验证API密钥是否有效且未过期
连接超时检查OUTLINE_API_URL和网络连接
文档未找到验证文档ID是否正确
权限不足检查API令牌是否拥有所需权限

Exit Codes

退出码

  • 0: Success
  • 1: Error (auth failed, not found, invalid request)
  • 0:成功
  • 1:错误(身份验证失败、未找到资源、无效请求)

Workflow

工作流程

  1. Run
    auth-info
    to verify connection
  2. Run
    list-collections
    to see available collections
  3. Run
    search
    or
    list-documents
    to find content
  4. Run
    read
    to get full document content
  5. Use
    create
    /
    update
    to modify wiki content
  1. 运行
    auth-info
    验证连接
  2. 运行
    list-collections
    查看可用集合
  3. 运行
    search
    list-documents
    查找内容
  4. 运行
    read
    获取完整文档内容
  5. 使用
    create
    /
    update
    修改wiki内容