basic-memory 0.0.0__py3-none-any.whl → 0.1.1__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.

Files changed (32) hide show
  1. basic_memory/api/app.py +23 -1
  2. basic_memory/api/routers/memory_router.py +1 -1
  3. basic_memory/cli/commands/__init__.py +3 -7
  4. basic_memory/cli/commands/import_memory_json.py +139 -0
  5. basic_memory/cli/main.py +3 -4
  6. basic_memory/config.py +5 -1
  7. basic_memory/db.py +45 -21
  8. basic_memory/file_utils.py +27 -62
  9. basic_memory/markdown/__init__.py +2 -0
  10. basic_memory/markdown/entity_parser.py +1 -1
  11. basic_memory/markdown/markdown_processor.py +2 -14
  12. basic_memory/markdown/plugins.py +1 -1
  13. basic_memory/markdown/schemas.py +1 -3
  14. basic_memory/mcp/tools/memory.py +8 -3
  15. basic_memory/models/__init__.py +9 -6
  16. basic_memory/models/base.py +4 -3
  17. basic_memory/repository/search_repository.py +10 -3
  18. basic_memory/schemas/base.py +5 -2
  19. basic_memory/schemas/memory.py +4 -1
  20. basic_memory/services/__init__.py +2 -1
  21. basic_memory/services/context_service.py +1 -1
  22. basic_memory/services/database_service.py +159 -0
  23. basic_memory/services/entity_service.py +52 -2
  24. basic_memory/services/file_service.py +0 -1
  25. basic_memory/sync/sync_service.py +34 -4
  26. basic_memory-0.1.1.dist-info/METADATA +296 -0
  27. {basic_memory-0.0.0.dist-info → basic_memory-0.1.1.dist-info}/RECORD +30 -29
  28. basic_memory/cli/commands/init.py +0 -38
  29. basic_memory-0.0.0.dist-info/METADATA +0 -71
  30. {basic_memory-0.0.0.dist-info → basic_memory-0.1.1.dist-info}/WHEEL +0 -0
  31. {basic_memory-0.0.0.dist-info → basic_memory-0.1.1.dist-info}/entry_points.txt +0 -0
  32. {basic_memory-0.0.0.dist-info → basic_memory-0.1.1.dist-info}/licenses/LICENSE +0 -0
@@ -0,0 +1,296 @@
1
+ Metadata-Version: 2.4
2
+ Name: basic-memory
3
+ Version: 0.1.1
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: loguru>=0.7.3
19
+ Requires-Dist: markdown-it-py>=3.0.0
20
+ Requires-Dist: mcp>=1.2.0
21
+ Requires-Dist: pydantic-settings>=2.6.1
22
+ Requires-Dist: pydantic[email,timezone]>=2.10.3
23
+ Requires-Dist: pyright>=1.1.390
24
+ Requires-Dist: python-frontmatter>=1.1.0
25
+ Requires-Dist: pyyaml>=6.0.1
26
+ Requires-Dist: rich>=13.9.4
27
+ Requires-Dist: sqlalchemy>=2.0.0
28
+ Requires-Dist: typer>=0.9.0
29
+ Requires-Dist: unidecode>=1.3.8
30
+ Requires-Dist: watchfiles>=1.0.4
31
+ Provides-Extra: dev
32
+ Requires-Dist: pytest-asyncio>=0.24.0; extra == 'dev'
33
+ Requires-Dist: pytest-cov>=4.1.0; extra == 'dev'
34
+ Requires-Dist: pytest-mock>=3.12.0; extra == 'dev'
35
+ Requires-Dist: pytest>=8.3.4; extra == 'dev'
36
+ Requires-Dist: ruff>=0.1.6; extra == 'dev'
37
+ Description-Content-Type: text/markdown
38
+
39
+ # Basic Memory
40
+
41
+ Basic Memory lets you build persistent knowledge through natural conversations with Large Language Models (LLMs) like
42
+ Claude, while keeping everything in simple markdown files on your computer. It uses the Model Context Protocol (MCP) to
43
+ enable any compatible LLM to read and write to your local knowledge base.
44
+
45
+ ## What is Basic Memory?
46
+
47
+ Most people use LLMs like calculators - paste in some text, expect to get an answer back, repeat. Each conversation
48
+ starts fresh,
49
+ and any knowledge or context is lost. Some try to work around this by:
50
+
51
+ - Saving chat histories (but they're hard to reference)
52
+ - Copying and pasting previous conversations (messy and repetitive)
53
+ - Using RAG systems to query documents (complex and often cloud-based)
54
+
55
+ Basic Memory takes a different approach by letting both humans and LLMs read and write knowledge naturally using
56
+ standard markdown files. This means:
57
+
58
+ - Your knowledge stays in files you control
59
+ - Both you and the LLM can read and write notes
60
+ - Context persists across conversations
61
+ - Context stays local and user controlled
62
+
63
+ ## How It Works in Practice
64
+
65
+ Let's say you're working on a new project and want to capture design decisions. Here's how it works:
66
+
67
+ 1. Start by chatting normally:
68
+
69
+ ```markdown
70
+ We need to design a new auth system, some key features:
71
+
72
+ - local first, don't delegate users to third party system
73
+ - support multiple platforms via jwt
74
+ - want to keep it simple but secure
75
+ ```
76
+
77
+ ... continue conversation.
78
+
79
+ 2. Ask Claude to help structure this knowledge:
80
+
81
+ ```
82
+ "Lets write a note about the auth system design."
83
+ ```
84
+
85
+ Claude creates a new markdown file on your system (which you can see instantly in Obsidian or your editor):
86
+
87
+ ```markdown
88
+ ---
89
+ title: Auth System Design
90
+ permalink: auth-system-design
91
+ tags
92
+ - design
93
+ - auth
94
+ ---
95
+
96
+ # Auth System Design
97
+
98
+ ## Observations
99
+
100
+ - [requirement] Local-first authentication without third party delegation
101
+ - [tech] JWT-based auth for cross-platform support
102
+ - [principle] Balance simplicity with security
103
+
104
+ ## Relations
105
+
106
+ - implements [[Security Requirements]]
107
+ - relates_to [[Platform Support]]
108
+ - referenced_by [[JWT Implementation]]
109
+ ```
110
+
111
+ The note embeds semantic content (Observations) and links to other topics (Relations) via simple markdown formatting.
112
+
113
+ 3. You can edit this file directly in your editor in real time:
114
+
115
+ ```markdown
116
+ # Auth System Design
117
+
118
+ ## Observations
119
+
120
+ - [requirement] Local-first authentication without third party delegation
121
+ - [tech] JWT-based auth for cross-platform support
122
+ - [principle] Balance simplicity with security
123
+ - [decision] Will use bcrypt for password hashing # Added by you
124
+
125
+ ## Relations
126
+
127
+ - implements [[Security Requirements]]
128
+ - relates_to [[Platform Support]]
129
+ - referenced_by [[JWT Implementation]]
130
+ - blocks [[User Service]] # Added by you
131
+ ```
132
+
133
+ 4. In a new chat with Claude, you can reference this knowledge:
134
+
135
+ ```
136
+ "Claude, look at memory://auth-system-design for context about our auth system"
137
+ ```
138
+
139
+ Claude can now build rich context from the knowledge graph. For example:
140
+
141
+ ```
142
+ Following relation 'implements [[Security Requirements]]':
143
+ - Found authentication best practices
144
+ - OWASP guidelines for JWT
145
+ - Rate limiting requirements
146
+
147
+ Following relation 'relates_to [[Platform Support]]':
148
+ - Mobile auth requirements
149
+ - Browser security considerations
150
+ - JWT storage strategies
151
+ ```
152
+
153
+ Each related document can lead to more context, building a rich semantic understanding of your knowledge base. All of
154
+ this context comes from standard markdown files that both humans and LLMs can read and write.
155
+
156
+ Everything stays in local markdown files that you can:
157
+
158
+ - Edit in any text editor
159
+ - Version via git
160
+ - Back up normally
161
+ - Share when you want to
162
+
163
+ ## Technical Implementation
164
+
165
+ Under the hood, Basic Memory:
166
+
167
+ 1. Stores everything in markdown files
168
+ 2. Uses a SQLite database just for searching and indexing
169
+ 3. Extracts semantic meaning from simple markdown patterns
170
+ 4. Maintains a local knowledge graph from file content
171
+
172
+ The file format is just markdown with some simple markup:
173
+
174
+ Frontmatter
175
+
176
+ - title
177
+ - type
178
+ - permalink
179
+ - optional metadata
180
+
181
+ Observations
182
+
183
+ - facts about a topic
184
+
185
+ ```markdown
186
+ - [category] content #tag (optional context)
187
+ ```
188
+
189
+ Relations
190
+
191
+ - links to other topics
192
+
193
+ ```markdown
194
+ - relation_type [[WikiLink]] (optional context)
195
+ ```
196
+
197
+ Example:
198
+
199
+ ```markdown
200
+ ---
201
+ title: Note tile
202
+ type: note
203
+ permalink: unique/stable/id # Added automatically
204
+ tags
205
+ - tag1
206
+ - tag2
207
+ ---
208
+
209
+ # Note Title
210
+
211
+ Regular markdown content...
212
+
213
+ ## Observations
214
+
215
+ - [category] Structured knowledge #tag (optional context)
216
+ - [idea] Another observation
217
+
218
+ ## Relations
219
+
220
+ - links_to [[Other Note]]
221
+ - implements [[Some Spec]]
222
+ ```
223
+
224
+ Basic Memory will parse the markdown and derive the semantic relationships in the content. When you run
225
+ `basic-memory sync`:
226
+
227
+ 1. New and changed files are detected
228
+ 2. Markdown patterns become semantic knowledge:
229
+
230
+ - `[tech]` becomes a categorized observation
231
+ - `[[WikiLink]]` creates a relation in the knowledge graph
232
+ - Tags and metadata are indexed for search
233
+
234
+ 3. A SQLite database maintains these relationships for fast querying
235
+ 4. Claude and other MCP-compatible LLMs can access this knowledge via memory:// URLs
236
+
237
+ This creates a two-way flow where:
238
+
239
+ - Humans write and edit markdown files
240
+ - LLMs read and write through the MCP protocol
241
+ - Sync keeps everything consistent
242
+ - All knowledge stays in local files.
243
+
244
+ ## Using with Claude
245
+
246
+ Basic Memory works with the Claude desktop app (https://claude.ai/):
247
+
248
+ 1. Install Basic Memory locally:
249
+
250
+ ```bash
251
+ {
252
+ "mcpServers": {
253
+ "basic-memory": {
254
+ "command": "uvx",
255
+ "args": [
256
+ "basic-memory"
257
+ ]
258
+ }
259
+ }
260
+ ```
261
+
262
+ 2. Add to Claude Desktop:
263
+
264
+ ```
265
+ Basic Memory is available with these tools:
266
+ - write_note() for creating/updating notes
267
+ - read_note() for loading notes
268
+ - build_context() to load notes via memory:// URLs
269
+ - recent_activity() to find recently updated information
270
+ - search() to search infomation in the knowledge base
271
+ ```
272
+
273
+ 3. Install via uv
274
+
275
+ ```bash
276
+ uv add basic-memory
277
+
278
+ # sync local knowledge updates
279
+ basic-memory sync
280
+
281
+ # run realtime sync process
282
+ basic-memory sync --watch
283
+ ```
284
+
285
+ ## Design Philosophy
286
+
287
+ Basic Memory is built on some key ideas:
288
+
289
+ - Your knowledge should stay in files you control
290
+ - Both humans and AI should use natural formats
291
+ - Simple text patterns can capture rich meaning
292
+ - Local-first doesn't mean feature-poor
293
+
294
+ ## License
295
+
296
+ AGPL-3.0
@@ -1,28 +1,28 @@
1
1
  basic_memory/__init__.py,sha256=5AdJrNglWu8gvlZPWZDKmrYbpOaJJ7KcdBfSQxBl3A8,121
2
- basic_memory/config.py,sha256=_faKNgRMHyWU6oSUnE_grVCrRT4uRRBjAy_zRSDAxfg,1492
3
- basic_memory/db.py,sha256=NDpOTPxlVcjWEOeNxZGXqxEBoW-kdhjdsgQP9BTv29c,4092
2
+ basic_memory/config.py,sha256=bmNBTbbl8YhEsHOI0fnC7EfxIuyKB25LhtNuXzFlXnY,1671
3
+ basic_memory/db.py,sha256=rTNI7_rP5sGEpJvIGwk3VXEPbGwqoyKaSXxNgDAxxZQ,4639
4
4
  basic_memory/deps.py,sha256=YeDwqEmqUTPOc-JdItE1NEj3iunB2j6thYotweHXq98,5316
5
- basic_memory/file_utils.py,sha256=_7DHpWpsPcaeuft4NXTzYYQSJ79ISF8NlTSUBUapLB8,6722
5
+ basic_memory/file_utils.py,sha256=-B-ixIGo4kf27nXE7mlyO5SljK-BhXvSN9rsXfJu0HQ,5814
6
6
  basic_memory/utils.py,sha256=FCXR_jQxr8qBtHSHkWoESEvSVwPiWjn5xfAPmyqYW0g,2321
7
7
  basic_memory/api/__init__.py,sha256=2y71HVPvGBIjx2tTd6nsSGeAFuFEyNn2MZ9IcqIs1hY,70
8
- basic_memory/api/app.py,sha256=fCPqcf614PyvIhtv0cfDpJ63nEBe1-gnA7Crel56ZRU,1192
8
+ basic_memory/api/app.py,sha256=RcljMzKZIETofuybHDCmQizFcXddDiLSxOPm3ggWF1Q,1755
9
9
  basic_memory/api/routers/__init__.py,sha256=iviQ1QVYobC8huUuyRhEjcA0BDjrOUm1lXHXhJkxP9A,239
10
10
  basic_memory/api/routers/knowledge_router.py,sha256=9t-ogIL8HVtGi6_eM-OAM8yY5VZZK-goSKSqbG9GLvI,5756
11
- basic_memory/api/routers/memory_router.py,sha256=HksfZpXlvNQtzFsBmbICZj-xbo_viSdTMBiGCWHqV2g,4222
11
+ basic_memory/api/routers/memory_router.py,sha256=YVM_2B1-1N-8ytmW9NcMwR5ee8ykM935s6psO-5uLuo,4231
12
12
  basic_memory/api/routers/resource_router.py,sha256=_Gp5HSJr-L-GUkQKbEP2bAZvCY8Smd-sBNWpGyqXS4c,1056
13
13
  basic_memory/api/routers/search_router.py,sha256=eKUibpJGuniLgTxXI_C28CjMrSNoXIrEwrlTBTkf1y4,1168
14
14
  basic_memory/cli/__init__.py,sha256=Hs6p69LnxlgO41EYFY0zMDCsbB3QxvPH9duNZz0hROs,32
15
15
  basic_memory/cli/app.py,sha256=gevKtdiAIlsJCbvegd1Pt7NID96Bq7yM1Hv2irHS0tY,35
16
- basic_memory/cli/main.py,sha256=u6AYeI17mEZJKTfTwGG_0FG52usQ9A9Uhh8o2wcTjmA,1140
17
- basic_memory/cli/commands/__init__.py,sha256=s_Ye8jpeq-yDxwCTsbxygvqi2eI-wybJVcHE0fOjJGY,98
18
- basic_memory/cli/commands/init.py,sha256=5UmOasPd_65Evcw8QYWNZcrViBhWhrlFWCXOHtlrA1E,1189
16
+ basic_memory/cli/main.py,sha256=E54Cl4gvHGijiY0UmNSLa-Dlm66EHxfvd2Tr4bB1XIY,1077
17
+ basic_memory/cli/commands/__init__.py,sha256=18zCHPanlry0a-5C2bRa-ydwQ8Ki40D2A3M6j7zVmKE,134
18
+ basic_memory/cli/commands/import_memory_json.py,sha256=jpGJpEx8QuARi3ZurH4bvDSF-c3c_hTktNLps-0YsSo,5207
19
19
  basic_memory/cli/commands/status.py,sha256=Dqp8mGR7vFpB-bVkIBRKvWeIkfDN7KyYaAKdtoAEYY4,5691
20
20
  basic_memory/cli/commands/sync.py,sha256=ycyD9yuZdKrtSd6L6sPQU1N3ang9FDIt5w-BHpqoD-c,8482
21
- basic_memory/markdown/__init__.py,sha256=JQlB99HSNSwhZgYmDgBJantvMXDjsKHvd_qRkyRkkzY,405
22
- basic_memory/markdown/entity_parser.py,sha256=M39vRYxqYSLWe_0yhrGeqtmDDM6LCdvbKxmPUQfg1XQ,4434
23
- basic_memory/markdown/markdown_processor.py,sha256=dUhp1pv1yfJCbX7Rx2MCtw0kinfn1zr5tyEjXiKe3IM,5633
24
- basic_memory/markdown/plugins.py,sha256=mQ80nrnjucSgVqaza7hALf7k9xE19TYyR5aO5CZ1HBg,7625
25
- basic_memory/markdown/schemas.py,sha256=IKLmOvyySjE9LuVQvg_hTKL3PdpE3rHgwSQAqsNB0Xg,1940
21
+ basic_memory/markdown/__init__.py,sha256=DdzioCWtDnKaq05BHYLgL_78FawEHLpLXnp-kPSVfIc,501
22
+ basic_memory/markdown/entity_parser.py,sha256=EBpBrmspZ7VbWdrro4K2fp5lCxMe-HKCcW5T3MoFB7s,4439
23
+ basic_memory/markdown/markdown_processor.py,sha256=7XUagES8n4gRW8xt9KC7XTyO1spFNzal8kKWGiQvyMU,4985
24
+ basic_memory/markdown/plugins.py,sha256=lc2C3kFsQdyw83j-T6ovT6489jr8QuUQ9Invqgj0Of0,7601
25
+ basic_memory/markdown/schemas.py,sha256=fUNzaf2YNhDJlG_PmHdwmU0H_S_uf332jcuU9raGaXs,1839
26
26
  basic_memory/markdown/utils.py,sha256=jNSjpeDD2mBccbV3w5WXv6fzuiAKurU2jvT_vFOYbys,5234
27
27
  basic_memory/mcp/__init__.py,sha256=UioEZETQ-1lEfbqi1XirraBaiHdMHDX6JBpRZbAXTYY,34
28
28
  basic_memory/mcp/async_client.py,sha256=J4eSKs4VMef1AoWBHOwvzjS6kzfNntjg6cPxPpw56RQ,238
@@ -31,12 +31,12 @@ basic_memory/mcp/server.py,sha256=nSCgu7SCTMviZDi02FOD6PEsZumg1ZtTwvmpwIuxeXg,92
31
31
  basic_memory/mcp/tools/__init__.py,sha256=j3XpNTu-f0IeOFfo6ZNNtl728fzNwsN4w_kZQiMIE4U,820
32
32
  basic_memory/mcp/tools/ai_edit.py,sha256=0a6GTqJZdDyYhfecT23pP1VPPvk5bfPRX8bCFN_SKoE,2531
33
33
  basic_memory/mcp/tools/knowledge.py,sha256=OX-4Sz7Ox1so4USwuhf1iAL-I6bzzPgE5U0hajs-5Cc,2010
34
- basic_memory/mcp/tools/memory.py,sha256=0Z8_zNHiuxg7fdkmSw1wNOx1Wh8P7nBI4ZZQwvt3LQE,5096
34
+ basic_memory/mcp/tools/memory.py,sha256=OTKwcOZiGPRDceyNsadvcqqY5Azpb0C1MjvzZatKt3s,5252
35
35
  basic_memory/mcp/tools/notes.py,sha256=4GKnhDK53UkeZtpZENQ9id9XdemKxLzGwMQJeuX-Kok,3772
36
36
  basic_memory/mcp/tools/search.py,sha256=ViYLp-yGTxOEJli3PyE_JiBP3JXQ0fs-XLS09Sl7hoc,1103
37
37
  basic_memory/mcp/tools/utils.py,sha256=9sOE_zW-kr7zbwRRlLAhR5cCmcGfuewNsUtiInXULnk,4857
38
- basic_memory/models/__init__.py,sha256=ZxS_KMKfeuAfzJo1C3LLmIGHBPd77o1I5qyx9zTqf9A,278
39
- basic_memory/models/base.py,sha256=UGG9aKXfg8Eon9oGzAbvXFgM6uQp21-Fs1fIJNy4U_0,223
38
+ basic_memory/models/__init__.py,sha256=VA_RP2xVrghTkOtILKvRDkn8EoP6UfjhnP8UgqupSkk,355
39
+ basic_memory/models/base.py,sha256=SnOpuFxcw7QoLxXpmZ1NUoj1jEJKCXEWQqTIrXjJ3Z4,286
40
40
  basic_memory/models/knowledge.py,sha256=F2vfKalqfqumUlASN22QnPzaOym5MahzZ3sAACE3y9Y,6792
41
41
  basic_memory/models/search.py,sha256=iO1sgBiS1aVCts2EGfjys0i09-1_snxXs2pZNfK6Ojw,1163
42
42
  basic_memory/repository/__init__.py,sha256=Q1T0Qn1AcyUWLpPrFcfdEa3A1xUkAzt63tgv5U59DpI,241
@@ -44,30 +44,31 @@ basic_memory/repository/entity_repository.py,sha256=Nn_ZS4K2cakMD_LVGJfGqQ-0SZ2W
44
44
  basic_memory/repository/observation_repository.py,sha256=BOcy4wARqCXu-thYyt7mPxt2A2C8TW0le3s_X9wrK6I,1701
45
45
  basic_memory/repository/relation_repository.py,sha256=mHZj3Uhapm9OG7NyTldIspJ7BdNKXKKjJD1lextQKGk,3234
46
46
  basic_memory/repository/repository.py,sha256=UCMy7VXjtkxkKCI3ZuQm4_RFRKJT0NBDhEvt_ueqjzc,12945
47
- basic_memory/repository/search_repository.py,sha256=b4mV0MA1EgCzfO0Q4PI2-kh-POW32O0QG2ReYgNkShQ,9190
47
+ basic_memory/repository/search_repository.py,sha256=Q0v8MIsyQS_M9WD6mHIyRwFlMGanjgkBIAEGEbPR6J8,9426
48
48
  basic_memory/schemas/__init__.py,sha256=m1Pou5ue1BNmHBm13WPBf3BJKKPsLaIYVnnGmgs2iwo,1618
49
- basic_memory/schemas/base.py,sha256=9--f_lOqi5XGyzWOAi3wlPRwIh-RyYVIASQXqTsS0Ps,6611
49
+ basic_memory/schemas/base.py,sha256=4O_uxXX_JDpMqPNk7jXduA3Ut3Uz1wjmrf27JlkI-e8,6694
50
50
  basic_memory/schemas/delete.py,sha256=_tSyTHAujVxkSUy5Cu3s6yHw-n3JmokjeMR6gZqJhG4,1198
51
51
  basic_memory/schemas/discovery.py,sha256=KtumdsujakYrl2rpX3bgIN-sK3826Cy_58nhq3vnl78,872
52
- basic_memory/schemas/memory.py,sha256=y8oNys2e2NiiXmczqY21fSGEd3MOFBCSY3uiFxtaObQ,2818
52
+ basic_memory/schemas/memory.py,sha256=TPT1Lhsxk6Y1tuisx6XidcC2We_DdZxaNrvF2fidvNw,2909
53
53
  basic_memory/schemas/request.py,sha256=Cpz0cR5P-QdR9PAUapGfAxXhdooeVCH6X2G7MoOWMvw,2006
54
54
  basic_memory/schemas/response.py,sha256=7oWk3GDS626pdgN2MF__tp9c7WU-_9K7hs1F2quB65Y,6226
55
55
  basic_memory/schemas/search.py,sha256=7xlUc0HE13-v7iKy3eFs0IKasGbXVxCaq8GZ8qiUBTQ,3395
56
- basic_memory/services/__init__.py,sha256=zEhDyV6-hCbx3Y3axmbnD0iYk-l0sbQMVV9f-3wQ8is,212
57
- basic_memory/services/context_service.py,sha256=CXoQEFTHP6ftRauiIsNB300dDGeuGAJmxwBwUw3D4gs,8077
58
- basic_memory/services/entity_service.py,sha256=zOU7fWBAOd8Yi0S_7FONDLK3natIRxnoswi6axivsJo,10642
56
+ basic_memory/services/__init__.py,sha256=5yx4U7iCi5gLjHxmkjeQ9JJoftWqy6P2gX2uV3ouMd0,279
57
+ basic_memory/services/context_service.py,sha256=9DWryOhHfowelk4JVNIAlOycjblocTw38FSEP2kDkGI,8095
58
+ basic_memory/services/database_service.py,sha256=WIyGEC4B8v5Z0_XdzkfVACBhtSmjn-ch0JbFzP8giOo,5665
59
+ basic_memory/services/entity_service.py,sha256=Lh63SEt-PCwGgazMx-KIVz-oEsNqX1JC7ktWZtvrVWw,12594
59
60
  basic_memory/services/exceptions.py,sha256=Z9cizi05f7QBY4HX6c0ywfzKk0_sie3283CP7gzy-dY,287
60
- basic_memory/services/file_service.py,sha256=8iMjEGNdKDiFgJB-Eo5wzTfcnCJ5-plO4ZSVecHYcI0,7191
61
+ basic_memory/services/file_service.py,sha256=oiS33BhD5zs7YgF6vMAgAvBBkHiLbUJ6g2cvN2JwymA,7166
61
62
  basic_memory/services/link_resolver.py,sha256=0OiWN8_m2niVBi5oUNss5nRFqIUTa1Qe1LmH8-oY64Y,4492
62
63
  basic_memory/services/search_service.py,sha256=yLXYs-PNimELM_5E44O25-fbD4PDzISsAwCm2dNPyQI,7842
63
64
  basic_memory/services/service.py,sha256=oHsHKMTC2ojRsxeNdnC4nA5YdTL72VYjDzWI_dbmzyA,1134
64
65
  basic_memory/sync/__init__.py,sha256=5BzfbvY-DKi-gswcjNzVqtNj4I0yXZ82CaupFiPihws,138
65
66
  basic_memory/sync/file_change_scanner.py,sha256=x2xFaxCzPy5seNLqK-TcN106U2--UKvAR7qoBeq8M84,5919
66
- basic_memory/sync/sync_service.py,sha256=ay8IbUOM_40QbUNJ6Ar5uIZCQbUmyqCXE2ThGVhqrtY,6010
67
+ basic_memory/sync/sync_service.py,sha256=Her8oQxRXuQkxAK1f_EhN9uQXDIq_KRkBNX9PMucXdc,7229
67
68
  basic_memory/sync/utils.py,sha256=6P5-dvR5X-lA-BE3IZOzoC54uyiq9c_p9figRKaPq5E,2453
68
69
  basic_memory/sync/watch_service.py,sha256=HIronKujbBTbbosz0HAqLBLkP5IK3zH6gQKoTCrrA9o,6744
69
- basic_memory-0.0.0.dist-info/METADATA,sha256=SUgx7QVHSq0yGhFEPtvBhEXyuLGX9gWNmxFJaT8Cv60,2335
70
- basic_memory-0.0.0.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
71
- basic_memory-0.0.0.dist-info/entry_points.txt,sha256=IDQa_VmVTzmvMrpnjhEfM0S3F--XsVGEj3MpdJfuo-Q,59
72
- basic_memory-0.0.0.dist-info/licenses/LICENSE,sha256=hIahDEOTzuHCU5J2nd07LWwkLW7Hko4UFO__ffsvB-8,34523
73
- basic_memory-0.0.0.dist-info/RECORD,,
70
+ basic_memory-0.1.1.dist-info/METADATA,sha256=4ooHFh_c3uKUWIeLJn5JuH5ICrzZ7DOBpHGhyzqxud8,7771
71
+ basic_memory-0.1.1.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
72
+ basic_memory-0.1.1.dist-info/entry_points.txt,sha256=IDQa_VmVTzmvMrpnjhEfM0S3F--XsVGEj3MpdJfuo-Q,59
73
+ basic_memory-0.1.1.dist-info/licenses/LICENSE,sha256=hIahDEOTzuHCU5J2nd07LWwkLW7Hko4UFO__ffsvB-8,34523
74
+ basic_memory-0.1.1.dist-info/RECORD,,
@@ -1,38 +0,0 @@
1
- """Initialize command for basic-memory CLI."""
2
-
3
- import asyncio
4
- from pathlib import Path
5
-
6
- import typer
7
- from loguru import logger
8
-
9
- from basic_memory.cli.app import app
10
- from basic_memory.db import engine_session_factory, DatabaseType
11
- from basic_memory.config import config
12
-
13
-
14
- async def _init(force: bool = False):
15
- """Initialize the database."""
16
- db_path = config.database_path
17
-
18
- if db_path.exists() and not force:
19
- typer.echo(f"Database already exists at {db_path}. Use --force to reinitialize.")
20
- raise typer.Exit(1)
21
-
22
- # Create data directory if needed
23
- db_path.parent.mkdir(parents=True, exist_ok=True)
24
-
25
- try:
26
- async with engine_session_factory(db_path, db_type=DatabaseType.FILESYSTEM, init=True):
27
- typer.echo(f"Initialized database at {db_path}")
28
- except Exception as e:
29
- logger.error(f"Error initializing database: {e}")
30
- typer.echo(f"Error initializing database: {e}")
31
- raise typer.Exit(1)
32
-
33
- @app.command()
34
- def init(
35
- force: bool = typer.Option(False, "--force", "-f", help="Force reinitialization if database exists")
36
- ):
37
- """Initialize a new basic-memory database."""
38
- asyncio.run(_init(force))
@@ -1,71 +0,0 @@
1
- Metadata-Version: 2.4
2
- Name: basic-memory
3
- Version: 0.0.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: basic-foundation
14
- Requires-Dist: dateparser>=1.2.0
15
- Requires-Dist: greenlet>=3.1.1
16
- Requires-Dist: icecream>=2.1.3
17
- Requires-Dist: loguru>=0.7.3
18
- Requires-Dist: markdown-it-py>=3.0.0
19
- Requires-Dist: mcp>=1.2.0
20
- Requires-Dist: pydantic-settings>=2.6.1
21
- Requires-Dist: pydantic[email,timezone]>=2.10.3
22
- Requires-Dist: pyright>=1.1.390
23
- Requires-Dist: python-frontmatter>=1.1.0
24
- Requires-Dist: pyyaml>=6.0.1
25
- Requires-Dist: rich>=13.9.4
26
- Requires-Dist: sqlalchemy>=2.0.0
27
- Requires-Dist: typer>=0.9.0
28
- Requires-Dist: unidecode>=1.3.8
29
- Requires-Dist: watchfiles>=1.0.4
30
- Provides-Extra: dev
31
- Requires-Dist: pytest-asyncio>=0.24.0; extra == 'dev'
32
- Requires-Dist: pytest-cov>=4.1.0; extra == 'dev'
33
- Requires-Dist: pytest-mock>=3.12.0; extra == 'dev'
34
- Requires-Dist: pytest>=8.3.4; extra == 'dev'
35
- Requires-Dist: ruff>=0.1.6; extra == 'dev'
36
- Description-Content-Type: text/markdown
37
-
38
- # Basic Memory
39
-
40
- > Local-first knowledge management combining Zettelkasten with knowledge graphs.
41
-
42
- Basic Memory helps you capture and explore information the way your brain naturally works - across multiple dimensions and perspectives. Built on open standards and powered by proven technology, it's ready for the future of human-AI collaboration.
43
-
44
- ## Features
45
-
46
- - Local-first design - your files stay yours
47
- - Knowledge graph with natural relations
48
- - Markdown files with automatic parsing
49
- - Rich context building and search
50
- - Native AI integration via MCP protocol
51
-
52
- ## Quick Start
53
-
54
- ```bash
55
- pip install basic-memory
56
- ```
57
-
58
- Initialize a new knowledge base:
59
- ```bash
60
- basic-memory init my-knowledge
61
- cd my-knowledge
62
- basic-memory status
63
- ```
64
-
65
- ## Contributing
66
-
67
- Basic Memory is open source (AGPL-3.0) and welcomes contributions. See our [Contributing Guide](CONTRIBUTING.md) for details.
68
-
69
- ## License
70
-
71
- AGPL-3.0 - See [LICENSE](LICENSE) for details.