basic-memory 0.7.0__py3-none-any.whl → 0.17.4__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of basic-memory might be problematic. Click here for more details.
- basic_memory/__init__.py +5 -1
- basic_memory/alembic/alembic.ini +119 -0
- basic_memory/alembic/env.py +130 -20
- basic_memory/alembic/migrations.py +4 -9
- basic_memory/alembic/versions/314f1ea54dc4_add_postgres_full_text_search_support_.py +131 -0
- basic_memory/alembic/versions/502b60eaa905_remove_required_from_entity_permalink.py +51 -0
- basic_memory/alembic/versions/5fe1ab1ccebe_add_projects_table.py +120 -0
- basic_memory/alembic/versions/647e7a75e2cd_project_constraint_fix.py +112 -0
- basic_memory/alembic/versions/6830751f5fb6_merge_multiple_heads.py +24 -0
- basic_memory/alembic/versions/9d9c1cb7d8f5_add_mtime_and_size_columns_to_entity_.py +49 -0
- basic_memory/alembic/versions/a1b2c3d4e5f6_fix_project_foreign_keys.py +49 -0
- basic_memory/alembic/versions/a2b3c4d5e6f7_add_search_index_entity_cascade.py +56 -0
- basic_memory/alembic/versions/b3c3938bacdb_relation_to_name_unique_index.py +44 -0
- basic_memory/alembic/versions/cc7172b46608_update_search_index_schema.py +113 -0
- basic_memory/alembic/versions/e7e1f4367280_add_scan_watermark_tracking_to_project.py +37 -0
- basic_memory/alembic/versions/f8a9b2c3d4e5_add_pg_trgm_for_fuzzy_link_resolution.py +239 -0
- basic_memory/alembic/versions/g9a0b3c4d5e6_add_external_id_to_project_and_entity.py +173 -0
- basic_memory/api/app.py +87 -20
- basic_memory/api/container.py +133 -0
- basic_memory/api/routers/__init__.py +4 -1
- basic_memory/api/routers/directory_router.py +84 -0
- basic_memory/api/routers/importer_router.py +152 -0
- basic_memory/api/routers/knowledge_router.py +180 -23
- basic_memory/api/routers/management_router.py +80 -0
- basic_memory/api/routers/memory_router.py +9 -64
- basic_memory/api/routers/project_router.py +460 -0
- basic_memory/api/routers/prompt_router.py +260 -0
- basic_memory/api/routers/resource_router.py +136 -11
- basic_memory/api/routers/search_router.py +5 -5
- basic_memory/api/routers/utils.py +169 -0
- basic_memory/api/template_loader.py +292 -0
- basic_memory/api/v2/__init__.py +35 -0
- basic_memory/api/v2/routers/__init__.py +21 -0
- basic_memory/api/v2/routers/directory_router.py +93 -0
- basic_memory/api/v2/routers/importer_router.py +181 -0
- basic_memory/api/v2/routers/knowledge_router.py +427 -0
- basic_memory/api/v2/routers/memory_router.py +130 -0
- basic_memory/api/v2/routers/project_router.py +359 -0
- basic_memory/api/v2/routers/prompt_router.py +269 -0
- basic_memory/api/v2/routers/resource_router.py +286 -0
- basic_memory/api/v2/routers/search_router.py +73 -0
- basic_memory/cli/app.py +80 -10
- basic_memory/cli/auth.py +300 -0
- basic_memory/cli/commands/__init__.py +15 -2
- basic_memory/cli/commands/cloud/__init__.py +6 -0
- basic_memory/cli/commands/cloud/api_client.py +127 -0
- basic_memory/cli/commands/cloud/bisync_commands.py +110 -0
- basic_memory/cli/commands/cloud/cloud_utils.py +108 -0
- basic_memory/cli/commands/cloud/core_commands.py +195 -0
- basic_memory/cli/commands/cloud/rclone_commands.py +397 -0
- basic_memory/cli/commands/cloud/rclone_config.py +110 -0
- basic_memory/cli/commands/cloud/rclone_installer.py +263 -0
- basic_memory/cli/commands/cloud/upload.py +240 -0
- basic_memory/cli/commands/cloud/upload_command.py +124 -0
- basic_memory/cli/commands/command_utils.py +99 -0
- basic_memory/cli/commands/db.py +87 -12
- basic_memory/cli/commands/format.py +198 -0
- basic_memory/cli/commands/import_chatgpt.py +47 -223
- basic_memory/cli/commands/import_claude_conversations.py +48 -171
- basic_memory/cli/commands/import_claude_projects.py +53 -160
- basic_memory/cli/commands/import_memory_json.py +55 -111
- basic_memory/cli/commands/mcp.py +67 -11
- basic_memory/cli/commands/project.py +889 -0
- basic_memory/cli/commands/status.py +52 -34
- basic_memory/cli/commands/telemetry.py +81 -0
- basic_memory/cli/commands/tool.py +341 -0
- basic_memory/cli/container.py +84 -0
- basic_memory/cli/main.py +14 -6
- basic_memory/config.py +580 -26
- basic_memory/db.py +285 -28
- basic_memory/deps/__init__.py +293 -0
- basic_memory/deps/config.py +26 -0
- basic_memory/deps/db.py +56 -0
- basic_memory/deps/importers.py +200 -0
- basic_memory/deps/projects.py +238 -0
- basic_memory/deps/repositories.py +179 -0
- basic_memory/deps/services.py +480 -0
- basic_memory/deps.py +16 -185
- basic_memory/file_utils.py +318 -54
- basic_memory/ignore_utils.py +297 -0
- basic_memory/importers/__init__.py +27 -0
- basic_memory/importers/base.py +100 -0
- basic_memory/importers/chatgpt_importer.py +245 -0
- basic_memory/importers/claude_conversations_importer.py +192 -0
- basic_memory/importers/claude_projects_importer.py +184 -0
- basic_memory/importers/memory_json_importer.py +128 -0
- basic_memory/importers/utils.py +61 -0
- basic_memory/markdown/entity_parser.py +182 -23
- basic_memory/markdown/markdown_processor.py +70 -7
- basic_memory/markdown/plugins.py +43 -23
- basic_memory/markdown/schemas.py +1 -1
- basic_memory/markdown/utils.py +38 -14
- basic_memory/mcp/async_client.py +135 -4
- basic_memory/mcp/clients/__init__.py +28 -0
- basic_memory/mcp/clients/directory.py +70 -0
- basic_memory/mcp/clients/knowledge.py +176 -0
- basic_memory/mcp/clients/memory.py +120 -0
- basic_memory/mcp/clients/project.py +89 -0
- basic_memory/mcp/clients/resource.py +71 -0
- basic_memory/mcp/clients/search.py +65 -0
- basic_memory/mcp/container.py +110 -0
- basic_memory/mcp/project_context.py +155 -0
- basic_memory/mcp/prompts/__init__.py +19 -0
- basic_memory/mcp/prompts/ai_assistant_guide.py +70 -0
- basic_memory/mcp/prompts/continue_conversation.py +62 -0
- basic_memory/mcp/prompts/recent_activity.py +188 -0
- basic_memory/mcp/prompts/search.py +57 -0
- basic_memory/mcp/prompts/utils.py +162 -0
- basic_memory/mcp/resources/ai_assistant_guide.md +283 -0
- basic_memory/mcp/resources/project_info.py +71 -0
- basic_memory/mcp/server.py +61 -9
- basic_memory/mcp/tools/__init__.py +33 -21
- basic_memory/mcp/tools/build_context.py +120 -0
- basic_memory/mcp/tools/canvas.py +152 -0
- basic_memory/mcp/tools/chatgpt_tools.py +190 -0
- basic_memory/mcp/tools/delete_note.py +249 -0
- basic_memory/mcp/tools/edit_note.py +325 -0
- basic_memory/mcp/tools/list_directory.py +157 -0
- basic_memory/mcp/tools/move_note.py +549 -0
- basic_memory/mcp/tools/project_management.py +204 -0
- basic_memory/mcp/tools/read_content.py +281 -0
- basic_memory/mcp/tools/read_note.py +265 -0
- basic_memory/mcp/tools/recent_activity.py +528 -0
- basic_memory/mcp/tools/search.py +377 -24
- basic_memory/mcp/tools/utils.py +402 -16
- basic_memory/mcp/tools/view_note.py +78 -0
- basic_memory/mcp/tools/write_note.py +230 -0
- basic_memory/models/__init__.py +3 -2
- basic_memory/models/knowledge.py +82 -17
- basic_memory/models/project.py +93 -0
- basic_memory/models/search.py +68 -8
- basic_memory/project_resolver.py +222 -0
- basic_memory/repository/__init__.py +2 -0
- basic_memory/repository/entity_repository.py +437 -8
- basic_memory/repository/observation_repository.py +36 -3
- basic_memory/repository/postgres_search_repository.py +451 -0
- basic_memory/repository/project_info_repository.py +10 -0
- basic_memory/repository/project_repository.py +140 -0
- basic_memory/repository/relation_repository.py +79 -4
- basic_memory/repository/repository.py +148 -29
- basic_memory/repository/search_index_row.py +95 -0
- basic_memory/repository/search_repository.py +79 -268
- basic_memory/repository/search_repository_base.py +241 -0
- basic_memory/repository/sqlite_search_repository.py +437 -0
- basic_memory/runtime.py +61 -0
- basic_memory/schemas/__init__.py +22 -9
- basic_memory/schemas/base.py +131 -12
- basic_memory/schemas/cloud.py +50 -0
- basic_memory/schemas/directory.py +31 -0
- basic_memory/schemas/importer.py +35 -0
- basic_memory/schemas/memory.py +194 -25
- basic_memory/schemas/project_info.py +213 -0
- basic_memory/schemas/prompt.py +90 -0
- basic_memory/schemas/request.py +56 -2
- basic_memory/schemas/response.py +85 -28
- basic_memory/schemas/search.py +36 -35
- basic_memory/schemas/sync_report.py +72 -0
- basic_memory/schemas/v2/__init__.py +27 -0
- basic_memory/schemas/v2/entity.py +133 -0
- basic_memory/schemas/v2/resource.py +47 -0
- basic_memory/services/__init__.py +2 -1
- basic_memory/services/context_service.py +451 -138
- basic_memory/services/directory_service.py +310 -0
- basic_memory/services/entity_service.py +636 -71
- basic_memory/services/exceptions.py +21 -0
- basic_memory/services/file_service.py +402 -33
- basic_memory/services/initialization.py +216 -0
- basic_memory/services/link_resolver.py +50 -56
- basic_memory/services/project_service.py +888 -0
- basic_memory/services/search_service.py +232 -37
- basic_memory/sync/__init__.py +4 -2
- basic_memory/sync/background_sync.py +26 -0
- basic_memory/sync/coordinator.py +160 -0
- basic_memory/sync/sync_service.py +1200 -109
- basic_memory/sync/watch_service.py +432 -135
- basic_memory/telemetry.py +249 -0
- basic_memory/templates/prompts/continue_conversation.hbs +110 -0
- basic_memory/templates/prompts/search.hbs +101 -0
- basic_memory/utils.py +407 -54
- basic_memory-0.17.4.dist-info/METADATA +617 -0
- basic_memory-0.17.4.dist-info/RECORD +193 -0
- {basic_memory-0.7.0.dist-info → basic_memory-0.17.4.dist-info}/WHEEL +1 -1
- {basic_memory-0.7.0.dist-info → basic_memory-0.17.4.dist-info}/entry_points.txt +1 -0
- basic_memory/alembic/README +0 -1
- basic_memory/cli/commands/sync.py +0 -206
- basic_memory/cli/commands/tools.py +0 -157
- basic_memory/mcp/tools/knowledge.py +0 -68
- basic_memory/mcp/tools/memory.py +0 -170
- basic_memory/mcp/tools/notes.py +0 -202
- basic_memory/schemas/discovery.py +0 -28
- basic_memory/sync/file_change_scanner.py +0 -158
- basic_memory/sync/utils.py +0 -31
- basic_memory-0.7.0.dist-info/METADATA +0 -378
- basic_memory-0.7.0.dist-info/RECORD +0 -82
- {basic_memory-0.7.0.dist-info → basic_memory-0.17.4.dist-info}/licenses/LICENSE +0 -0
|
@@ -1,378 +0,0 @@
|
|
|
1
|
-
Metadata-Version: 2.4
|
|
2
|
-
Name: basic-memory
|
|
3
|
-
Version: 0.7.0
|
|
4
|
-
Summary: Local-first knowledge management combining Zettelkasten with knowledge graphs
|
|
5
|
-
Project-URL: Homepage, https://github.com/basicmachines-co/basic-memory
|
|
6
|
-
Project-URL: Repository, https://github.com/basicmachines-co/basic-memory
|
|
7
|
-
Project-URL: Documentation, https://github.com/basicmachines-co/basic-memory#readme
|
|
8
|
-
Author-email: Basic Machines <hello@basic-machines.co>
|
|
9
|
-
License: AGPL-3.0-or-later
|
|
10
|
-
License-File: LICENSE
|
|
11
|
-
Requires-Python: >=3.12.1
|
|
12
|
-
Requires-Dist: aiosqlite>=0.20.0
|
|
13
|
-
Requires-Dist: alembic>=1.14.1
|
|
14
|
-
Requires-Dist: dateparser>=1.2.0
|
|
15
|
-
Requires-Dist: fastapi[standard]>=0.115.8
|
|
16
|
-
Requires-Dist: greenlet>=3.1.1
|
|
17
|
-
Requires-Dist: icecream>=2.1.3
|
|
18
|
-
Requires-Dist: logfire[fastapi,httpx,sqlalchemy,sqlite3]>=3.6.0
|
|
19
|
-
Requires-Dist: loguru>=0.7.3
|
|
20
|
-
Requires-Dist: markdown-it-py>=3.0.0
|
|
21
|
-
Requires-Dist: mcp>=1.2.0
|
|
22
|
-
Requires-Dist: pydantic-settings>=2.6.1
|
|
23
|
-
Requires-Dist: pydantic[email,timezone]>=2.10.3
|
|
24
|
-
Requires-Dist: pyright>=1.1.390
|
|
25
|
-
Requires-Dist: python-frontmatter>=1.1.0
|
|
26
|
-
Requires-Dist: pyyaml>=6.0.1
|
|
27
|
-
Requires-Dist: qasync>=0.27.1
|
|
28
|
-
Requires-Dist: rich>=13.9.4
|
|
29
|
-
Requires-Dist: sqlalchemy>=2.0.0
|
|
30
|
-
Requires-Dist: typer>=0.9.0
|
|
31
|
-
Requires-Dist: unidecode>=1.3.8
|
|
32
|
-
Requires-Dist: watchfiles>=1.0.4
|
|
33
|
-
Description-Content-Type: text/markdown
|
|
34
|
-
|
|
35
|
-
# Basic Memory
|
|
36
|
-
|
|
37
|
-
Basic Memory lets you build persistent knowledge through natural conversations with Large Language Models (LLMs) like
|
|
38
|
-
Claude, while keeping everything in simple markdown files on your computer. It uses the Model Context Protocol (MCP) to
|
|
39
|
-
enable any compatible LLM to read and write to your local knowledge base.
|
|
40
|
-
|
|
41
|
-
## What is Basic Memory?
|
|
42
|
-
|
|
43
|
-
Most people use LLMs like calculators - paste in some text, expect to get an answer back, repeat. Each conversation
|
|
44
|
-
starts fresh,
|
|
45
|
-
and any knowledge or context is lost. Some try to work around this by:
|
|
46
|
-
|
|
47
|
-
- Saving chat histories (but they're hard to reference)
|
|
48
|
-
- Copying and pasting previous conversations (messy and repetitive)
|
|
49
|
-
- Using RAG systems to query documents (complex and often cloud-based)
|
|
50
|
-
|
|
51
|
-
Basic Memory takes a different approach by letting both humans and LLMs read and write knowledge naturally using
|
|
52
|
-
standard markdown files. This means:
|
|
53
|
-
|
|
54
|
-
- Your knowledge stays in files you control
|
|
55
|
-
- Both you and the LLM can read and write notes
|
|
56
|
-
- Context persists across conversations
|
|
57
|
-
- Context stays local and user controlled
|
|
58
|
-
|
|
59
|
-
## How It Works in Practice
|
|
60
|
-
|
|
61
|
-
Let's say you're working on a new project and want to capture design decisions. Here's how it works:
|
|
62
|
-
|
|
63
|
-
1. Start by chatting normally:
|
|
64
|
-
|
|
65
|
-
```markdown
|
|
66
|
-
We need to design a new auth system, some key features:
|
|
67
|
-
|
|
68
|
-
- local first, don't delegate users to third party system
|
|
69
|
-
- support multiple platforms via jwt
|
|
70
|
-
- want to keep it simple but secure
|
|
71
|
-
```
|
|
72
|
-
|
|
73
|
-
... continue conversation.
|
|
74
|
-
|
|
75
|
-
2. Ask Claude to help structure this knowledge:
|
|
76
|
-
|
|
77
|
-
```
|
|
78
|
-
"Lets write a note about the auth system design."
|
|
79
|
-
```
|
|
80
|
-
|
|
81
|
-
Claude creates a new markdown file on your system (which you can see instantly in Obsidian or your editor):
|
|
82
|
-
|
|
83
|
-
```markdown
|
|
84
|
-
---
|
|
85
|
-
title: Auth System Design
|
|
86
|
-
permalink: auth-system-design
|
|
87
|
-
tags
|
|
88
|
-
- design
|
|
89
|
-
- auth
|
|
90
|
-
---
|
|
91
|
-
|
|
92
|
-
# Auth System Design
|
|
93
|
-
|
|
94
|
-
## Observations
|
|
95
|
-
|
|
96
|
-
- [requirement] Local-first authentication without third party delegation
|
|
97
|
-
- [tech] JWT-based auth for cross-platform support
|
|
98
|
-
- [principle] Balance simplicity with security
|
|
99
|
-
|
|
100
|
-
## Relations
|
|
101
|
-
|
|
102
|
-
- implements [[Security Requirements]]
|
|
103
|
-
- relates_to [[Platform Support]]
|
|
104
|
-
- referenced_by [[JWT Implementation]]
|
|
105
|
-
```
|
|
106
|
-
|
|
107
|
-
The note embeds semantic content (Observations) and links to other topics (Relations) via simple markdown formatting.
|
|
108
|
-
|
|
109
|
-
3. You can edit this file directly in your editor in real time:
|
|
110
|
-
|
|
111
|
-
```markdown
|
|
112
|
-
# Auth System Design
|
|
113
|
-
|
|
114
|
-
## Observations
|
|
115
|
-
|
|
116
|
-
- [requirement] Local-first authentication without third party delegation
|
|
117
|
-
- [tech] JWT-based auth for cross-platform support
|
|
118
|
-
- [principle] Balance simplicity with security
|
|
119
|
-
- [decision] Will use bcrypt for password hashing # Added by you
|
|
120
|
-
|
|
121
|
-
## Relations
|
|
122
|
-
|
|
123
|
-
- implements [[Security Requirements]]
|
|
124
|
-
- relates_to [[Platform Support]]
|
|
125
|
-
- referenced_by [[JWT Implementation]]
|
|
126
|
-
- blocks [[User Service]] # Added by you
|
|
127
|
-
```
|
|
128
|
-
|
|
129
|
-
4. In a new chat with Claude, you can reference this knowledge:
|
|
130
|
-
|
|
131
|
-
```
|
|
132
|
-
"Claude, look at memory://auth-system-design for context about our auth system"
|
|
133
|
-
```
|
|
134
|
-
|
|
135
|
-
Claude can now build rich context from the knowledge graph. For example:
|
|
136
|
-
|
|
137
|
-
```
|
|
138
|
-
Following relation 'implements [[Security Requirements]]':
|
|
139
|
-
- Found authentication best practices
|
|
140
|
-
- OWASP guidelines for JWT
|
|
141
|
-
- Rate limiting requirements
|
|
142
|
-
|
|
143
|
-
Following relation 'relates_to [[Platform Support]]':
|
|
144
|
-
- Mobile auth requirements
|
|
145
|
-
- Browser security considerations
|
|
146
|
-
- JWT storage strategies
|
|
147
|
-
```
|
|
148
|
-
|
|
149
|
-
Each related document can lead to more context, building a rich semantic understanding of your knowledge base. All of
|
|
150
|
-
this context comes from standard markdown files that both humans and LLMs can read and write.
|
|
151
|
-
|
|
152
|
-
Everything stays in local markdown files that you can:
|
|
153
|
-
|
|
154
|
-
- Edit in any text editor
|
|
155
|
-
- Version via git
|
|
156
|
-
- Back up normally
|
|
157
|
-
- Share when you want to
|
|
158
|
-
|
|
159
|
-
## Technical Implementation
|
|
160
|
-
|
|
161
|
-
Under the hood, Basic Memory:
|
|
162
|
-
|
|
163
|
-
1. Stores everything in markdown files
|
|
164
|
-
2. Uses a SQLite database just for searching and indexing
|
|
165
|
-
3. Extracts semantic meaning from simple markdown patterns
|
|
166
|
-
4. Maintains a local knowledge graph from file content
|
|
167
|
-
|
|
168
|
-
The file format is just markdown with some simple markup:
|
|
169
|
-
|
|
170
|
-
Frontmatter
|
|
171
|
-
|
|
172
|
-
- title
|
|
173
|
-
- type
|
|
174
|
-
- permalink
|
|
175
|
-
- optional metadata
|
|
176
|
-
|
|
177
|
-
Observations
|
|
178
|
-
|
|
179
|
-
- facts about a topic
|
|
180
|
-
|
|
181
|
-
```markdown
|
|
182
|
-
- [category] content #tag (optional context)
|
|
183
|
-
```
|
|
184
|
-
|
|
185
|
-
Relations
|
|
186
|
-
|
|
187
|
-
- links to other topics
|
|
188
|
-
|
|
189
|
-
```markdown
|
|
190
|
-
- relation_type [[WikiLink]] (optional context)
|
|
191
|
-
```
|
|
192
|
-
|
|
193
|
-
Example:
|
|
194
|
-
|
|
195
|
-
```markdown
|
|
196
|
-
---
|
|
197
|
-
title: Note tile
|
|
198
|
-
type: note
|
|
199
|
-
permalink: unique/stable/id # Added automatically
|
|
200
|
-
tags
|
|
201
|
-
- tag1
|
|
202
|
-
- tag2
|
|
203
|
-
---
|
|
204
|
-
|
|
205
|
-
# Note Title
|
|
206
|
-
|
|
207
|
-
Regular markdown content...
|
|
208
|
-
|
|
209
|
-
## Observations
|
|
210
|
-
|
|
211
|
-
- [category] Structured knowledge #tag (optional context)
|
|
212
|
-
- [idea] Another observation
|
|
213
|
-
|
|
214
|
-
## Relations
|
|
215
|
-
|
|
216
|
-
- links_to [[Other Note]]
|
|
217
|
-
- implements [[Some Spec]]
|
|
218
|
-
```
|
|
219
|
-
|
|
220
|
-
Basic Memory will parse the markdown and derive the semantic relationships in the content. When you run
|
|
221
|
-
`basic-memory sync`:
|
|
222
|
-
|
|
223
|
-
1. New and changed files are detected
|
|
224
|
-
2. Markdown patterns become semantic knowledge:
|
|
225
|
-
|
|
226
|
-
- `[tech]` becomes a categorized observation
|
|
227
|
-
- `[[WikiLink]]` creates a relation in the knowledge graph
|
|
228
|
-
- Tags and metadata are indexed for search
|
|
229
|
-
|
|
230
|
-
3. A SQLite database maintains these relationships for fast querying
|
|
231
|
-
4. Claude and other MCP-compatible LLMs can access this knowledge via memory:// URLs
|
|
232
|
-
|
|
233
|
-
This creates a two-way flow where:
|
|
234
|
-
|
|
235
|
-
- Humans write and edit markdown files
|
|
236
|
-
- LLMs read and write through the MCP protocol
|
|
237
|
-
- Sync keeps everything consistent
|
|
238
|
-
- All knowledge stays in local files.
|
|
239
|
-
|
|
240
|
-
## Using with Claude
|
|
241
|
-
|
|
242
|
-
Basic Memory works with the Claude desktop app (https://claude.ai/):
|
|
243
|
-
|
|
244
|
-
1. Install Basic Memory locally:
|
|
245
|
-
|
|
246
|
-
```bash
|
|
247
|
-
{
|
|
248
|
-
"mcpServers": {
|
|
249
|
-
"basic-memory": {
|
|
250
|
-
"command": "uvx",
|
|
251
|
-
"args": [
|
|
252
|
-
"basic-memory"
|
|
253
|
-
]
|
|
254
|
-
}
|
|
255
|
-
}
|
|
256
|
-
```
|
|
257
|
-
|
|
258
|
-
2. Add to Claude Desktop:
|
|
259
|
-
|
|
260
|
-
```
|
|
261
|
-
Basic Memory is available with these tools:
|
|
262
|
-
- write_note() for creating/updating notes
|
|
263
|
-
- read_note() for loading notes
|
|
264
|
-
- build_context() to load notes via memory:// URLs
|
|
265
|
-
- recent_activity() to find recently updated information
|
|
266
|
-
- search() to search infomation in the knowledge base
|
|
267
|
-
```
|
|
268
|
-
|
|
269
|
-
3. Install via uv
|
|
270
|
-
|
|
271
|
-
```bash
|
|
272
|
-
uv add basic-memory
|
|
273
|
-
|
|
274
|
-
# sync local knowledge updates
|
|
275
|
-
basic-memory sync
|
|
276
|
-
|
|
277
|
-
# run realtime sync process
|
|
278
|
-
basic-memory sync --watch
|
|
279
|
-
```
|
|
280
|
-
|
|
281
|
-
## Design Philosophy
|
|
282
|
-
|
|
283
|
-
Basic Memory is built on some key ideas:
|
|
284
|
-
|
|
285
|
-
- Your knowledge should stay in files you control
|
|
286
|
-
- Both humans and AI should use natural formats
|
|
287
|
-
- Simple text patterns can capture rich meaning
|
|
288
|
-
- Local-first doesn't mean feature-poor
|
|
289
|
-
|
|
290
|
-
## Importing data
|
|
291
|
-
|
|
292
|
-
Basic memory has cli commands to import data from several formats into Markdown files
|
|
293
|
-
|
|
294
|
-
### Claude.ai
|
|
295
|
-
|
|
296
|
-
First, request an export of your data from your Claude account. The data will be emailed to you in several files,
|
|
297
|
-
including
|
|
298
|
-
`conversations.json` and `projects.json`.
|
|
299
|
-
|
|
300
|
-
Import Claude.ai conversation data
|
|
301
|
-
|
|
302
|
-
```bash
|
|
303
|
-
basic-memory import claude conversations
|
|
304
|
-
```
|
|
305
|
-
|
|
306
|
-
The conversations will be turned into Markdown files and placed in the "conversations" folder by default (this can be
|
|
307
|
-
changed with the --folder arg).
|
|
308
|
-
|
|
309
|
-
Example:
|
|
310
|
-
|
|
311
|
-
```bash
|
|
312
|
-
Importing chats from conversations.json...writing to .../basic-memory
|
|
313
|
-
Reading chat data... ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 100%
|
|
314
|
-
╭────────────────────────────╮
|
|
315
|
-
│ Import complete! │
|
|
316
|
-
│ │
|
|
317
|
-
│ Imported 307 conversations │
|
|
318
|
-
│ Containing 7769 messages │
|
|
319
|
-
╰────────────────────────────╯
|
|
320
|
-
```
|
|
321
|
-
|
|
322
|
-
Next, you can run the `sync` command to import the data into basic-memory
|
|
323
|
-
|
|
324
|
-
```bash
|
|
325
|
-
basic-memory sync
|
|
326
|
-
```
|
|
327
|
-
|
|
328
|
-
You can also import project data from Claude.ai
|
|
329
|
-
|
|
330
|
-
```bash
|
|
331
|
-
➜ basic-memory import claude projects
|
|
332
|
-
Importing projects from projects.json...writing to .../basic-memory/projects
|
|
333
|
-
Reading project data... ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 100%
|
|
334
|
-
╭────────────────────────────────╮
|
|
335
|
-
│ Import complete! │
|
|
336
|
-
│ │
|
|
337
|
-
│ Imported 101 project documents │
|
|
338
|
-
│ Imported 32 prompt templates │
|
|
339
|
-
╰────────────────────────────────╯
|
|
340
|
-
|
|
341
|
-
Run 'basic-memory sync' to index the new files.
|
|
342
|
-
```
|
|
343
|
-
|
|
344
|
-
### Chat Gpt
|
|
345
|
-
|
|
346
|
-
```bash
|
|
347
|
-
➜ basic-memory import chatgpt
|
|
348
|
-
Importing chats from conversations.json...writing to .../basic-memory/conversations
|
|
349
|
-
|
|
350
|
-
Reading chat data... ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 100%
|
|
351
|
-
╭────────────────────────────╮
|
|
352
|
-
│ Import complete! │
|
|
353
|
-
│ │
|
|
354
|
-
│ Imported 198 conversations │
|
|
355
|
-
│ Containing 11777 messages │
|
|
356
|
-
╰────────────────────────────╯
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
```
|
|
360
|
-
|
|
361
|
-
### Memory json
|
|
362
|
-
|
|
363
|
-
```bash
|
|
364
|
-
➜ basic-memory import memory-json
|
|
365
|
-
Importing from memory.json...writing to .../basic-memory
|
|
366
|
-
Reading memory.json... ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 100%
|
|
367
|
-
Creating entities... ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 100%
|
|
368
|
-
╭──────────────────────╮
|
|
369
|
-
│ Import complete! │
|
|
370
|
-
│ │
|
|
371
|
-
│ Created 126 entities │
|
|
372
|
-
│ Added 252 relations │
|
|
373
|
-
╰──────────────────────╯
|
|
374
|
-
```
|
|
375
|
-
|
|
376
|
-
## License
|
|
377
|
-
|
|
378
|
-
AGPL-3.0
|
|
@@ -1,82 +0,0 @@
|
|
|
1
|
-
basic_memory/__init__.py,sha256=2LnWS_j9nC8P5BSYmW2D9Ccx3xNj4gPQf_GElvfJcgU,122
|
|
2
|
-
basic_memory/config.py,sha256=lgihYA80A5uzSzUc3GE7aEWogndocv7J0uyYK1JCp68,1793
|
|
3
|
-
basic_memory/db.py,sha256=EVX3pgA2rah4tZpxy5wKvZSN8vVcrvo5l-hKjAXBb0U,5284
|
|
4
|
-
basic_memory/deps.py,sha256=8LkcfppQEJpiflYZxLk-SmQuL04qknbsdfzIkM_ctuY,5530
|
|
5
|
-
basic_memory/file_utils.py,sha256=gp7RCFWaddFnELIyTc1E19Rk8jJsrKshG2n8ZZR-kKA,5751
|
|
6
|
-
basic_memory/utils.py,sha256=SuAE8rVIGTcj9Yi2fVMhDbToVjfprU_iOiOr0U8aqIU,3352
|
|
7
|
-
basic_memory/alembic/README,sha256=MVlc9TYmr57RbhXET6QxgyCcwWP7w-vLkEsirENqiIQ,38
|
|
8
|
-
basic_memory/alembic/env.py,sha256=XqJVQhS41ba7NCPmmaSZ09_tbSLnwsY2bcpJpqx_ZTc,2107
|
|
9
|
-
basic_memory/alembic/migrations.py,sha256=CIbkMHEKZ60aDUhFGSQjv8kDNM7sazfvEYHGGcy1DBk,858
|
|
10
|
-
basic_memory/alembic/script.py.mako,sha256=MEqL-2qATlST9TAOeYgscMn1uy6HUS9NFvDgl93dMj8,635
|
|
11
|
-
basic_memory/alembic/versions/3dae7c7b1564_initial_schema.py,sha256=lTbWlAnd1es7xU99DoJgfaRe1_Kte8TL98riqeKGV80,4363
|
|
12
|
-
basic_memory/api/__init__.py,sha256=wCpj-21j1D0KzKl9Ql6unLBVFY0K1uGp_FeSZRKtqpk,72
|
|
13
|
-
basic_memory/api/app.py,sha256=0vmDJDhKkRN1f7XDO3hqcUpXrLRmcHOH79O5x4hPtho,1573
|
|
14
|
-
basic_memory/api/routers/__init__.py,sha256=iviQ1QVYobC8huUuyRhEjcA0BDjrOUm1lXHXhJkxP9A,239
|
|
15
|
-
basic_memory/api/routers/knowledge_router.py,sha256=LtZIXZ2cgqLesMMY8_xoyQm2WW4dnn3ZrASjZYeLMhA,5278
|
|
16
|
-
basic_memory/api/routers/memory_router.py,sha256=oBOyR-qpT8FAYvzENeBEWuWeGe6beD3GXUJ2SVhdRCw,5080
|
|
17
|
-
basic_memory/api/routers/resource_router.py,sha256=B3pd_5qJMgYro0CmLV3YIr0eol4eRtb78FYOPJzrPgA,4534
|
|
18
|
-
basic_memory/api/routers/search_router.py,sha256=WCLuAkEZ-DpwHU8RsnZg63_LDiSYbbLLlBb9Avbc2fA,1164
|
|
19
|
-
basic_memory/cli/__init__.py,sha256=arcKLAWRDhPD7x5t80MlviZeYzwHZ0GZigyy3NKVoGk,33
|
|
20
|
-
basic_memory/cli/app.py,sha256=7_HWUOW6oWncbwhuCJ5jC3z2WadSfkuTWiH_w_Rbhnk,465
|
|
21
|
-
basic_memory/cli/main.py,sha256=iVHi23ClA1hTvC5lq8dpGMmWObIjhA1QoWo_moX84os,434
|
|
22
|
-
basic_memory/cli/commands/__init__.py,sha256=OQGLaKTsOdPsp2INM_pHzmOlbVfdL0sytBNgvqTqCDY,159
|
|
23
|
-
basic_memory/cli/commands/db.py,sha256=BW3VmoTKNfzkl85m9lyrx8lkk1IRb6wuAmrPKFQxNE8,906
|
|
24
|
-
basic_memory/cli/commands/import_chatgpt.py,sha256=py3q9iMlB85olQBsBcEpUt0X03hHvAmRy8iQl2dbbuc,8394
|
|
25
|
-
basic_memory/cli/commands/import_claude_conversations.py,sha256=_7n-nn1tbsaarwR25QXjYxSC_K2M0cXBTzthnCZ_4-w,7030
|
|
26
|
-
basic_memory/cli/commands/import_claude_projects.py,sha256=fvXu6wwlmfA2wJCcp8IoJnz3INefkVcFhqAX8KhnCtc,6851
|
|
27
|
-
basic_memory/cli/commands/import_memory_json.py,sha256=cS-1rxGYUC0-QsETIbA0QqbB1Cl74YcnoJRNCkMkM-o,5395
|
|
28
|
-
basic_memory/cli/commands/mcp.py,sha256=BPdThcufdriIvrDskc87a0oCC1BkZ0PZsgNao_-oNKk,611
|
|
29
|
-
basic_memory/cli/commands/status.py,sha256=mnAnizd2l0OShTJyF9EGEdO7TeKDUgQVlHNXZwDDFuU,5845
|
|
30
|
-
basic_memory/cli/commands/sync.py,sha256=2Uj7Homfr403OCoPCq3rrC-OQfOhvoDqGH0F38pBQVw,7038
|
|
31
|
-
basic_memory/cli/commands/tools.py,sha256=NuLFckIW7tcRc7KUPm5ig6-iSGzTaCQiu8jXrBM8np8,5261
|
|
32
|
-
basic_memory/markdown/__init__.py,sha256=DdzioCWtDnKaq05BHYLgL_78FawEHLpLXnp-kPSVfIc,501
|
|
33
|
-
basic_memory/markdown/entity_parser.py,sha256=sJk8TRUd9cAaIjATiJn7dBQRorrYngRbd7MRVfc0Oc4,3781
|
|
34
|
-
basic_memory/markdown/markdown_processor.py,sha256=mV3pYoDTaQMEl1tA5n_XztBvNlYyH2SzKs4vnKdAet4,4952
|
|
35
|
-
basic_memory/markdown/plugins.py,sha256=gtIzKRjoZsyvBqLpVNnrmzl_cbTZ5ZGn8kcuXxQjRko,6639
|
|
36
|
-
basic_memory/markdown/schemas.py,sha256=mzVEDUhH98kwETMknjkKw5H697vg_zUapsJkJVi17ho,1894
|
|
37
|
-
basic_memory/markdown/utils.py,sha256=ZtHa-dG--ZwFEUC3jfl04KZGhM_ZWo5b-8d8KpJ90gY,2758
|
|
38
|
-
basic_memory/mcp/__init__.py,sha256=dsDOhKqjYeIbCULbHIxfcItTbqudEuEg1Np86eq0GEQ,35
|
|
39
|
-
basic_memory/mcp/async_client.py,sha256=vMN5nApPA428Oz4Siq2mNTiBjTcM5A5OSZTnX7_sDxE,234
|
|
40
|
-
basic_memory/mcp/server.py,sha256=L92Vit7llaKT9NlPZfxdp67C33niObmRH2QFyUhmnD0,355
|
|
41
|
-
basic_memory/mcp/tools/__init__.py,sha256=MHZmWw016N0qbtC3f186Jg1tPzh2g88_ZsCKJ0oyrrs,873
|
|
42
|
-
basic_memory/mcp/tools/knowledge.py,sha256=JotFMQpMwidx0WLvOG4yWpwWwLmyp-PoO6bVjpQseYQ,2671
|
|
43
|
-
basic_memory/mcp/tools/memory.py,sha256=zRtwN8va9sEv6ao0dIAU63jDb49H_8IcFmZvPzypg2w,6180
|
|
44
|
-
basic_memory/mcp/tools/notes.py,sha256=6m7Xl9IN_8bkXSvV-vR8GqZZufMki5JjjWc6RlntDts,7424
|
|
45
|
-
basic_memory/mcp/tools/search.py,sha256=UFPBDzfZ60SrvAgvISO3Jt6WdNwEQKsvibQdPxC7dOg,1511
|
|
46
|
-
basic_memory/mcp/tools/utils.py,sha256=icm-Xyqw3GxooGYkXqjEjoZvIGy_Z3CPw-uUYBxR_YQ,4831
|
|
47
|
-
basic_memory/models/__init__.py,sha256=Bf0xXV_ryndogvZDiVM_Wb6iV2fHUxYNGMZNWNcZi0s,307
|
|
48
|
-
basic_memory/models/base.py,sha256=4hAXJ8CE1RnjKhb23lPd-QM7G_FXIdTowMJ9bRixspU,225
|
|
49
|
-
basic_memory/models/knowledge.py,sha256=R05mLr2GXDfUcmPe2ja20wvzP818b4npnxL1PvQooEY,5921
|
|
50
|
-
basic_memory/models/search.py,sha256=IB-ySJUqlQq9FqLGfWnraIFcB_brWa9eBwsQP1rVTeI,1164
|
|
51
|
-
basic_memory/repository/__init__.py,sha256=TnscLXARq2iOgQZFvQoT9X1Bn9SB_7s1xw2fOqRs3Jg,252
|
|
52
|
-
basic_memory/repository/entity_repository.py,sha256=VFLymzJ1W6AZru_s1S3U6nlqSprBrVV5Toy0-qysIfw,3524
|
|
53
|
-
basic_memory/repository/observation_repository.py,sha256=BOcy4wARqCXu-thYyt7mPxt2A2C8TW0le3s_X9wrK6I,1701
|
|
54
|
-
basic_memory/repository/relation_repository.py,sha256=DwpTcn9z_1sZQcyMOUABz1k1VSwo_AU63x2zR7aerTk,2933
|
|
55
|
-
basic_memory/repository/repository.py,sha256=jUScHWOfcB2FajwVZ2Sbjtg-gSI2Y2rhiIaTULjvmn8,11321
|
|
56
|
-
basic_memory/repository/search_repository.py,sha256=G5qnchUqhq8httnihOU77nA3mq3MNpTxqQAi96uBmRE,10122
|
|
57
|
-
basic_memory/schemas/__init__.py,sha256=eVxrtuPT7-9JIQ7UDx2J8t8xlS3u0iUkV_VLNbzvxo4,1575
|
|
58
|
-
basic_memory/schemas/base.py,sha256=epSauNNVZ2lRLATf-HIzqeberq4ZBTgxliNmjitAsWc,5538
|
|
59
|
-
basic_memory/schemas/delete.py,sha256=UAR2JK99WMj3gP-yoGWlHD3eZEkvlTSRf8QoYIE-Wfw,1180
|
|
60
|
-
basic_memory/schemas/discovery.py,sha256=6Y2tUiv9f06rFTsa8_wTH2haS2bhCfuQh0uW33hwdd8,876
|
|
61
|
-
basic_memory/schemas/memory.py,sha256=BscZQOYw-dXq_qUz4qd3PrUI5618tRwNrYxKmIppU2Q,2924
|
|
62
|
-
basic_memory/schemas/request.py,sha256=58r9mPGc4Am9rR_zGzo-yqXcsrl5I6n3M5LjGK5gFFk,1626
|
|
63
|
-
basic_memory/schemas/response.py,sha256=lVYR31DTtSeFRddGWX_wQWnQgyiwX0LEpNJ4f4lKpTM,6440
|
|
64
|
-
basic_memory/schemas/search.py,sha256=Yl7yPUEYADl4tHllTKCjIoe8ck4kVsVglIItnKN2Ei8,3319
|
|
65
|
-
basic_memory/services/__init__.py,sha256=oop6SKmzV4_NAYt9otGnupLGVCCKIVgxEcdRQWwh25I,197
|
|
66
|
-
basic_memory/services/context_service.py,sha256=y2Kd9YRPdQbJ6uWcY71z2qCZZUt8Sb2Dy52dh2OMJxo,9651
|
|
67
|
-
basic_memory/services/entity_service.py,sha256=CoN1HVrjlT2JDaG3tfs6NixkZgJ4xbaEjABkv8hyGJ4,11784
|
|
68
|
-
basic_memory/services/exceptions.py,sha256=VGlCLd4UD2w5NWKqC7QpG4jOM_hA7jKRRM-MqvEVMNk,288
|
|
69
|
-
basic_memory/services/file_service.py,sha256=r4JfPY1wyenAH0Y-iq7vGHPwT616ayUWoLnvA1NuzpA,5695
|
|
70
|
-
basic_memory/services/link_resolver.py,sha256=GmUPTViW5JplQo4yJNaX18OGInqMitrxUeR4LQqUABA,4581
|
|
71
|
-
basic_memory/services/search_service.py,sha256=0ZeK9CND4GQylRTG3LXxgTS-PVfn8dnDmxw75KR6dsk,7901
|
|
72
|
-
basic_memory/services/service.py,sha256=V-d_8gOV07zGIQDpL-Ksqs3ZN9l3qf3HZOK1f_YNTag,336
|
|
73
|
-
basic_memory/sync/__init__.py,sha256=ko0xLQv1S5U7sAOmIP2XKl03akVPzoY-a9m3TFPcMh4,193
|
|
74
|
-
basic_memory/sync/file_change_scanner.py,sha256=4whJej6t9sxwUp1ox93efJ0bBHSnAr6STpk_PsKU6to,5784
|
|
75
|
-
basic_memory/sync/sync_service.py,sha256=hx8aalnnFZB2T_fVRGN_6OlzTCmL0U0aUoPr8CPiB-o,7662
|
|
76
|
-
basic_memory/sync/utils.py,sha256=wz1Fe7Mb_M5N9vYRQnDKGODiMGcj5MEK16KVJ3eoQ9g,1191
|
|
77
|
-
basic_memory/sync/watch_service.py,sha256=CtKBrP1imI3ZSEgJl7Ffi-JZ_oDGKrhiyGgs41h5QYI,7563
|
|
78
|
-
basic_memory-0.7.0.dist-info/METADATA,sha256=-G7gpth5p_edb7vSSMQdmDn5irZ7fJjOfdOV0qS-CDQ,10855
|
|
79
|
-
basic_memory-0.7.0.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
|
80
|
-
basic_memory-0.7.0.dist-info/entry_points.txt,sha256=IDQa_VmVTzmvMrpnjhEfM0S3F--XsVGEj3MpdJfuo-Q,59
|
|
81
|
-
basic_memory-0.7.0.dist-info/licenses/LICENSE,sha256=hIahDEOTzuHCU5J2nd07LWwkLW7Hko4UFO__ffsvB-8,34523
|
|
82
|
-
basic_memory-0.7.0.dist-info/RECORD,,
|
|
File without changes
|