name: openclaw-nextcloud
description: 通过 CalDAV、WebDAV 和 Notes API 管理您的 Nextcloud 实例中的笔记、任务、日历、文件和联系人。可用于创建笔记、管理待办事项和日历事件、上传/下载文件以及管理联系人。
license: MIT
compatibility: 需要 Node.js 20+。需要网络访问 Nextcloud 实例。
allowed-tools: Bash Read
此技能提供与 Nextcloud 实例的集成。支持访问笔记、任务(待办事项)、日历、文件和联系人。
此技能需要以下环境变量:
NEXTCLOUD_URL: 您的 Nextcloud 实例的基础 URL(例如 https://cloud.example.com)。NEXTCLOUD_USER: 您的 Nextcloud 用户名。NEXTCLOUD_TOKEN: 应用密码(推荐)或您的登录密码。index.php/apps/notes/api/v1/notes通过捆绑的脚本运行此技能。
node scripts/nextcloud.js <命令> <子命令> [选项]
notes listnotes get --id <id>notes create --title <标题> --content <内容> [--category <分类>]notes edit --id <id> [--title <标题>] [--content <内容>] [--category <分类>]notes delete --id <id>tasks list [--calendar <日历>]tasks create --title <标题> [--calendar <日历>] [--due <截止时间>] [--priority <优先级>] [--description <描述>]tasks edit --uid <uid> [--calendar <日历>] [--title <标题>] [--due <截止时间>] [--priority <优先级>] [--description <描述>]tasks delete --uid <uid> [--calendar <日历>]tasks complete --uid <uid> [--calendar <日历>]calendar list [--from <起始ISO时间>] [--to <结束ISO时间>](默认显示未来7天)calendar create --summary <摘要> --start <起始ISO时间> --end <结束ISO时间> [--calendar <日历>] [--description <描述>]calendar edit --uid <uid> [--calendar <日历>] [--summary <摘要>] [--start <起始ISO时间>] [--end <结束ISO时间>] [--description <描述>]calendar delete --uid <uid> [--calendar <日历>]calendars list [--type <tasks|events>]files list [--path <路径>]files search --query <查询词>files get --path <路径>(下载文件内容)files upload --path <路径> --content <内容>files delete --path <路径>contacts list [--addressbook <通讯录>]contacts get --uid <uid> [--addressbook <通讯录>]contacts search --query <查询词> [--addressbook <通讯录>]contacts create --name <姓名> [--addressbook <通讯录>] [--email <邮箱>] [--phone <电话>] [--organization <组织>] [--title <职位>] [--note <备注>]contacts edit --uid <uid> [--addressbook <通讯录>] [--name <姓名>] [--email <邮箱>] [--phone <电话>] [--organization <组织>] [--title <职位>] [--note <备注>]contacts delete --uid <uid> [--addressbook <通讯录>]addressbooks list所有输出均为 JSON 格式。
{
"status": "success",
"data": [
{
"uid": "unique-task-id",
"calendar": "Calendar Name",
"summary": "Task title",
"status": "NEEDS-ACTION",
"due": "20260201T153000Z",
"priority": 0
}
]
}
due: CalDAV 格式日期 (YYYYMMDDTHHmmssZ) 或 nullpriority: 0-9 (0 = 未定义, 1 = 最高, 9 = 最低) 或 null{
"status": "success",
"data": [
{
"uid": "unique-event-id",
"calendar": "Calendar Name",
"summary": "Event title",
"start": "20260205T100000Z",
"end": "20260205T110000Z"
}
]
}
{
"status": "success",
"data": [
{
"uid": "unique-contact-id",
"addressBook": "Address Book Name",
"fullName": "John Doe",
"name": "Doe;John;;;",
"phones": ["+1234567890"],
"emails": ["john@example.com"],
"organization": "ACME Inc",
"title": "Developer",
"note": "Met at conference"
}
]
}
phones: 电话号码数组或 nullemails: 邮箱地址数组或 nullname: vCard 格式的结构化姓名 (Last;First;Middle;Prefix;Suffix){
"status": "success",
"data": [ ... ]
}
或
{
"status": "error",
"message": "Error description"
}
当创建任务或日历事件时,如果用户未指定日历:
首次(未设置默认值):
calendars list --type tasks(针对任务)或 calendars list --type events(针对事件)如果用户设置了默认值:
default_task_calendar 和/或 default_event_calendar如果用户拒绝设置默认值:
用户始终可以覆盖:
--calendar 始终优先于默认值default_task_calendar: 任务的默认日历名称 (VTODO)default_event_calendar: 事件的默认日历名称 (VEVENT)当创建联系人时,如果用户未指定通讯录:
首次(未设置默认值):
addressbooks list如果用户设置了默认值:
default_addressbook如果用户拒绝设置默认值:
用户始终可以覆盖:
--addressbook 始终优先于默认值default_addressbook: 联系人的默认通讯录名称向用户展示数据时,请以可读的方式格式化。输出可能会发送到不支持 Markdown 渲染的消息平台(如 Telegram、WhatsApp 等),因此请避免使用 Markdown 格式。
代码、表格或带 - 或 * 的列表)任务: ✅ (已完成), ⬜ (待处理), 🔴 (高优先级), 🟡 (中), 🟢 (低)
日历: 📅 (事件), ⏰ (时间), 📍 (地点)
笔记: 📝 (笔记), 📁 (分类)
文件: 📄 (文件), 📂 (文件夹), 💾 (大小)
联系人: 👤 (人员), 📧 (邮箱), 📱 (电话), 🏢 (组织)
状态: ✨ (已创建), ✏️ (已更新), 🗑️ (已删除), ❌ (错误)
任务:
📋 您的任务
⬜ 🔴 购买杂货 — 截止:明天 下午 3:30
⬜ 🟡 审查 PR #42 — 截止:2月5日
✅ 发送邮件给客户
日历事件:
📅 即将发生的事件
🗓️ 团队站会
⏰ 周一,2月3日 • 上午 10:00 - 上午 10:30
📍 Zoom
🗓️ 项目评审
⏰ 周三,2月5日 • 下午 2:00 - 下午 3:00
联系人:
👤 张三
📧 zhangsan@example.com
📱 +86 138 0013 8000
🏢 某公司 — 开发工程师
文件:
📂 文档/
📄 报告.pdf (2.3 MB)
📄 笔记.txt (4 KB)
📂 归档/
将 CalDAV 格式 20260205T100000Z 转换为可读格式,如 周三,2月5日 • 上午 10:00
在有用时显示相对日期:"明天"、"下周一"、"3天后"
尽可能使用用户的本地时区