pma-mem
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseMemos
Memos
Operate Memos by sending HTTP requests to (default ).
Authenticate with a Personal Access Token stored in .
$MEMOS_URLhttp://memos:5230$MEMOS_TOKENKeep this entry file small. Load only the references needed for the current turn.
通过向(默认值为)发送HTTP请求来操作Memos。使用存储在中的个人访问令牌进行身份验证。
$MEMOS_URLhttp://memos:5230$MEMOS_TOKEN请保持此入口文件精简,仅加载当前会话所需的参考文档。
Always-On Rules
通用规则
- Confirm and
$MEMOS_URLbefore making any request. If missing, ask the user for them.$MEMOS_TOKEN - Prefer piped to
curl -sso results are easy to inspect.jq - All authenticated requests must include .
-H "Authorization: Bearer $MEMOS_TOKEN" - API base path is . There is no v2 API.
/api/v1/ - PATCH requests use as a query parameter, not in the body.
updateMask - Resource names follow format (e.g.
{collection}/{id},memos/abc123).users/roy - Pagination uses +
pageSize/pageToken.nextPageToken - Error responses are gRPC-style: .
{"code": N, "message": "...", "details": []} - Memo visibility values: ,
PRIVATE(logged-in users),PROTECTED.PUBLIC - Memo state values: ,
NORMAL.ARCHIVED
- 发送任何请求前先确认和
$MEMOS_URL已配置,若缺失请向用户索要。$MEMOS_TOKEN - 优先使用管道传值给
curl -s,方便查看返回结果。jq - 所有需要身份验证的请求都必须携带请求头。
-H "Authorization: Bearer $MEMOS_TOKEN" - API基础路径为,目前没有v2版本API。
/api/v1/ - PATCH请求将作为查询参数传递,不要放在请求体中。
updateMask - 资源名称遵循格式(例如
{集合名}/{id}、memos/abc123)。users/roy - 分页使用+
pageSize/pageToken参数实现。nextPageToken - 错误响应为gRPC风格:。
{"code": N, "message": "...", "details": []} - 备忘录可见性取值:、
PRIVATE(仅登录用户可见)、PROTECTED(公开)。PUBLIC - 备忘录状态取值:(正常)、
NORMAL(已归档)。ARCHIVED
Quick Start
快速入门
bash
undefinedbash
undefinedHealth check (no auth needed)
Health check (no auth needed)
curl -s "$MEMOS_URL/api/v1/instance/profile" | jq
curl -s "$MEMOS_URL/api/v1/instance/profile" | jq
List memos
List memos
curl -s -H "Authorization: Bearer $MEMOS_TOKEN"
"$MEMOS_URL/api/v1/memos?pageSize=10" | jq
"$MEMOS_URL/api/v1/memos?pageSize=10" | jq
curl -s -H "Authorization: Bearer $MEMOS_TOKEN"
"$MEMOS_URL/api/v1/memos?pageSize=10" | jq
"$MEMOS_URL/api/v1/memos?pageSize=10" | jq
Create memo
Create memo
curl -s -X POST -H "Authorization: Bearer $MEMOS_TOKEN"
-H 'Content-Type: application/json'
"$MEMOS_URL/api/v1/memos"
-d '{"content":"Hello from CLI","visibility":"PRIVATE"}' | jq
-H 'Content-Type: application/json'
"$MEMOS_URL/api/v1/memos"
-d '{"content":"Hello from CLI","visibility":"PRIVATE"}' | jq
curl -s -X POST -H "Authorization: Bearer $MEMOS_TOKEN"
-H 'Content-Type: application/json'
"$MEMOS_URL/api/v1/memos"
-d '{"content":"Hello from CLI","visibility":"PRIVATE"}' | jq
-H 'Content-Type: application/json'
"$MEMOS_URL/api/v1/memos"
-d '{"content":"Hello from CLI","visibility":"PRIVATE"}' | jq
Search memos by content filter
Search memos by content filter
curl -s -H "Authorization: Bearer $MEMOS_TOKEN"
"$MEMOS_URL/api/v1/memos?filter=content.contains("keyword")" | jq
"$MEMOS_URL/api/v1/memos?filter=content.contains("keyword")" | jq
curl -s -H "Authorization: Bearer $MEMOS_TOKEN"
"$MEMOS_URL/api/v1/memos?filter=content.contains("keyword")" | jq
"$MEMOS_URL/api/v1/memos?filter=content.contains("keyword")" | jq
Update memo content
Update memo content
curl -s -X PATCH -H "Authorization: Bearer $MEMOS_TOKEN"
-H 'Content-Type: application/json'
"$MEMOS_URL/api/v1/memos/{uid}?updateMask=content"
-d '{"content":"Updated content"}' | jq
-H 'Content-Type: application/json'
"$MEMOS_URL/api/v1/memos/{uid}?updateMask=content"
-d '{"content":"Updated content"}' | jq
curl -s -X PATCH -H "Authorization: Bearer $MEMOS_TOKEN"
-H 'Content-Type: application/json'
"$MEMOS_URL/api/v1/memos/{uid}?updateMask=content"
-d '{"content":"Updated content"}' | jq
-H 'Content-Type: application/json'
"$MEMOS_URL/api/v1/memos/{uid}?updateMask=content"
-d '{"content":"Updated content"}' | jq
Delete memo
Delete memo
curl -s -X DELETE -H "Authorization: Bearer $MEMOS_TOKEN"
"$MEMOS_URL/api/v1/memos/{uid}" | jq
"$MEMOS_URL/api/v1/memos/{uid}" | jq
curl -s -X DELETE -H "Authorization: Bearer $MEMOS_TOKEN"
"$MEMOS_URL/api/v1/memos/{uid}" | jq
"$MEMOS_URL/api/v1/memos/{uid}" | jq
Archive memo
Archive memo
curl -s -X PATCH -H "Authorization: Bearer $MEMOS_TOKEN"
-H 'Content-Type: application/json'
"$MEMOS_URL/api/v1/memos/{uid}?updateMask=state"
-d '{"state":"ARCHIVED"}' | jq
-H 'Content-Type: application/json'
"$MEMOS_URL/api/v1/memos/{uid}?updateMask=state"
-d '{"state":"ARCHIVED"}' | jq
undefinedcurl -s -X PATCH -H "Authorization: Bearer $MEMOS_TOKEN"
-H 'Content-Type: application/json'
"$MEMOS_URL/api/v1/memos/{uid}?updateMask=state"
-d '{"state":"ARCHIVED"}' | jq
-H 'Content-Type: application/json'
"$MEMOS_URL/api/v1/memos/{uid}?updateMask=state"
-d '{"state":"ARCHIVED"}' | jq
undefinedReference Packs
参考文档包
Load only what the current task needs:
- Full API endpoint reference: MemoService, UserService, AttachmentService, InstanceService, AuthService, ShortcutService.
references/rest-api.md - Common workflows: bulk operations, tag management, memo relations, comments, reactions, search patterns, and attachment handling.
references/workflows.md
仅加载当前任务所需的内容:
- 完整API端点参考:MemoService、UserService、AttachmentService、InstanceService、AuthService、ShortcutService。
references/rest-api.md - 常用工作流:批量操作、标签管理、备忘录关联、评论、反应、搜索模式及附件处理。
references/workflows.md
Quick Routing
快速指引
Choose references by intent:
- Single memo CRUD or API details: load .
references/rest-api.md - Bulk operations, search, tag workflows, or attachments: load .
references/workflows.md - Full understanding of all endpoints: load both.
根据用户意图选择参考文档:
- 单条备忘录CRUD或API详情:加载。
references/rest-api.md - 批量操作、搜索、标签工作流或附件处理:加载。
references/workflows.md - 如需完整了解所有端点:同时加载两份文档。