basic-memory 0.9.0__py3-none-any.whl → 0.10.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.

@@ -0,0 +1,398 @@
1
+ Metadata-Version: 2.4
2
+ Name: basic-memory
3
+ Version: 0.10.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: pillow>=11.1.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
+ [![License: AGPL v3](https://img.shields.io/badge/License-AGPL_v3-blue.svg)](https://www.gnu.org/licenses/agpl-3.0)
36
+ [![PyPI version](https://badge.fury.io/py/basic-memory.svg)](https://badge.fury.io/py/basic-memory)
37
+ [![Python 3.12+](https://img.shields.io/badge/python-3.12+-blue.svg)](https://www.python.org/downloads/)
38
+ [![Tests](https://github.com/basicmachines-co/basic-memory/workflows/Tests/badge.svg)](https://github.com/basicmachines-co/basic-memory/actions)
39
+ [![Ruff](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/v2.json)](https://github.com/astral-sh/ruff)
40
+ ![](https://badge.mcpx.dev?type=server 'MCP Server')
41
+ ![](https://badge.mcpx.dev?type=dev 'MCP Dev')
42
+ [![smithery badge](https://smithery.ai/badge/@basicmachines-co/basic-memory)](https://smithery.ai/server/@basicmachines-co/basic-memory)
43
+
44
+ # Basic Memory
45
+
46
+ Basic Memory lets you build persistent knowledge through natural conversations with Large Language Models (LLMs) like
47
+ Claude, while keeping everything in simple Markdown files on your computer. It uses the Model Context Protocol (MCP) to
48
+ enable any compatible LLM to read and write to your local knowledge base.
49
+
50
+ - Website: http://basicmachines.co
51
+ - Documentation: http://memory.basicmachines.co
52
+
53
+ ## Pick up your conversation right where you left off
54
+
55
+ - AI assistants can load context from local files in a new conversation
56
+ - Notes are saved locally as Markdown files in real time
57
+ - No project knowledge or special prompting required
58
+
59
+ https://github.com/user-attachments/assets/a55d8238-8dd0-454a-be4c-8860dbbd0ddc
60
+
61
+ ## Quick Start
62
+
63
+ ```bash
64
+ # Install with uv (recommended)
65
+ uv tool install basic-memory
66
+
67
+ # Configure Claude Desktop (edit ~/Library/Application Support/Claude/claude_desktop_config.json)
68
+ # Add this to your config:
69
+ {
70
+ "mcpServers": {
71
+ "basic-memory": {
72
+ "command": "uvx",
73
+ "args": [
74
+ "basic-memory",
75
+ "mcp"
76
+ ]
77
+ }
78
+ }
79
+ }
80
+ # Now in Claude Desktop, you can:
81
+ # - Write notes with "Create a note about coffee brewing methods"
82
+ # - Read notes with "What do I know about pour over coffee?"
83
+ # - Search with "Find information about Ethiopian beans"
84
+
85
+ ```
86
+
87
+ You can view shared context via files in `~/basic-memory` (default directory location).
88
+
89
+ ### Alternative Installation via Smithery
90
+
91
+ You can use [Smithery](https://smithery.ai/server/@basicmachines-co/basic-memory) to automatically configure Basic
92
+ Memory for Claude Desktop:
93
+
94
+ ```bash
95
+ npx -y @smithery/cli install @basicmachines-co/basic-memory --client claude
96
+ ```
97
+
98
+ This installs and configures Basic Memory without requiring manual edits to the Claude Desktop configuration file. The
99
+ Smithery server hosts the MCP server component, while your data remains stored locally as Markdown files.
100
+
101
+ ### Glama.ai
102
+
103
+ <a href="https://glama.ai/mcp/servers/o90kttu9ym">
104
+ <img width="380" height="200" src="https://glama.ai/mcp/servers/o90kttu9ym/badge" alt="basic-memory MCP server" />
105
+ </a>
106
+
107
+ ## Why Basic Memory?
108
+
109
+ Most LLM interactions are ephemeral - you ask a question, get an answer, and everything is forgotten. Each conversation
110
+ starts fresh, without the context or knowledge from previous ones. Current workarounds have limitations:
111
+
112
+ - Chat histories capture conversations but aren't structured knowledge
113
+ - RAG systems can query documents but don't let LLMs write back
114
+ - Vector databases require complex setups and often live in the cloud
115
+ - Knowledge graphs typically need specialized tools to maintain
116
+
117
+ Basic Memory addresses these problems with a simple approach: structured Markdown files that both humans and LLMs can
118
+ read
119
+ and write to. The key advantages:
120
+
121
+ - **Local-first:** All knowledge stays in files you control
122
+ - **Bi-directional:** Both you and the LLM read and write to the same files
123
+ - **Structured yet simple:** Uses familiar Markdown with semantic patterns
124
+ - **Traversable knowledge graph:** LLMs can follow links between topics
125
+ - **Standard formats:** Works with existing editors like Obsidian
126
+ - **Lightweight infrastructure:** Just local files indexed in a local SQLite database
127
+
128
+ With Basic Memory, you can:
129
+
130
+ - Have conversations that build on previous knowledge
131
+ - Create structured notes during natural conversations
132
+ - Have conversations with LLMs that remember what you've discussed before
133
+ - Navigate your knowledge graph semantically
134
+ - Keep everything local and under your control
135
+ - Use familiar tools like Obsidian to view and edit notes
136
+ - Build a personal knowledge base that grows over time
137
+
138
+ ## How It Works in Practice
139
+
140
+ Let's say you're exploring coffee brewing methods and want to capture your knowledge. Here's how it works:
141
+
142
+ 1. Start by chatting normally:
143
+
144
+ ```
145
+ I've been experimenting with different coffee brewing methods. Key things I've learned:
146
+
147
+ - Pour over gives more clarity in flavor than French press
148
+ - Water temperature is critical - around 205°F seems best
149
+ - Freshly ground beans make a huge difference
150
+ ```
151
+
152
+ ... continue conversation.
153
+
154
+ 2. Ask the LLM to help structure this knowledge:
155
+
156
+ ```
157
+ "Let's write a note about coffee brewing methods."
158
+ ```
159
+
160
+ LLM creates a new Markdown file on your system (which you can see instantly in Obsidian or your editor):
161
+
162
+ ```markdown
163
+ ---
164
+ title: Coffee Brewing Methods
165
+ permalink: coffee-brewing-methods
166
+ tags:
167
+ - coffee
168
+ - brewing
169
+ ---
170
+
171
+ # Coffee Brewing Methods
172
+
173
+ ## Observations
174
+
175
+ - [method] Pour over provides more clarity and highlights subtle flavors
176
+ - [technique] Water temperature at 205°F (96°C) extracts optimal compounds
177
+ - [principle] Freshly ground beans preserve aromatics and flavor
178
+
179
+ ## Relations
180
+
181
+ - relates_to [[Coffee Bean Origins]]
182
+ - requires [[Proper Grinding Technique]]
183
+ - affects [[Flavor Extraction]]
184
+ ```
185
+
186
+ The note embeds semantic content and links to other topics via simple Markdown formatting.
187
+
188
+ 3. You see this file on your computer in real time in the current project directory (default `~/$HOME/basic-memory`).
189
+
190
+ - Realtime sync can be enabled via running `basic-memory sync --watch`
191
+
192
+ 4. In a chat with the LLM, you can reference a topic:
193
+
194
+ ```
195
+ Look at `coffee-brewing-methods` for context about pour over coffee
196
+ ```
197
+
198
+ The LLM can now build rich context from the knowledge graph. For example:
199
+
200
+ ```
201
+ Following relation 'relates_to [[Coffee Bean Origins]]':
202
+ - Found information about Ethiopian Yirgacheffe
203
+ - Notes on Colombian beans' nutty profile
204
+ - Altitude effects on bean characteristics
205
+
206
+ Following relation 'requires [[Proper Grinding Technique]]':
207
+ - Burr vs. blade grinder comparisons
208
+ - Grind size recommendations for different methods
209
+ - Impact of consistent particle size on extraction
210
+ ```
211
+
212
+ Each related document can lead to more context, building a rich semantic understanding of your knowledge base.
213
+
214
+ This creates a two-way flow where:
215
+
216
+ - Humans write and edit Markdown files
217
+ - LLMs read and write through the MCP protocol
218
+ - Sync keeps everything consistent
219
+ - All knowledge stays in local files.
220
+
221
+ ## Technical Implementation
222
+
223
+ Under the hood, Basic Memory:
224
+
225
+ 1. Stores everything in Markdown files
226
+ 2. Uses a SQLite database for searching and indexing
227
+ 3. Extracts semantic meaning from simple Markdown patterns
228
+ - Files become `Entity` objects
229
+ - Each `Entity` can have `Observations`, or facts associated with it
230
+ - `Relations` connect entities together to form the knowledge graph
231
+ 4. Maintains the local knowledge graph derived from the files
232
+ 5. Provides bidirectional synchronization between files and the knowledge graph
233
+ 6. Implements the Model Context Protocol (MCP) for AI integration
234
+ 7. Exposes tools that let AI assistants traverse and manipulate the knowledge graph
235
+ 8. Uses memory:// URLs to reference entities across tools and conversations
236
+
237
+ The file format is just Markdown with some simple markup:
238
+
239
+ Each Markdown file has:
240
+
241
+ ### Frontmatter
242
+
243
+ ```markdown
244
+ title: <Entity title>
245
+ type: <The type of Entity> (e.g. note)
246
+ permalink: <a uri slug>
247
+
248
+ - <optional metadata> (such as tags)
249
+ ```
250
+
251
+ ### Observations
252
+
253
+ Observations are facts about a topic.
254
+ They can be added by creating a Markdown list with a special format that can reference a `category`, `tags` using a
255
+ "#" character, and an optional `context`.
256
+
257
+ Observation Markdown format:
258
+
259
+ ```markdown
260
+ - [category] content #tag (optional context)
261
+ ```
262
+
263
+ Examples of observations:
264
+
265
+ ```markdown
266
+ - [method] Pour over extracts more floral notes than French press
267
+ - [tip] Grind size should be medium-fine for pour over #brewing
268
+ - [preference] Ethiopian beans have bright, fruity flavors (especially from Yirgacheffe)
269
+ - [fact] Lighter roasts generally contain more caffeine than dark roasts
270
+ - [experiment] Tried 1:15 coffee-to-water ratio with good results
271
+ - [resource] James Hoffman's V60 technique on YouTube is excellent
272
+ - [question] Does water temperature affect extraction of different compounds differently?
273
+ - [note] My favorite local shop uses a 30-second bloom time
274
+ ```
275
+
276
+ ### Relations
277
+
278
+ Relations are links to other topics. They define how entities connect in the knowledge graph.
279
+
280
+ Markdown format:
281
+
282
+ ```markdown
283
+ - relation_type [[WikiLink]] (optional context)
284
+ ```
285
+
286
+ Examples of relations:
287
+
288
+ ```markdown
289
+ - pairs_well_with [[Chocolate Desserts]]
290
+ - grown_in [[Ethiopia]]
291
+ - contrasts_with [[Tea Brewing Methods]]
292
+ - requires [[Burr Grinder]]
293
+ - improves_with [[Fresh Beans]]
294
+ - relates_to [[Morning Routine]]
295
+ - inspired_by [[Japanese Coffee Culture]]
296
+ - documented_in [[Coffee Journal]]
297
+ ```
298
+
299
+ ## Using with Claude Desktop
300
+
301
+ Basic Memory is built using the MCP (Model Context Protocol) and works with the Claude desktop app (https://claude.ai/):
302
+
303
+ 1. Configure Claude Desktop to use Basic Memory:
304
+
305
+ Edit your MCP configuration file (usually located at `~/Library/Application Support/Claude/claude_desktop_config.json`
306
+ for OS X):
307
+
308
+ ```json
309
+ {
310
+ "mcpServers": {
311
+ "basic-memory": {
312
+ "command": "uvx",
313
+ "args": [
314
+ "basic-memory",
315
+ "mcp"
316
+ ]
317
+ }
318
+ }
319
+ }
320
+ ```
321
+
322
+ If you want to use a specific project (see [Multiple Projects](#multiple-projects) below), update your Claude Desktop
323
+ config:
324
+
325
+ ```json
326
+ {
327
+ "mcpServers": {
328
+ "basic-memory": {
329
+ "command": "uvx",
330
+ "args": [
331
+ "basic-memory",
332
+ "mcp",
333
+ "--project",
334
+ "your-project-name"
335
+ ]
336
+ }
337
+ }
338
+ }
339
+ ```
340
+
341
+ 2. Sync your knowledge:
342
+
343
+ ```bash
344
+ # One-time sync of local knowledge updates
345
+ basic-memory sync
346
+
347
+ # Run realtime sync process (recommended)
348
+ basic-memory sync --watch
349
+ ```
350
+
351
+ 3. In Claude Desktop, the LLM can now use these tools:
352
+
353
+ ```
354
+ write_note(title, content, folder, tags) - Create or update notes
355
+ read_note(identifier, page, page_size) - Read notes by title or permalink
356
+ build_context(url, depth, timeframe) - Navigate knowledge graph via memory:// URLs
357
+ search(query, page, page_size) - Search across your knowledge base
358
+ recent_activity(type, depth, timeframe) - Find recently updated information
359
+ canvas(nodes, edges, title, folder) - Generate knowledge visualizations
360
+ ```
361
+
362
+ 5. Example prompts to try:
363
+
364
+ ```
365
+ "Create a note about our project architecture decisions"
366
+ "Find information about JWT authentication in my notes"
367
+ "Create a canvas visualization of my project components"
368
+ "Read my notes on the authentication system"
369
+ "What have I been working on in the past week?"
370
+ ```
371
+
372
+ ## Futher info
373
+
374
+ See the [Documentation](https://memory.basicmachines.co/) for more info, including:
375
+
376
+ - [Complete User Guide](https://memory.basicmachines.co/docs/user-guide)
377
+ - [CLI tools](https://memory.basicmachines.co/docs/cli-reference)
378
+ - [Managing multiple Projects](https://memory.basicmachines.co/docs/cli-reference#project)
379
+ - [Importing data from OpenAI/Claude Projects](https://memory.basicmachines.co/docs/cli-reference#import)
380
+
381
+ ## License
382
+
383
+ AGPL-3.0
384
+
385
+ Contributions are welcome. See the [Contributing](CONTRIBUTING.md) guide for info about setting up the project locally
386
+ and submitting PRs.
387
+
388
+ ## Star History
389
+
390
+ <a href="https://www.star-history.com/#basicmachines-co/basic-memory&Date">
391
+ <picture>
392
+ <source media="(prefers-color-scheme: dark)" srcset="https://api.star-history.com/svg?repos=basicmachines-co/basic-memory&type=Date&theme=dark" />
393
+ <source media="(prefers-color-scheme: light)" srcset="https://api.star-history.com/svg?repos=basicmachines-co/basic-memory&type=Date" />
394
+ <img alt="Star History Chart" src="https://api.star-history.com/svg?repos=basicmachines-co/basic-memory&type=Date" />
395
+ </picture>
396
+ </a>
397
+
398
+ Built with ♥️ by Basic Machines
@@ -1,9 +1,9 @@
1
- basic_memory/__init__.py,sha256=0_LT1EXC7q97Yg06x_HyIbgFHRqZg8II59ADHFmFcrc,122
2
- basic_memory/config.py,sha256=uJ3s5Hka7rKVMDhKXMJhtxdwZHPfSVape7a4ySkJhws,7644
1
+ basic_memory/__init__.py,sha256=1fDmXe64nAOzDOpG-Ekxh0NJVffTMyGSW3sxqA1XBvY,123
2
+ basic_memory/config.py,sha256=PHUrzwjJSHab691mzShz5uZ-uuJyXcznnXA8kjD-wJU,7659
3
3
  basic_memory/db.py,sha256=UDWBr52u7oBT4aXputhAG_Prmsv5og00sYVzPmaylhk,6026
4
4
  basic_memory/deps.py,sha256=yI6RL_5-8LXw7ywSJ_84BXAczDtv2h9GFLw-E9XDJFg,5770
5
- basic_memory/file_utils.py,sha256=6pcqhBXSp7r_KogLWx8HUUaWCWdoIsSJnM7psD92f-c,6604
6
- basic_memory/utils.py,sha256=EPumxT4HkprZG9BzWZnym3teOjn24Vm3lgncQADN5ew,3764
5
+ basic_memory/file_utils.py,sha256=csvij8o_j14A-rr8NTDeH6pUaI4DdBqNAWJIVc5r4A0,6658
6
+ basic_memory/utils.py,sha256=0EfSx_PiTtFkWIDN2wic9nTPIH35B4fddT-GWi8aVsk,4553
7
7
  basic_memory/alembic/alembic.ini,sha256=IEZsnF8CbbZnkwBr67LzKKNobHuzTaQNUvM8Psop5xc,3733
8
8
  basic_memory/alembic/env.py,sha256=GyQpEpQu84flqAdelxR0-H9nbkHrVoCboYGfmltBDoA,2737
9
9
  basic_memory/alembic/migrations.py,sha256=lriHPXDdBLSNXEW3QTpU0SJKuVd1V-8NrVkpN3qfsUQ,718
@@ -17,40 +17,40 @@ basic_memory/api/app.py,sha256=NLcNpfNzVz4pgtbjaZUHTvRCqay16J_G4K1ok9DMDCU,1516
17
17
  basic_memory/api/routers/__init__.py,sha256=SKuL-weA58hYj0NOMCQRfmsaumlNjjyVHDXNpRO38bQ,305
18
18
  basic_memory/api/routers/knowledge_router.py,sha256=iYuBguMb6ERitAwoelSejBYJqLTGfjpkzAHrqwTKjVE,5876
19
19
  basic_memory/api/routers/memory_router.py,sha256=W_uHJe2c4XN96mFj6XNvUH6INVbl1BMxy0KUchLcbxU,5421
20
- basic_memory/api/routers/project_info_router.py,sha256=Heoz4mHaAeWQYDMsStk4fpwkVNmBlGh9XVbuJMpyGik,9015
20
+ basic_memory/api/routers/project_info_router.py,sha256=Qv12_QL3SRpo7bPcpAjizJmkZEVm5h5tyjrf-qIiRl0,9030
21
21
  basic_memory/api/routers/resource_router.py,sha256=WEJEqEaY_yTKj5-U-rW4kXQKUcJflykgwI6_g_R41ck,8058
22
22
  basic_memory/api/routers/search_router.py,sha256=R_a5OF5_8rCjmoOMhmw3M4VLCy6I1KLGJ-otSLB0rbI,1953
23
23
  basic_memory/cli/__init__.py,sha256=arcKLAWRDhPD7x5t80MlviZeYzwHZ0GZigyy3NKVoGk,33
24
24
  basic_memory/cli/app.py,sha256=J4mkWnxbevOYmJwwRMx344olGOxoXq0o4RNG6DMQLKE,1804
25
25
  basic_memory/cli/main.py,sha256=9uwxOUc4mDeTeZCEWyJh7X5PzPXG1fva2veV2OPbFtg,1442
26
- basic_memory/cli/commands/__init__.py,sha256=aBihwtUFs0MpsxCed74A5fYoxFmJA4NOVXPRrVY4lnw,427
26
+ basic_memory/cli/commands/__init__.py,sha256=3oojcC-Y-4RPqff9vtwWziT_T4uvBVicL0pSHNilVkU,393
27
27
  basic_memory/cli/commands/db.py,sha256=UL3JXGJrLzKZ-uRwgk6p0kbRznBy5x7keirvweVGNvY,754
28
- basic_memory/cli/commands/import_chatgpt.py,sha256=bGKHz5pFD-oabaeeSqylHBcr9hnF4CzUqEIaFyRwpPE,8147
29
- basic_memory/cli/commands/import_claude_conversations.py,sha256=Ba97fH5yfW642yrkxay3YkyDdgIYCeru-MUIZfEGblo,6812
30
- basic_memory/cli/commands/import_claude_projects.py,sha256=GePfhEMstD97EIGoM8vJMmwDCnYfh1PjZH7DNcqzdqA,6634
28
+ basic_memory/cli/commands/import_chatgpt.py,sha256=M4_oUN9o_BaW5jpKQu2pTEybivB5ccVolhdZzmhLOsI,8162
29
+ basic_memory/cli/commands/import_claude_conversations.py,sha256=D_4-0xFKkZka7xFvvW8OkgjLv3TFqsC_VuB2Z-Y3avU,6827
30
+ basic_memory/cli/commands/import_claude_projects.py,sha256=KzUuf3wrlvJlqTWCzoLRrNxD3OYNteRXaTFj5IB1FA8,6649
31
31
  basic_memory/cli/commands/import_memory_json.py,sha256=zqpU4eCzQXx04aRsigddJAyhvklmTgSAzeRTuEdNw0c,5194
32
32
  basic_memory/cli/commands/mcp.py,sha256=ue_zDA8w0zZZToHLvu56s8hWkalgZsC64CfTyXX6z2I,715
33
- basic_memory/cli/commands/project.py,sha256=vEPv34Grn8DGwP8Ig9xcFWeVW0cro_Qyfq2TU22pcQQ,4103
34
- basic_memory/cli/commands/project_info.py,sha256=2XFe0eONsJ-FOmiOO6faYAS9AgX7Dmj4HNeTTrUr0ZE,7099
33
+ basic_memory/cli/commands/project.py,sha256=BSjdz07xDM3R4CUXggv1qhrWLJsEgvGFir6aOUzdr2Q,11330
35
34
  basic_memory/cli/commands/status.py,sha256=nbs3myxaNtehEEJ4BBngPuKs-vqZTHNCCb0bTgDsE-s,5277
36
35
  basic_memory/cli/commands/sync.py,sha256=JxGJA6b7Qksz0ZKonHfB3s--7qzY7eWeLogPX8tR1pY,8351
37
- basic_memory/cli/commands/tool.py,sha256=DjoB4slhmzfCjIgom1-xBP6sRl_gy7PrhGtQk3rNAqM,8855
36
+ basic_memory/cli/commands/tool.py,sha256=JG_G4vG_gWLM4PkDXwl89vYwOLSeGDrTb2h0dswQCkE,9075
38
37
  basic_memory/markdown/__init__.py,sha256=DdzioCWtDnKaq05BHYLgL_78FawEHLpLXnp-kPSVfIc,501
39
- basic_memory/markdown/entity_parser.py,sha256=LnjG_wg38LVN8JndsZJV2UVGPIaoIV5sGs94iQ9PL6k,3781
40
- basic_memory/markdown/markdown_processor.py,sha256=mV3pYoDTaQMEl1tA5n_XztBvNlYyH2SzKs4vnKdAet4,4952
38
+ basic_memory/markdown/entity_parser.py,sha256=Pc6hTm9TB5SRW_ghf7WD-UMjEgOPyc8j8tgCtxEWfLQ,3893
39
+ basic_memory/markdown/markdown_processor.py,sha256=S5ny69zu2dlqO7tWJoLrpLSzg8emQIDq7Du7olpJUsk,4968
41
40
  basic_memory/markdown/plugins.py,sha256=gtIzKRjoZsyvBqLpVNnrmzl_cbTZ5ZGn8kcuXxQjRko,6639
42
- basic_memory/markdown/schemas.py,sha256=mzVEDUhH98kwETMknjkKw5H697vg_zUapsJkJVi17ho,1894
41
+ basic_memory/markdown/schemas.py,sha256=eyxYCr1hVyWmImcle0asE5It_DD6ARkqaBZYu1KK5n4,1896
43
42
  basic_memory/markdown/utils.py,sha256=zlHlUtrnXaUCnsaPNJzR0wlhg2kB1YbXx0DMvs-snJM,2973
44
43
  basic_memory/mcp/__init__.py,sha256=dsDOhKqjYeIbCULbHIxfcItTbqudEuEg1Np86eq0GEQ,35
45
44
  basic_memory/mcp/async_client.py,sha256=Eo345wANiBRSM4u3j_Vd6Ax4YtMg7qbWd9PIoFfj61I,236
46
45
  basic_memory/mcp/main.py,sha256=0kbcyf1PxRC1bLnHv2zzParfJ6cOq7Am9ScF9UoI50U,703
47
46
  basic_memory/mcp/server.py,sha256=VGv0uWma6JGkT6Y_GESYGhGMYfPavkhEKlCNza8bvtY,287
48
47
  basic_memory/mcp/prompts/__init__.py,sha256=-Bl9Dgj2TD9PULjzggPqXuvPEjWCRy7S9Yg03h2-U7A,615
49
- basic_memory/mcp/prompts/ai_assistant_guide.py,sha256=dgPdpC_WR88-ex4aMpAIC6TMZyZD3rgKyUu8qkSNIzw,824
48
+ basic_memory/mcp/prompts/ai_assistant_guide.py,sha256=8TI5xObiRVcwv6w9by1xQHlX0whvyE7-LGsiqDMRTFg,821
50
49
  basic_memory/mcp/prompts/continue_conversation.py,sha256=zb_3cOaO7NMFuStBkJDlMstQZqz1RCOYl6txwaHYM_Q,4424
51
50
  basic_memory/mcp/prompts/recent_activity.py,sha256=7607MWiGJWY0vPurhVII17LxLZlXY_zmH3xH9LfT6SY,2793
52
51
  basic_memory/mcp/prompts/search.py,sha256=nCz5wPxTszJLNQJ1CE7CIhnamy08EpGLQjoBMlXRRNc,6283
53
52
  basic_memory/mcp/prompts/utils.py,sha256=u_bG8DMtMMERvGPJfA3gbl5VAs0xmkuK8ZJBkY8xyV8,5371
53
+ basic_memory/mcp/resources/ai_assistant_guide.md,sha256=EIMQlESWX1pZ19Ia3jMuodW44aCM8u8l78vQlwvPwfs,14747
54
54
  basic_memory/mcp/tools/__init__.py,sha256=mp8BiY-2YY5zzGBAIbf9hMCQM6uhDtst3eq1ApR2p2s,870
55
55
  basic_memory/mcp/tools/build_context.py,sha256=8xYRPpeYCEU8F9Dv_ctvbunZ8ciKwmFu9i8Pdv5vYfI,2891
56
56
  basic_memory/mcp/tools/canvas.py,sha256=fHC90eshnSSmROTBV-tBB-FSuXSpYVj_BcDrc96pWi0,2993
@@ -59,9 +59,9 @@ basic_memory/mcp/tools/project_info.py,sha256=pyoHpOMhjMIvZFku2iEIpXc2XDtbnNeb-O
59
59
  basic_memory/mcp/tools/read_content.py,sha256=PKnvLzNmHfzoIxRKXNaYW5P5q0d1azVwG9juPXPYeQo,8148
60
60
  basic_memory/mcp/tools/read_note.py,sha256=pM6FUxMdDxxCNxhnDrkrVqIJouIRPbUqSHsL3BVgiy8,6469
61
61
  basic_memory/mcp/tools/recent_activity.py,sha256=S0LgIk9RaeYzIsi2FIHs0KK7R1K-LJy3QaSokGlY9ew,3501
62
- basic_memory/mcp/tools/search.py,sha256=0PcLCpXe73X72jSudVLVMO8TQwEjnB6F1V9jCtjf2ZE,2999
62
+ basic_memory/mcp/tools/search.py,sha256=zyIcPC2z9485FFcJCnWi7Rv-RIG_BTRo8jS7d03rB3s,2978
63
63
  basic_memory/mcp/tools/utils.py,sha256=tOWklfSlDcoAJCRBmxkCVwkTY_TDBa5vOGxzU8J5eiQ,13636
64
- basic_memory/mcp/tools/write_note.py,sha256=CdUdFitmuDQl8z36IqrbSB0hSEdw20k_ZIXnpV_KDSc,4374
64
+ basic_memory/mcp/tools/write_note.py,sha256=Z2z92pHb74-uLzahY2Cz5Kj8kGikS4VSWPZ1I1rGy1U,4942
65
65
  basic_memory/models/__init__.py,sha256=Bf0xXV_ryndogvZDiVM_Wb6iV2fHUxYNGMZNWNcZi0s,307
66
66
  basic_memory/models/base.py,sha256=4hAXJ8CE1RnjKhb23lPd-QM7G_FXIdTowMJ9bRixspU,225
67
67
  basic_memory/models/knowledge.py,sha256=lbKd8VOOVPqXtIhNMY30bIokoQutFjLpHwLD5At90MY,6644
@@ -83,17 +83,17 @@ basic_memory/schemas/response.py,sha256=lVYR31DTtSeFRddGWX_wQWnQgyiwX0LEpNJ4f4lK
83
83
  basic_memory/schemas/search.py,sha256=mfPHo8lzZ8BMLzmID-0g_0pWHhBIBNIvy4c8KYHFuvQ,3655
84
84
  basic_memory/services/__init__.py,sha256=oop6SKmzV4_NAYt9otGnupLGVCCKIVgxEcdRQWwh25I,197
85
85
  basic_memory/services/context_service.py,sha256=fhJNHQoTEeIC9ZmZ49CXcNF2aVBghVnmo6LtdSDcAas,9708
86
- basic_memory/services/entity_service.py,sha256=p4yP-VngdtfCqbvygQ968tGQVOJ1nFzN3XRyXenEcRM,12432
86
+ basic_memory/services/entity_service.py,sha256=MlJLpZbr67KpSEZXi1yBJSkA_a7_9Ysa-aZnyEi6b7I,12896
87
87
  basic_memory/services/exceptions.py,sha256=VGlCLd4UD2w5NWKqC7QpG4jOM_hA7jKRRM-MqvEVMNk,288
88
- basic_memory/services/file_service.py,sha256=Mz3_G1DyDcPX9bSR1pRHibqWcpiKtz4E29eoKsjWfYY,9905
88
+ basic_memory/services/file_service.py,sha256=7uLVkcFMFj20srdch8c6u9T6nO5X4wHgcXdL81pGV88,9935
89
89
  basic_memory/services/link_resolver.py,sha256=yWqqKqJtGU_93xy25y6Us4xRTNijrBLz76Nvm_zFEOI,3326
90
90
  basic_memory/services/search_service.py,sha256=t3d5jhABs5bXwtOu7_AvRCpVd8RRd2j6Gg59BAYZ0l8,10625
91
91
  basic_memory/services/service.py,sha256=V-d_8gOV07zGIQDpL-Ksqs3ZN9l3qf3HZOK1f_YNTag,336
92
92
  basic_memory/sync/__init__.py,sha256=CVHguYH457h2u2xoM8KvOilJC71XJlZ-qUh8lHcjYj4,156
93
93
  basic_memory/sync/sync_service.py,sha256=YirSOgk0PyqPJoHXVUzAxhNKdd2pebP8sFeXeAYmGjM,21957
94
- basic_memory/sync/watch_service.py,sha256=heIImU4d0nrVm5kr-zkHpFN2E3v1Z29LXUR2dLq2TPw,12995
95
- basic_memory-0.9.0.dist-info/METADATA,sha256=Sz9gDlA_gEgMETHekkK-C2dQqCH73pQHPs4puzncXko,25391
96
- basic_memory-0.9.0.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
97
- basic_memory-0.9.0.dist-info/entry_points.txt,sha256=IDQa_VmVTzmvMrpnjhEfM0S3F--XsVGEj3MpdJfuo-Q,59
98
- basic_memory-0.9.0.dist-info/licenses/LICENSE,sha256=hIahDEOTzuHCU5J2nd07LWwkLW7Hko4UFO__ffsvB-8,34523
99
- basic_memory-0.9.0.dist-info/RECORD,,
94
+ basic_memory/sync/watch_service.py,sha256=IliisNN8HMKLnBaF95wGHpA5WqRWujprWJVxOnAQ2yc,13468
95
+ basic_memory-0.10.1.dist-info/METADATA,sha256=B0EeeYGFTpEe0VMSaoPT-w-mGIPPB-iNt7uMDaEYERQ,13483
96
+ basic_memory-0.10.1.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
97
+ basic_memory-0.10.1.dist-info/entry_points.txt,sha256=IDQa_VmVTzmvMrpnjhEfM0S3F--XsVGEj3MpdJfuo-Q,59
98
+ basic_memory-0.10.1.dist-info/licenses/LICENSE,sha256=hIahDEOTzuHCU5J2nd07LWwkLW7Hko4UFO__ffsvB-8,34523
99
+ basic_memory-0.10.1.dist-info/RECORD,,
@@ -1,167 +0,0 @@
1
- """CLI command for project info status."""
2
-
3
- import asyncio
4
- import json
5
- from datetime import datetime
6
-
7
- import typer
8
- from rich.console import Console
9
- from rich.table import Table
10
- from rich.panel import Panel
11
- from rich.tree import Tree
12
-
13
- from basic_memory.cli.app import app
14
- from basic_memory.mcp.tools.project_info import project_info
15
-
16
-
17
- info_app = typer.Typer()
18
- app.add_typer(info_app, name="info", help="Get information about your Basic Memory project")
19
-
20
-
21
- @info_app.command("stats")
22
- def display_project_info(
23
- json_output: bool = typer.Option(False, "--json", help="Output in JSON format"),
24
- ):
25
- """Display detailed information and statistics about the current project."""
26
- try:
27
- # Get project info
28
- info = asyncio.run(project_info())
29
-
30
- if json_output:
31
- # Convert to JSON and print
32
- print(json.dumps(info.model_dump(), indent=2, default=str))
33
- else:
34
- # Create rich display
35
- console = Console()
36
-
37
- # Project configuration section
38
- console.print(
39
- Panel(
40
- f"[bold]Project:[/bold] {info.project_name}\n"
41
- f"[bold]Path:[/bold] {info.project_path}\n"
42
- f"[bold]Default Project:[/bold] {info.default_project}\n",
43
- title="📊 Basic Memory Project Info",
44
- expand=False,
45
- )
46
- )
47
-
48
- # Statistics section
49
- stats_table = Table(title="📈 Statistics")
50
- stats_table.add_column("Metric", style="cyan")
51
- stats_table.add_column("Count", style="green")
52
-
53
- stats_table.add_row("Entities", str(info.statistics.total_entities))
54
- stats_table.add_row("Observations", str(info.statistics.total_observations))
55
- stats_table.add_row("Relations", str(info.statistics.total_relations))
56
- stats_table.add_row(
57
- "Unresolved Relations", str(info.statistics.total_unresolved_relations)
58
- )
59
- stats_table.add_row("Isolated Entities", str(info.statistics.isolated_entities))
60
-
61
- console.print(stats_table)
62
-
63
- # Entity types
64
- if info.statistics.entity_types:
65
- entity_types_table = Table(title="📑 Entity Types")
66
- entity_types_table.add_column("Type", style="blue")
67
- entity_types_table.add_column("Count", style="green")
68
-
69
- for entity_type, count in info.statistics.entity_types.items():
70
- entity_types_table.add_row(entity_type, str(count))
71
-
72
- console.print(entity_types_table)
73
-
74
- # Most connected entities
75
- if info.statistics.most_connected_entities:
76
- connected_table = Table(title="🔗 Most Connected Entities")
77
- connected_table.add_column("Title", style="blue")
78
- connected_table.add_column("Permalink", style="cyan")
79
- connected_table.add_column("Relations", style="green")
80
-
81
- for entity in info.statistics.most_connected_entities:
82
- connected_table.add_row(
83
- entity["title"], entity["permalink"], str(entity["relation_count"])
84
- )
85
-
86
- console.print(connected_table)
87
-
88
- # Recent activity
89
- if info.activity.recently_updated:
90
- recent_table = Table(title="🕒 Recent Activity")
91
- recent_table.add_column("Title", style="blue")
92
- recent_table.add_column("Type", style="cyan")
93
- recent_table.add_column("Last Updated", style="green")
94
-
95
- for entity in info.activity.recently_updated[:5]: # Show top 5
96
- updated_at = (
97
- datetime.fromisoformat(entity["updated_at"])
98
- if isinstance(entity["updated_at"], str)
99
- else entity["updated_at"]
100
- )
101
- recent_table.add_row(
102
- entity["title"],
103
- entity["entity_type"],
104
- updated_at.strftime("%Y-%m-%d %H:%M"),
105
- )
106
-
107
- console.print(recent_table)
108
-
109
- # System status
110
- system_tree = Tree("🖥️ System Status")
111
- system_tree.add(f"Basic Memory version: [bold green]{info.system.version}[/bold green]")
112
- system_tree.add(
113
- f"Database: [cyan]{info.system.database_path}[/cyan] ([green]{info.system.database_size}[/green])"
114
- )
115
-
116
- # Watch status
117
- if info.system.watch_status: # pragma: no cover
118
- watch_branch = system_tree.add("Watch Service")
119
- running = info.system.watch_status.get("running", False)
120
- status_color = "green" if running else "red"
121
- watch_branch.add(
122
- f"Status: [bold {status_color}]{'Running' if running else 'Stopped'}[/bold {status_color}]"
123
- )
124
-
125
- if running:
126
- start_time = (
127
- datetime.fromisoformat(info.system.watch_status.get("start_time", ""))
128
- if isinstance(info.system.watch_status.get("start_time"), str)
129
- else info.system.watch_status.get("start_time")
130
- )
131
- watch_branch.add(
132
- f"Running since: [cyan]{start_time.strftime('%Y-%m-%d %H:%M')}[/cyan]"
133
- )
134
- watch_branch.add(
135
- f"Files synced: [green]{info.system.watch_status.get('synced_files', 0)}[/green]"
136
- )
137
- watch_branch.add(
138
- f"Errors: [{'red' if info.system.watch_status.get('error_count', 0) > 0 else 'green'}]{info.system.watch_status.get('error_count', 0)}[/{'red' if info.system.watch_status.get('error_count', 0) > 0 else 'green'}]"
139
- )
140
- else:
141
- system_tree.add("[yellow]Watch service not running[/yellow]")
142
-
143
- console.print(system_tree)
144
-
145
- # Available projects
146
- projects_table = Table(title="📁 Available Projects")
147
- projects_table.add_column("Name", style="blue")
148
- projects_table.add_column("Path", style="cyan")
149
- projects_table.add_column("Default", style="green")
150
-
151
- for name, path in info.available_projects.items():
152
- is_default = name == info.default_project
153
- projects_table.add_row(name, path, "✓" if is_default else "")
154
-
155
- console.print(projects_table)
156
-
157
- # Timestamp
158
- current_time = (
159
- datetime.fromisoformat(str(info.system.timestamp))
160
- if isinstance(info.system.timestamp, str)
161
- else info.system.timestamp
162
- )
163
- console.print(f"\nTimestamp: [cyan]{current_time.strftime('%Y-%m-%d %H:%M:%S')}[/cyan]")
164
-
165
- except Exception as e: # pragma: no cover
166
- typer.echo(f"Error getting project info: {e}", err=True)
167
- raise typer.Exit(1)