outline
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseOutline 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
配置步骤
-
Get your API key from your Outline wiki:
- Go to Settings > API Tokens
- Create a new token with appropriate permissions
-
Configure the environment:bash
cp .env.example .env # Edit .env with your API key -
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
-
从你的Outline wiki获取API密钥:
- 前往设置 > API令牌
- 创建一个具有合适权限的新令牌
-
配置环境:bash
cp .env.example .env # 编辑.env文件,填入你的API密钥 -
设置环境变量: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> --jsonbash
python3 scripts/outline.py read <document-id>
python3 scripts/outline.py read <document-id> --jsonList collections
列出集合
bash
python3 scripts/outline.py list-collections
python3 scripts/outline.py list-collections --limit 50bash
python3 scripts/outline.py list-collections
python3 scripts/outline.py list-collections --limit 50List 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> --draftbash
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> --draftUpdate 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> --publishbash
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> --publishExport document as markdown
将文档导出为markdown格式
bash
python3 scripts/outline.py export <document-id>
python3 scripts/outline.py export <document-id> --output doc.mdbash
python3 scripts/outline.py export <document-id>
python3 scripts/outline.py export <document-id> --output doc.mdTest authentication
测试身份验证
bash
python3 scripts/outline.py auth-infobash
python3 scripts/outline.py auth-infoJSON Output
JSON输出
Add flag to any command for machine-readable output:
--jsonbash
python3 scripts/outline.py search "query" --json
python3 scripts/outline.py read <id> --json在任意命令后添加标志即可获得机器可读的输出:
--jsonbash
python3 scripts/outline.py search "query" --json
python3 scripts/outline.py read <id> --jsonOperations Reference
操作参考
| Command | Description | Required Args |
|---|---|---|
| search | Full-text search | query |
| read | Get document content | document_id |
| list-collections | List all collections | - |
| list-documents | List docs (optionally in collection) | - |
| get-collection | Get collection details | collection_id |
| create | Create new document | --title, --collection-id |
| update | Update existing document | document_id |
| export | Export as markdown | document_id |
| auth-info | Test 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
环境变量
| Variable | Required | Default | Description |
|---|---|---|---|
| OUTLINE_API_KEY | Yes | - | Your Outline API token |
| OUTLINE_API_URL | No | https://app.getoutline.com/api | API URL |
| OUTLINE_TIMEOUT | No | 30 | Request timeout (seconds) |
| 变量名 | 是否必填 | 默认值 | 描述 |
|---|---|---|---|
| OUTLINE_API_KEY | 是 | - | 你的Outline API令牌 |
| OUTLINE_API_URL | 否 | https://app.getoutline.com/api | API地址 |
| OUTLINE_TIMEOUT | 否 | 30 | 请求超时时间(秒) |
Troubleshooting
故障排除
| Error | Solution |
|---|---|
| API key not configured | Set OUTLINE_API_KEY environment variable |
| Authentication failed | Verify API key is valid and not expired |
| Connection timeout | Check OUTLINE_API_URL and network connectivity |
| Document not found | Verify document ID is correct |
| Permission denied | Check 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
工作流程
- Run to verify connection
auth-info - Run to see available collections
list-collections - Run or
searchto find contentlist-documents - Run to get full document content
read - Use /
createto modify wiki contentupdate
- 运行验证连接
auth-info - 运行查看可用集合
list-collections - 运行或
search查找内容list-documents - 运行获取完整文档内容
read - 使用/
create修改wiki内容update