memory
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseMemory - Persistent Knowledge Storage
Memory - 持久化知识存储
Store and retrieve knowledge across sessions using semantic search.
通过语义搜索跨会话存储和检索知识。
Prerequisites
前置要求
Install basic-memory:
bash
pip install basic-memory安装basic-memory:
bash
pip install basic-memoryCLI Reference
CLI参考
Write a Note
撰写笔记
bash
undefinedbash
undefinedBasic note
基础笔记
basic-memory tool write-note --title "Note Title" --content "Note content in markdown"
basic-memory tool write-note --title "Note Title" --content "Note content in markdown"
With tags
带标签
basic-memory tool write-note --title "React Patterns" --content "# Content here" --tags "react,patterns,frontend"
basic-memory tool write-note --title "React Patterns" --content "# Content here" --tags "react,patterns,frontend"
To specific folder
保存到指定文件夹
basic-memory tool write-note --title "Meeting Notes" --content "# Notes" --folder "meetings"
basic-memory tool write-note --title "Meeting Notes" --content "# Notes" --folder "meetings"
With specific project
关联指定项目
basic-memory tool write-note --title "Project Notes" --content "# Notes" --project myproject
undefinedbasic-memory tool write-note --title "Project Notes" --content "# Notes" --project myproject
undefinedRead a Note
读取笔记
bash
undefinedbash
undefinedBy identifier/permalink
通过标识符/永久链接
basic-memory tool read-note "note-title"
basic-memory tool read-note "note-title"
From specific project
从指定项目读取
basic-memory tool read-note "note-title" --project myproject
undefinedbasic-memory tool read-note "note-title" --project myproject
undefinedSearch Memories
搜索记忆内容
bash
undefinedbash
undefinedSemantic search (query is positional)
语义搜索(查询词为位置参数)
basic-memory tool search-notes "your search query"
basic-memory tool search-notes "your search query"
Limit results
限制结果数量
basic-memory tool search-notes "react hooks" --page-size 10
basic-memory tool search-notes "react hooks" --page-size 10
Search by permalink
通过永久链接搜索
basic-memory tool search-notes "pattern" --permalink
basic-memory tool search-notes "pattern" --permalink
Search by title
通过标题搜索
basic-memory tool search-notes "meeting" --title
basic-memory tool search-notes "meeting" --title
Filter by date
按日期过滤
basic-memory tool search-notes "feature" --after_date "7d"
basic-memory tool search-notes "feature" --after_date "7d"
With specific project
关联指定项目搜索
basic-memory tool search-notes "authentication" --project myproject
undefinedbasic-memory tool search-notes "authentication" --project myproject
undefinedBuild Context for a Topic
为主题构建上下文
bash
undefinedbash
undefinedGet related notes for a URL/topic (URL is positional)
获取URL/主题的相关笔记(URL为位置参数)
basic-memory tool build-context "memory://topic/authentication"
basic-memory tool build-context "memory://topic/authentication"
With depth and timeframe
指定深度和时间范围
basic-memory tool build-context "memory://note/my-note" --depth 2 --timeframe 30d
basic-memory tool build-context "memory://note/my-note" --depth 2 --timeframe 30d
With specific project
关联指定项目
basic-memory tool build-context "memory://topic/api" --project myproject
undefinedbasic-memory tool build-context "memory://topic/api" --project myproject
undefinedList Recent Activity
查看近期活动
bash
undefinedbash
undefinedDefault (depth 1, 7 days)
默认设置(深度1,7天)
basic-memory tool recent-activity
basic-memory tool recent-activity
With depth
指定深度
basic-memory tool recent-activity --depth 3
basic-memory tool recent-activity --depth 3
With timeframe
指定时间范围
basic-memory tool recent-activity --timeframe 30d
basic-memory tool recent-activity --timeframe 30d
Combined
组合设置
basic-memory tool recent-activity --depth 3 --timeframe 14d
undefinedbasic-memory tool recent-activity --depth 3 --timeframe 14d
undefinedContinue Conversation
继续对话
bash
undefinedbash
undefinedGet prompt to continue previous work
获取用于延续之前工作的提示
basic-memory tool continue-conversation "previous topic or context"
undefinedbasic-memory tool continue-conversation "previous topic or context"
undefinedSync Database
同步数据库
bash
basic-memory syncbash
basic-memory syncCheck Status
检查状态
bash
basic-memory statusbash
basic-memory statusNote Format
笔记格式
Notes are stored as markdown with YAML frontmatter:
markdown
---
title: My Note
tags: [tag1, tag2]
created: 2024-01-15
---笔记以带YAML前置元数据的markdown格式存储:
markdown
---
title: My Note
tags: [tag1, tag2]
created: 2024-01-15
---My Note
My Note
Content here in markdown format.
Content here in markdown format.
Sections
Sections
More content...
undefinedMore content...
undefinedWorkflow Patterns
工作流模式
Save Learning
保存学习内容
When you discover something useful:
bash
basic-memory tool write-note \
--title "TypeScript Utility Types" \
--content "# Utility Types\n\n- Partial<T> - Makes all properties optional\n- Required<T> - Makes all properties required\n- Pick<T, K> - Picks specific properties" \
--tags "typescript,types,reference"当你发现有用的内容时:
bash
basic-memory tool write-note \
--title "TypeScript Utility Types" \
--content "# 工具类型\n\n- Partial<T> - 将所有属性设为可选\n- Required<T> - 将所有属性设为必填\n- Pick<T, K> - 选择特定属性" \
--tags "typescript,types,reference"Save Decision
保存决策记录
When making an architectural decision:
bash
basic-memory tool write-note \
--title "Auth Strategy Decision" \
--content "# Decision: Use JWT for API auth\n\n## Context\n...\n\n## Decision\n...\n\n## Consequences\n..." \
--tags "architecture,auth,decision" \
--folder "decisions"当做出架构决策时:
bash
basic-memory tool write-note \
--title "Auth Strategy Decision" \
--content "# 决策:为API使用JWT认证\n\n## 背景\n...\n\n## 决策\n...\n\n## 影响\n..." \
--tags "architecture,auth,decision" \
--folder "decisions"Retrieve Context
检索上下文
Before starting related work:
bash
undefined在开始相关工作前:
bash
undefinedSearch for relevant notes
搜索相关笔记
basic-memory tool search-notes "authentication jwt tokens"
basic-memory tool search-notes "authentication jwt tokens"
Or build comprehensive context
或构建全面的上下文
basic-memory tool build-context "memory://topic/api-authentication"
undefinedbasic-memory tool build-context "memory://topic/api-authentication"
undefinedReview Recent Work
回顾近期工作
bash
basic-memory tool recent-activity --depth 5 --timeframe 7dbash
basic-memory tool recent-activity --depth 5 --timeframe 7dUse Cases
使用场景
Personal Wiki
个人知识库
- Store code snippets and patterns
- Document project decisions
- Keep reference material
- 存储代码片段和模式
- 记录项目决策
- 保存参考资料
Learning Log
学习日志
- Record things you learn
- Tag by topic for later retrieval
- Build knowledge over time
- 记录所学内容
- 按主题打标签以便后续检索
- 逐步积累知识
Project Context
项目上下文
- Save project-specific knowledge
- Retrieve relevant context at session start
- Share knowledge across sessions
- 保存项目专属知识
- 在会话开始时检索相关上下文
- 跨会话共享知识
Best Practices
最佳实践
- Use meaningful titles - They become permalinks
- Add tags - Improves search and organization
- Use markdown - Full markdown support in content
- Organize with folders - Group related notes
- Search before writing - Check if knowledge already exists
- Keep notes focused - One topic per note
- Update, don't duplicate - Revise existing notes
- 使用有意义的标题 - 标题会成为永久链接
- 添加标签 - 提升搜索和组织效率
- 使用markdown - 内容支持完整的markdown语法
- 用文件夹组织 - 分组相关笔记
- 先搜索再撰写 - 检查知识是否已存在
- 保持笔记聚焦 - 每个笔记对应一个主题
- 更新而非重复 - 修改现有笔记而非创建重复内容
Integration Pattern
集成模式
Session Start
会话开始
bash
undefinedbash
undefinedGet context for today's work
获取今日工作的上下文
basic-memory tool build-context "memory://topic/feature-youre-building"
undefinedbasic-memory tool build-context "memory://topic/feature-youre-building"
undefinedDuring Work
工作过程中
bash
undefinedbash
undefinedSave discoveries
保存新发现
basic-memory tool write-note --title "Discovery Title" --content "What I learned"
undefinedbasic-memory tool write-note --title "发现标题" --content "我学到的内容"
undefinedSession End
会话结束
bash
undefinedbash
undefinedSync to ensure persistence
同步以确保持久化
basic-memory sync
undefinedbasic-memory sync
undefined