basic-memory 0.11.0__tar.gz → 0.12.1__tar.gz
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-0.12.1/.github/workflows/claude-code-actions.yml +16 -0
- {basic_memory-0.11.0 → basic_memory-0.12.1}/.github/workflows/test.yml +6 -0
- {basic_memory-0.11.0 → basic_memory-0.12.1}/.gitignore +5 -1
- {basic_memory-0.11.0 → basic_memory-0.12.1}/CHANGELOG.md +59 -0
- {basic_memory-0.11.0 → basic_memory-0.12.1}/PKG-INFO +42 -11
- {basic_memory-0.11.0 → basic_memory-0.12.1}/README.md +41 -10
- {basic_memory-0.11.0 → basic_memory-0.12.1}/docs/CLI Reference.md +16 -0
- {basic_memory-0.11.0 → basic_memory-0.12.1}/docs/Getting Started with Basic Memory.md +9 -20
- {basic_memory-0.11.0 → basic_memory-0.12.1}/docs/Knowledge Format.md +13 -1
- {basic_memory-0.11.0 → basic_memory-0.12.1}/pyproject.toml +1 -1
- {basic_memory-0.11.0 → basic_memory-0.12.1}/src/basic_memory/__init__.py +1 -1
- {basic_memory-0.11.0 → basic_memory-0.12.1}/src/basic_memory/api/app.py +11 -3
- {basic_memory-0.11.0 → basic_memory-0.12.1}/src/basic_memory/cli/app.py +12 -7
- basic_memory-0.12.1/src/basic_memory/cli/commands/mcp.py +35 -0
- {basic_memory-0.11.0 → basic_memory-0.12.1}/src/basic_memory/cli/commands/sync.py +9 -8
- {basic_memory-0.11.0 → basic_memory-0.12.1}/src/basic_memory/cli/commands/tool.py +28 -15
- basic_memory-0.12.1/src/basic_memory/cli/main.py +26 -0
- {basic_memory-0.11.0 → basic_memory-0.12.1}/src/basic_memory/config.py +30 -6
- {basic_memory-0.11.0 → basic_memory-0.12.1}/src/basic_memory/db.py +3 -1
- {basic_memory-0.11.0 → basic_memory-0.12.1}/src/basic_memory/file_utils.py +3 -0
- {basic_memory-0.11.0 → basic_memory-0.12.1}/src/basic_memory/markdown/entity_parser.py +16 -7
- {basic_memory-0.11.0 → basic_memory-0.12.1}/src/basic_memory/markdown/utils.py +21 -13
- {basic_memory-0.11.0 → basic_memory-0.12.1}/src/basic_memory/mcp/prompts/continue_conversation.py +4 -4
- {basic_memory-0.11.0 → basic_memory-0.12.1}/src/basic_memory/mcp/prompts/search.py +2 -2
- basic_memory-0.12.1/src/basic_memory/mcp/server.py +37 -0
- {basic_memory-0.11.0 → basic_memory-0.12.1}/src/basic_memory/mcp/tools/read_note.py +2 -3
- basic_memory-0.12.1/src/basic_memory/mcp/tools/search.py +113 -0
- {basic_memory-0.11.0 → basic_memory-0.12.1}/src/basic_memory/mcp/tools/write_note.py +3 -1
- {basic_memory-0.11.0 → basic_memory-0.12.1}/src/basic_memory/repository/repository.py +0 -4
- {basic_memory-0.11.0 → basic_memory-0.12.1}/src/basic_memory/repository/search_repository.py +11 -11
- {basic_memory-0.11.0 → basic_memory-0.12.1}/src/basic_memory/schemas/search.py +2 -2
- {basic_memory-0.11.0 → basic_memory-0.12.1}/src/basic_memory/services/context_service.py +1 -1
- {basic_memory-0.11.0 → basic_memory-0.12.1}/src/basic_memory/services/entity_service.py +10 -10
- {basic_memory-0.11.0 → basic_memory-0.12.1}/src/basic_memory/services/file_service.py +1 -1
- basic_memory-0.12.1/src/basic_memory/services/initialization.py +143 -0
- {basic_memory-0.11.0 → basic_memory-0.12.1}/src/basic_memory/services/link_resolver.py +8 -1
- {basic_memory-0.11.0 → basic_memory-0.12.1}/src/basic_memory/services/search_service.py +3 -23
- {basic_memory-0.11.0 → basic_memory-0.12.1}/src/basic_memory/sync/sync_service.py +120 -191
- {basic_memory-0.11.0 → basic_memory-0.12.1}/src/basic_memory/sync/watch_service.py +49 -30
- {basic_memory-0.11.0 → basic_memory-0.12.1}/src/basic_memory/utils.py +10 -2
- {basic_memory-0.11.0 → basic_memory-0.12.1}/tests/api/test_knowledge_router.py +3 -3
- {basic_memory-0.11.0 → basic_memory-0.12.1}/tests/api/test_search_router.py +8 -8
- {basic_memory-0.11.0 → basic_memory-0.12.1}/tests/cli/test_cli_tools.py +28 -0
- {basic_memory-0.11.0 → basic_memory-0.12.1}/tests/conftest.py +5 -3
- {basic_memory-0.11.0 → basic_memory-0.12.1}/tests/markdown/test_entity_parser.py +31 -0
- {basic_memory-0.11.0 → basic_memory-0.12.1}/tests/mcp/test_tool_read_note.py +9 -4
- {basic_memory-0.11.0 → basic_memory-0.12.1}/tests/mcp/test_tool_resource.py +27 -0
- basic_memory-0.12.1/tests/mcp/test_tool_search.py +159 -0
- basic_memory-0.11.0/tests/mcp/test_tool_notes.py → basic_memory-0.12.1/tests/mcp/test_tool_write_note.py +63 -6
- {basic_memory-0.11.0 → basic_memory-0.12.1}/tests/schemas/test_search.py +4 -4
- {basic_memory-0.11.0 → basic_memory-0.12.1}/tests/services/test_entity_service.py +34 -2
- basic_memory-0.12.1/tests/services/test_initialization.py +49 -0
- {basic_memory-0.11.0 → basic_memory-0.12.1}/tests/services/test_search_service.py +13 -6
- {basic_memory-0.11.0 → basic_memory-0.12.1}/tests/sync/test_sync_service.py +117 -62
- basic_memory-0.12.1/tests/sync/test_sync_wikilink_issue.py +63 -0
- {basic_memory-0.11.0 → basic_memory-0.12.1}/tests/sync/test_watch_service.py +6 -6
- basic_memory-0.12.1/tests/utils/test_parse_tags.py +50 -0
- {basic_memory-0.11.0 → basic_memory-0.12.1}/tests/utils/test_permalink_formatting.py +3 -2
- {basic_memory-0.11.0 → basic_memory-0.12.1}/tests/utils/test_utf8_handling.py +2 -2
- {basic_memory-0.11.0 → basic_memory-0.12.1}/uv.lock +1 -1
- basic_memory-0.11.0/src/basic_memory/cli/commands/mcp.py +0 -26
- basic_memory-0.11.0/src/basic_memory/cli/main.py +0 -58
- basic_memory-0.11.0/src/basic_memory/mcp/server.py +0 -11
- basic_memory-0.11.0/src/basic_memory/mcp/tools/search.py +0 -77
- basic_memory-0.11.0/tests/mcp/test_tool_search.py +0 -87
- {basic_memory-0.11.0 → basic_memory-0.12.1}/.github/ISSUE_TEMPLATE/bug_report.md +0 -0
- {basic_memory-0.11.0 → basic_memory-0.12.1}/.github/ISSUE_TEMPLATE/config.yml +0 -0
- {basic_memory-0.11.0 → basic_memory-0.12.1}/.github/ISSUE_TEMPLATE/documentation.md +0 -0
- {basic_memory-0.11.0 → basic_memory-0.12.1}/.github/ISSUE_TEMPLATE/feature_request.md +0 -0
- {basic_memory-0.11.0 → basic_memory-0.12.1}/.github/dependabot.yml +0 -0
- {basic_memory-0.11.0 → basic_memory-0.12.1}/.github/workflows/pr-title.yml +0 -0
- {basic_memory-0.11.0 → basic_memory-0.12.1}/.github/workflows/release.yml +0 -0
- {basic_memory-0.11.0 → basic_memory-0.12.1}/.python-version +0 -0
- {basic_memory-0.11.0 → basic_memory-0.12.1}/CITATION.cff +0 -0
- {basic_memory-0.11.0 → basic_memory-0.12.1}/CLA.md +0 -0
- {basic_memory-0.11.0 → basic_memory-0.12.1}/CLAUDE.md +0 -0
- {basic_memory-0.11.0 → basic_memory-0.12.1}/CODE_OF_CONDUCT.md +0 -0
- {basic_memory-0.11.0 → basic_memory-0.12.1}/CONTRIBUTING.md +0 -0
- {basic_memory-0.11.0 → basic_memory-0.12.1}/Dockerfile +0 -0
- {basic_memory-0.11.0 → basic_memory-0.12.1}/LICENSE +0 -0
- {basic_memory-0.11.0 → basic_memory-0.12.1}/Makefile +0 -0
- {basic_memory-0.11.0 → basic_memory-0.12.1}/SECURITY.md +0 -0
- {basic_memory-0.11.0 → basic_memory-0.12.1}/basic-memory.md +0 -0
- {basic_memory-0.11.0 → basic_memory-0.12.1}/docs/AI Assistant Guide.md +0 -0
- {basic_memory-0.11.0 → basic_memory-0.12.1}/docs/Canvas.md +0 -0
- {basic_memory-0.11.0 → basic_memory-0.12.1}/docs/Obsidian Integration.md +0 -0
- {basic_memory-0.11.0 → basic_memory-0.12.1}/docs/Technical Information.md +0 -0
- {basic_memory-0.11.0 → basic_memory-0.12.1}/docs/User Guide.md +0 -0
- {basic_memory-0.11.0 → basic_memory-0.12.1}/docs/Welcome to Basic memory.md +0 -0
- {basic_memory-0.11.0 → basic_memory-0.12.1}/docs/attachments/Canvas.png +0 -0
- {basic_memory-0.11.0 → basic_memory-0.12.1}/docs/attachments/Claude-Obsidian-Demo.mp4 +0 -0
- {basic_memory-0.11.0 → basic_memory-0.12.1}/docs/attachments/Prompt.png +0 -0
- {basic_memory-0.11.0 → basic_memory-0.12.1}/docs/attachments/disk-ai-logo-400x400.png +0 -0
- {basic_memory-0.11.0 → basic_memory-0.12.1}/docs/attachments/disk-ai-logo.png +0 -0
- {basic_memory-0.11.0 → basic_memory-0.12.1}/docs/attachments/prompt 1.png +0 -0
- {basic_memory-0.11.0 → basic_memory-0.12.1}/docs/attachments/prompt2.png +0 -0
- {basic_memory-0.11.0 → basic_memory-0.12.1}/docs/attachments/prompt3.png +0 -0
- {basic_memory-0.11.0 → basic_memory-0.12.1}/docs/attachments/prompt4.png +0 -0
- {basic_memory-0.11.0 → basic_memory-0.12.1}/docs/publish.js +0 -0
- {basic_memory-0.11.0 → basic_memory-0.12.1}/examples/Coffee Notes/Brewing Equipment.md +0 -0
- {basic_memory-0.11.0 → basic_memory-0.12.1}/examples/Coffee Notes/Coffee Bean Origins.md +0 -0
- {basic_memory-0.11.0 → basic_memory-0.12.1}/examples/Coffee Notes/Coffee Brewing Methods.md +0 -0
- {basic_memory-0.11.0 → basic_memory-0.12.1}/examples/Coffee Notes/Coffee Flavor Map.md +0 -0
- {basic_memory-0.11.0 → basic_memory-0.12.1}/examples/Coffee Notes/Coffee Knowledge Base.md +0 -0
- {basic_memory-0.11.0 → basic_memory-0.12.1}/examples/Coffee Notes/Flavor Extraction.md +0 -0
- {basic_memory-0.11.0 → basic_memory-0.12.1}/examples/Coffee Notes/Perfect Pour Over Coffee Method.canvas +0 -0
- {basic_memory-0.11.0 → basic_memory-0.12.1}/examples/Coffee Notes/Tasting Notes.md +0 -0
- {basic_memory-0.11.0 → basic_memory-0.12.1}/installer/Basic.icns +0 -0
- {basic_memory-0.11.0 → basic_memory-0.12.1}/installer/README.md +0 -0
- {basic_memory-0.11.0 → basic_memory-0.12.1}/installer/icon.svg +0 -0
- {basic_memory-0.11.0 → basic_memory-0.12.1}/installer/installer.py +0 -0
- {basic_memory-0.11.0 → basic_memory-0.12.1}/installer/make_icons.sh +0 -0
- {basic_memory-0.11.0 → basic_memory-0.12.1}/installer/setup.py +0 -0
- {basic_memory-0.11.0 → basic_memory-0.12.1}/llms-install.md +0 -0
- {basic_memory-0.11.0 → basic_memory-0.12.1}/memory.json +0 -0
- {basic_memory-0.11.0 → basic_memory-0.12.1}/scripts/install.sh +0 -0
- {basic_memory-0.11.0 → basic_memory-0.12.1}/smithery.yaml +0 -0
- {basic_memory-0.11.0 → basic_memory-0.12.1}/src/basic_memory/alembic/alembic.ini +0 -0
- {basic_memory-0.11.0 → basic_memory-0.12.1}/src/basic_memory/alembic/env.py +0 -0
- {basic_memory-0.11.0 → basic_memory-0.12.1}/src/basic_memory/alembic/migrations.py +0 -0
- {basic_memory-0.11.0 → basic_memory-0.12.1}/src/basic_memory/alembic/script.py.mako +0 -0
- {basic_memory-0.11.0 → basic_memory-0.12.1}/src/basic_memory/alembic/versions/3dae7c7b1564_initial_schema.py +0 -0
- {basic_memory-0.11.0 → basic_memory-0.12.1}/src/basic_memory/alembic/versions/502b60eaa905_remove_required_from_entity_permalink.py +0 -0
- {basic_memory-0.11.0 → basic_memory-0.12.1}/src/basic_memory/alembic/versions/b3c3938bacdb_relation_to_name_unique_index.py +0 -0
- {basic_memory-0.11.0 → basic_memory-0.12.1}/src/basic_memory/alembic/versions/cc7172b46608_update_search_index_schema.py +0 -0
- {basic_memory-0.11.0 → basic_memory-0.12.1}/src/basic_memory/api/__init__.py +0 -0
- {basic_memory-0.11.0 → basic_memory-0.12.1}/src/basic_memory/api/routers/__init__.py +0 -0
- {basic_memory-0.11.0 → basic_memory-0.12.1}/src/basic_memory/api/routers/knowledge_router.py +0 -0
- {basic_memory-0.11.0 → basic_memory-0.12.1}/src/basic_memory/api/routers/memory_router.py +0 -0
- {basic_memory-0.11.0 → basic_memory-0.12.1}/src/basic_memory/api/routers/project_info_router.py +0 -0
- {basic_memory-0.11.0 → basic_memory-0.12.1}/src/basic_memory/api/routers/resource_router.py +0 -0
- {basic_memory-0.11.0 → basic_memory-0.12.1}/src/basic_memory/api/routers/search_router.py +0 -0
- {basic_memory-0.11.0 → basic_memory-0.12.1}/src/basic_memory/cli/__init__.py +0 -0
- {basic_memory-0.11.0 → basic_memory-0.12.1}/src/basic_memory/cli/commands/__init__.py +0 -0
- {basic_memory-0.11.0 → basic_memory-0.12.1}/src/basic_memory/cli/commands/db.py +0 -0
- {basic_memory-0.11.0 → basic_memory-0.12.1}/src/basic_memory/cli/commands/import_chatgpt.py +0 -0
- {basic_memory-0.11.0 → basic_memory-0.12.1}/src/basic_memory/cli/commands/import_claude_conversations.py +0 -0
- {basic_memory-0.11.0 → basic_memory-0.12.1}/src/basic_memory/cli/commands/import_claude_projects.py +0 -0
- {basic_memory-0.11.0 → basic_memory-0.12.1}/src/basic_memory/cli/commands/import_memory_json.py +0 -0
- {basic_memory-0.11.0 → basic_memory-0.12.1}/src/basic_memory/cli/commands/project.py +0 -0
- {basic_memory-0.11.0 → basic_memory-0.12.1}/src/basic_memory/cli/commands/status.py +0 -0
- {basic_memory-0.11.0 → basic_memory-0.12.1}/src/basic_memory/deps.py +0 -0
- {basic_memory-0.11.0 → basic_memory-0.12.1}/src/basic_memory/markdown/__init__.py +0 -0
- {basic_memory-0.11.0 → basic_memory-0.12.1}/src/basic_memory/markdown/markdown_processor.py +0 -0
- {basic_memory-0.11.0 → basic_memory-0.12.1}/src/basic_memory/markdown/plugins.py +0 -0
- {basic_memory-0.11.0 → basic_memory-0.12.1}/src/basic_memory/markdown/schemas.py +0 -0
- {basic_memory-0.11.0 → basic_memory-0.12.1}/src/basic_memory/mcp/__init__.py +0 -0
- {basic_memory-0.11.0 → basic_memory-0.12.1}/src/basic_memory/mcp/async_client.py +0 -0
- {basic_memory-0.11.0 → basic_memory-0.12.1}/src/basic_memory/mcp/main.py +0 -0
- {basic_memory-0.11.0 → basic_memory-0.12.1}/src/basic_memory/mcp/prompts/__init__.py +0 -0
- {basic_memory-0.11.0 → basic_memory-0.12.1}/src/basic_memory/mcp/prompts/ai_assistant_guide.py +0 -0
- {basic_memory-0.11.0 → basic_memory-0.12.1}/src/basic_memory/mcp/prompts/recent_activity.py +0 -0
- {basic_memory-0.11.0 → basic_memory-0.12.1}/src/basic_memory/mcp/prompts/utils.py +0 -0
- {basic_memory-0.11.0 → basic_memory-0.12.1}/src/basic_memory/mcp/resources/ai_assistant_guide.md +0 -0
- {basic_memory-0.11.0 → basic_memory-0.12.1}/src/basic_memory/mcp/tools/__init__.py +0 -0
- {basic_memory-0.11.0 → basic_memory-0.12.1}/src/basic_memory/mcp/tools/build_context.py +0 -0
- {basic_memory-0.11.0 → basic_memory-0.12.1}/src/basic_memory/mcp/tools/canvas.py +0 -0
- {basic_memory-0.11.0 → basic_memory-0.12.1}/src/basic_memory/mcp/tools/delete_note.py +0 -0
- {basic_memory-0.11.0 → basic_memory-0.12.1}/src/basic_memory/mcp/tools/project_info.py +0 -0
- {basic_memory-0.11.0 → basic_memory-0.12.1}/src/basic_memory/mcp/tools/read_content.py +0 -0
- {basic_memory-0.11.0 → basic_memory-0.12.1}/src/basic_memory/mcp/tools/recent_activity.py +0 -0
- {basic_memory-0.11.0 → basic_memory-0.12.1}/src/basic_memory/mcp/tools/utils.py +0 -0
- {basic_memory-0.11.0 → basic_memory-0.12.1}/src/basic_memory/models/__init__.py +0 -0
- {basic_memory-0.11.0 → basic_memory-0.12.1}/src/basic_memory/models/base.py +0 -0
- {basic_memory-0.11.0 → basic_memory-0.12.1}/src/basic_memory/models/knowledge.py +0 -0
- {basic_memory-0.11.0 → basic_memory-0.12.1}/src/basic_memory/models/search.py +0 -0
- {basic_memory-0.11.0 → basic_memory-0.12.1}/src/basic_memory/repository/__init__.py +0 -0
- {basic_memory-0.11.0 → basic_memory-0.12.1}/src/basic_memory/repository/entity_repository.py +0 -0
- {basic_memory-0.11.0 → basic_memory-0.12.1}/src/basic_memory/repository/observation_repository.py +0 -0
- {basic_memory-0.11.0 → basic_memory-0.12.1}/src/basic_memory/repository/project_info_repository.py +0 -0
- {basic_memory-0.11.0 → basic_memory-0.12.1}/src/basic_memory/repository/relation_repository.py +0 -0
- {basic_memory-0.11.0 → basic_memory-0.12.1}/src/basic_memory/schemas/__init__.py +0 -0
- {basic_memory-0.11.0 → basic_memory-0.12.1}/src/basic_memory/schemas/base.py +0 -0
- {basic_memory-0.11.0 → basic_memory-0.12.1}/src/basic_memory/schemas/delete.py +0 -0
- {basic_memory-0.11.0 → basic_memory-0.12.1}/src/basic_memory/schemas/memory.py +0 -0
- {basic_memory-0.11.0 → basic_memory-0.12.1}/src/basic_memory/schemas/project_info.py +0 -0
- {basic_memory-0.11.0 → basic_memory-0.12.1}/src/basic_memory/schemas/request.py +0 -0
- {basic_memory-0.11.0 → basic_memory-0.12.1}/src/basic_memory/schemas/response.py +0 -0
- {basic_memory-0.11.0 → basic_memory-0.12.1}/src/basic_memory/services/__init__.py +0 -0
- {basic_memory-0.11.0 → basic_memory-0.12.1}/src/basic_memory/services/exceptions.py +0 -0
- {basic_memory-0.11.0 → basic_memory-0.12.1}/src/basic_memory/services/service.py +0 -0
- {basic_memory-0.11.0 → basic_memory-0.12.1}/src/basic_memory/sync/__init__.py +0 -0
- {basic_memory-0.11.0 → basic_memory-0.12.1}/static/ai_assistant_guide.md +0 -0
- {basic_memory-0.11.0 → basic_memory-0.12.1}/static/json_canvas_spec_1_0.md +0 -0
- {basic_memory-0.11.0 → basic_memory-0.12.1}/tests/Non-MarkdownFileSupport.pdf +0 -0
- {basic_memory-0.11.0 → basic_memory-0.12.1}/tests/Screenshot.png +0 -0
- {basic_memory-0.11.0 → basic_memory-0.12.1}/tests/__init__.py +0 -0
- {basic_memory-0.11.0 → basic_memory-0.12.1}/tests/api/conftest.py +0 -0
- {basic_memory-0.11.0 → basic_memory-0.12.1}/tests/api/test_memory_router.py +0 -0
- {basic_memory-0.11.0 → basic_memory-0.12.1}/tests/api/test_project_info_router.py +0 -0
- {basic_memory-0.11.0 → basic_memory-0.12.1}/tests/api/test_resource_router.py +0 -0
- {basic_memory-0.11.0 → basic_memory-0.12.1}/tests/cli/conftest.py +0 -0
- {basic_memory-0.11.0 → basic_memory-0.12.1}/tests/cli/test_import_chatgpt.py +0 -0
- {basic_memory-0.11.0 → basic_memory-0.12.1}/tests/cli/test_import_claude_conversations.py +0 -0
- {basic_memory-0.11.0 → basic_memory-0.12.1}/tests/cli/test_import_claude_projects.py +0 -0
- {basic_memory-0.11.0 → basic_memory-0.12.1}/tests/cli/test_import_memory_json.py +0 -0
- {basic_memory-0.11.0 → basic_memory-0.12.1}/tests/cli/test_project_commands.py +0 -0
- {basic_memory-0.11.0 → basic_memory-0.12.1}/tests/cli/test_project_info.py +0 -0
- {basic_memory-0.11.0 → basic_memory-0.12.1}/tests/cli/test_status.py +0 -0
- {basic_memory-0.11.0 → basic_memory-0.12.1}/tests/cli/test_sync.py +0 -0
- {basic_memory-0.11.0 → basic_memory-0.12.1}/tests/cli/test_version.py +0 -0
- {basic_memory-0.11.0 → basic_memory-0.12.1}/tests/edit_file_test.py +0 -0
- {basic_memory-0.11.0 → basic_memory-0.12.1}/tests/markdown/__init__.py +0 -0
- {basic_memory-0.11.0 → basic_memory-0.12.1}/tests/markdown/test_markdown_plugins.py +0 -0
- {basic_memory-0.11.0 → basic_memory-0.12.1}/tests/markdown/test_markdown_processor.py +0 -0
- {basic_memory-0.11.0 → basic_memory-0.12.1}/tests/markdown/test_observation_edge_cases.py +0 -0
- {basic_memory-0.11.0 → basic_memory-0.12.1}/tests/markdown/test_parser_edge_cases.py +0 -0
- {basic_memory-0.11.0 → basic_memory-0.12.1}/tests/markdown/test_relation_edge_cases.py +0 -0
- {basic_memory-0.11.0 → basic_memory-0.12.1}/tests/markdown/test_task_detection.py +0 -0
- {basic_memory-0.11.0 → basic_memory-0.12.1}/tests/mcp/conftest.py +0 -0
- {basic_memory-0.11.0 → basic_memory-0.12.1}/tests/mcp/test_prompts.py +0 -0
- {basic_memory-0.11.0 → basic_memory-0.12.1}/tests/mcp/test_resources.py +0 -0
- {basic_memory-0.11.0 → basic_memory-0.12.1}/tests/mcp/test_tool_canvas.py +0 -0
- {basic_memory-0.11.0 → basic_memory-0.12.1}/tests/mcp/test_tool_memory.py +0 -0
- {basic_memory-0.11.0 → basic_memory-0.12.1}/tests/mcp/test_tool_project_info.py +0 -0
- {basic_memory-0.11.0 → basic_memory-0.12.1}/tests/mcp/test_tool_utils.py +0 -0
- {basic_memory-0.11.0 → basic_memory-0.12.1}/tests/repository/test_entity_repository.py +0 -0
- {basic_memory-0.11.0 → basic_memory-0.12.1}/tests/repository/test_observation_repository.py +0 -0
- {basic_memory-0.11.0 → basic_memory-0.12.1}/tests/repository/test_relation_repository.py +0 -0
- {basic_memory-0.11.0 → basic_memory-0.12.1}/tests/repository/test_repository.py +0 -0
- {basic_memory-0.11.0 → basic_memory-0.12.1}/tests/schemas/test_memory_url.py +0 -0
- {basic_memory-0.11.0 → basic_memory-0.12.1}/tests/schemas/test_schemas.py +0 -0
- {basic_memory-0.11.0 → basic_memory-0.12.1}/tests/services/test_context_service.py +0 -0
- {basic_memory-0.11.0 → basic_memory-0.12.1}/tests/services/test_file_service.py +0 -0
- {basic_memory-0.11.0 → basic_memory-0.12.1}/tests/services/test_link_resolver.py +0 -0
- {basic_memory-0.11.0 → basic_memory-0.12.1}/tests/sync/test_tmp_files.py +0 -0
- {basic_memory-0.11.0 → basic_memory-0.12.1}/tests/sync/test_watch_service_edge_cases.py +0 -0
- {basic_memory-0.11.0 → basic_memory-0.12.1}/tests/test_basic_memory.py +0 -0
- {basic_memory-0.11.0 → basic_memory-0.12.1}/tests/test_config.py +0 -0
- {basic_memory-0.11.0 → basic_memory-0.12.1}/tests/utils/test_file_utils.py +0 -0
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
name: Claude Code Integration
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
issue_comment:
|
|
5
|
+
types: [ created ]
|
|
6
|
+
pull_request_review_comment:
|
|
7
|
+
types: [ created ]
|
|
8
|
+
|
|
9
|
+
jobs:
|
|
10
|
+
claude-integration:
|
|
11
|
+
uses: basicmachines-co/claude-code-github-action/.github/workflows/claude-full.yml@v0.11.0
|
|
12
|
+
with:
|
|
13
|
+
issue-label: 'claude-fix' # Optional: customize the trigger label
|
|
14
|
+
secrets:
|
|
15
|
+
ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }}
|
|
16
|
+
PERSONAL_ACCESS_TOKEN: ${{ secrets.CLAUDE_TOKEN }}
|
|
@@ -5,6 +5,12 @@ on:
|
|
|
5
5
|
branches: [ "main" ]
|
|
6
6
|
pull_request:
|
|
7
7
|
branches: [ "main" ]
|
|
8
|
+
# pull_request_target runs on the BASE of the PR, not the merge result.
|
|
9
|
+
# It has write permissions and access to secrets.
|
|
10
|
+
# It's useful for PRs from forks or automated PRs but requires careful use for security reasons.
|
|
11
|
+
# See: https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#pull_request_target
|
|
12
|
+
pull_request_target:
|
|
13
|
+
branches: [ "main" ]
|
|
8
14
|
|
|
9
15
|
jobs:
|
|
10
16
|
test:
|
|
@@ -1,6 +1,65 @@
|
|
|
1
1
|
# CHANGELOG
|
|
2
2
|
|
|
3
3
|
|
|
4
|
+
## v0.12.1 (2025-04-07)
|
|
5
|
+
|
|
6
|
+
### Bug Fixes
|
|
7
|
+
|
|
8
|
+
- Run migrations and sync when starting mcp
|
|
9
|
+
([#88](https://github.com/basicmachines-co/basic-memory/pull/88),
|
|
10
|
+
[`78a3412`](https://github.com/basicmachines-co/basic-memory/commit/78a3412bcff83b46e78e26f8b9fce42ed9e05991))
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
## v0.12.0 (2025-04-06)
|
|
14
|
+
|
|
15
|
+
### Bug Fixes
|
|
16
|
+
|
|
17
|
+
- [bug] `#` character accumulation in markdown frontmatter tags prop
|
|
18
|
+
([#79](https://github.com/basicmachines-co/basic-memory/pull/79),
|
|
19
|
+
[`6c19c9e`](https://github.com/basicmachines-co/basic-memory/commit/6c19c9edf5131054ba201a109b37f15c83ef150c))
|
|
20
|
+
|
|
21
|
+
- [bug] Cursor has errors calling search tool
|
|
22
|
+
([#78](https://github.com/basicmachines-co/basic-memory/pull/78),
|
|
23
|
+
[`9d581ce`](https://github.com/basicmachines-co/basic-memory/commit/9d581cee133f9dde4a0a85118868227390c84161))
|
|
24
|
+
|
|
25
|
+
- [bug] Some notes never exit "modified" status
|
|
26
|
+
([#77](https://github.com/basicmachines-co/basic-memory/pull/77),
|
|
27
|
+
[`7930ddb`](https://github.com/basicmachines-co/basic-memory/commit/7930ddb2919057be30ceac8c4c19da6aaa1d3e92))
|
|
28
|
+
|
|
29
|
+
- [bug] write_note Tool Fails to Update Existing Files in Some Situations.
|
|
30
|
+
([#80](https://github.com/basicmachines-co/basic-memory/pull/80),
|
|
31
|
+
[`9bff1f7`](https://github.com/basicmachines-co/basic-memory/commit/9bff1f732e71bc60f88b5c2ce3db5a2aa60b8e28))
|
|
32
|
+
|
|
33
|
+
- Set default mcp log level to ERROR
|
|
34
|
+
([#81](https://github.com/basicmachines-co/basic-memory/pull/81),
|
|
35
|
+
[`248214c`](https://github.com/basicmachines-co/basic-memory/commit/248214cb114a269ca60ff6398e382f9e2495ad8e))
|
|
36
|
+
|
|
37
|
+
- Write_note preserves frontmatter fields in content
|
|
38
|
+
([#84](https://github.com/basicmachines-co/basic-memory/pull/84),
|
|
39
|
+
[`3f4d9e4`](https://github.com/basicmachines-co/basic-memory/commit/3f4d9e4d872ebc0ed719c61b24d803c14a9db5e6))
|
|
40
|
+
|
|
41
|
+
### Documentation
|
|
42
|
+
|
|
43
|
+
- Add VS Code instructions to README
|
|
44
|
+
([#76](https://github.com/basicmachines-co/basic-memory/pull/76),
|
|
45
|
+
[`43cbb7b`](https://github.com/basicmachines-co/basic-memory/commit/43cbb7b38cc0482ac0a41b6759320e3588186e43))
|
|
46
|
+
|
|
47
|
+
- Updated basicmachines.co links to be https
|
|
48
|
+
([#69](https://github.com/basicmachines-co/basic-memory/pull/69),
|
|
49
|
+
[`40ea28b`](https://github.com/basicmachines-co/basic-memory/commit/40ea28b0bfc60012924a69ecb76511daa4c7d133))
|
|
50
|
+
|
|
51
|
+
### Features
|
|
52
|
+
|
|
53
|
+
- Add watch to mcp process ([#83](https://github.com/basicmachines-co/basic-memory/pull/83),
|
|
54
|
+
[`00c8633`](https://github.com/basicmachines-co/basic-memory/commit/00c8633cfcee75ff640ff8fe81dafeb956281a94))
|
|
55
|
+
|
|
56
|
+
- Permalink enhancements ([#82](https://github.com/basicmachines-co/basic-memory/pull/82),
|
|
57
|
+
[`617e60b`](https://github.com/basicmachines-co/basic-memory/commit/617e60bda4a590678a5f551f10a73e7b47e3b13e))
|
|
58
|
+
|
|
59
|
+
- Avoiding "useless permalink values" for files without metadata - Enable permalinks to be updated
|
|
60
|
+
on move via config setting
|
|
61
|
+
|
|
62
|
+
|
|
4
63
|
## v0.11.0 (2025-03-29)
|
|
5
64
|
|
|
6
65
|
### Bug Fixes
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: basic-memory
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.12.1
|
|
4
4
|
Summary: Local-first knowledge management combining Zettelkasten with knowledge graphs
|
|
5
5
|
Project-URL: Homepage, https://github.com/basicmachines-co/basic-memory
|
|
6
6
|
Project-URL: Repository, https://github.com/basicmachines-co/basic-memory
|
|
@@ -47,8 +47,8 @@ Basic Memory lets you build persistent knowledge through natural conversations w
|
|
|
47
47
|
Claude, while keeping everything in simple Markdown files on your computer. It uses the Model Context Protocol (MCP) to
|
|
48
48
|
enable any compatible LLM to read and write to your local knowledge base.
|
|
49
49
|
|
|
50
|
-
- Website:
|
|
51
|
-
- Documentation:
|
|
50
|
+
- Website: https://basicmachines.co
|
|
51
|
+
- Documentation: https://memory.basicmachines.co
|
|
52
52
|
|
|
53
53
|
## Pick up your conversation right where you left off
|
|
54
54
|
|
|
@@ -187,7 +187,7 @@ The note embeds semantic content and links to other topics via simple Markdown f
|
|
|
187
187
|
|
|
188
188
|
3. You see this file on your computer in real time in the current project directory (default `~/$HOME/basic-memory`).
|
|
189
189
|
|
|
190
|
-
- Realtime sync
|
|
190
|
+
- Realtime sync is enabled by default with the v0.12.0 version
|
|
191
191
|
|
|
192
192
|
4. In a chat with the LLM, you can reference a topic:
|
|
193
193
|
|
|
@@ -296,6 +296,43 @@ Examples of relations:
|
|
|
296
296
|
- documented_in [[Coffee Journal]]
|
|
297
297
|
```
|
|
298
298
|
|
|
299
|
+
## Using with VS Code
|
|
300
|
+
For one-click installation, click one of the install buttons below...
|
|
301
|
+
|
|
302
|
+
[](https://insiders.vscode.dev/redirect/mcp/install?name=basic-memory&config=%7B%22command%22%3A%22uvx%22%2C%22args%22%3A%5B%22basic-memory%22%2C%22mcp%22%5D%7D) [](https://insiders.vscode.dev/redirect/mcp/install?name=basic-memory&config=%7B%22command%22%3A%22uvx%22%2C%22args%22%3A%5B%22basic-memory%22%2C%22mcp%22%5D%7D&quality=insiders)
|
|
303
|
+
|
|
304
|
+
You can use Basic Memory with VS Code to easily retrieve and store information while coding. Click the installation buttons above for one-click setup, or follow the manual installation instructions below.
|
|
305
|
+
|
|
306
|
+
### Manual Installation
|
|
307
|
+
|
|
308
|
+
Add the following JSON block to your User Settings (JSON) file in VS Code. You can do this by pressing `Ctrl + Shift + P` and typing `Preferences: Open User Settings (JSON)`.
|
|
309
|
+
|
|
310
|
+
```json
|
|
311
|
+
{
|
|
312
|
+
"mcp": {
|
|
313
|
+
"servers": {
|
|
314
|
+
"basic-memory": {
|
|
315
|
+
"command": "uvx",
|
|
316
|
+
"args": ["basic-memory", "mcp"]
|
|
317
|
+
}
|
|
318
|
+
}
|
|
319
|
+
}
|
|
320
|
+
}
|
|
321
|
+
```
|
|
322
|
+
|
|
323
|
+
Optionally, you can add it to a file called `.vscode/mcp.json` in your workspace. This will allow you to share the configuration with others.
|
|
324
|
+
|
|
325
|
+
```json
|
|
326
|
+
{
|
|
327
|
+
"servers": {
|
|
328
|
+
"basic-memory": {
|
|
329
|
+
"command": "uvx",
|
|
330
|
+
"args": ["basic-memory", "mcp"]
|
|
331
|
+
}
|
|
332
|
+
}
|
|
333
|
+
}
|
|
334
|
+
```
|
|
335
|
+
|
|
299
336
|
## Using with Claude Desktop
|
|
300
337
|
|
|
301
338
|
Basic Memory is built using the MCP (Model Context Protocol) and works with the Claude desktop app (https://claude.ai/):
|
|
@@ -341,13 +378,7 @@ config:
|
|
|
341
378
|
|
|
342
379
|
2. Sync your knowledge:
|
|
343
380
|
|
|
344
|
-
|
|
345
|
-
# One-time sync of local knowledge updates
|
|
346
|
-
basic-memory sync
|
|
347
|
-
|
|
348
|
-
# Run realtime sync process (recommended)
|
|
349
|
-
basic-memory sync --watch
|
|
350
|
-
```
|
|
381
|
+
Basic Memory will sync the files in your project in real time if you make manual edits.
|
|
351
382
|
|
|
352
383
|
3. In Claude Desktop, the LLM can now use these tools:
|
|
353
384
|
|
|
@@ -13,8 +13,8 @@ Basic Memory lets you build persistent knowledge through natural conversations w
|
|
|
13
13
|
Claude, while keeping everything in simple Markdown files on your computer. It uses the Model Context Protocol (MCP) to
|
|
14
14
|
enable any compatible LLM to read and write to your local knowledge base.
|
|
15
15
|
|
|
16
|
-
- Website:
|
|
17
|
-
- Documentation:
|
|
16
|
+
- Website: https://basicmachines.co
|
|
17
|
+
- Documentation: https://memory.basicmachines.co
|
|
18
18
|
|
|
19
19
|
## Pick up your conversation right where you left off
|
|
20
20
|
|
|
@@ -153,7 +153,7 @@ The note embeds semantic content and links to other topics via simple Markdown f
|
|
|
153
153
|
|
|
154
154
|
3. You see this file on your computer in real time in the current project directory (default `~/$HOME/basic-memory`).
|
|
155
155
|
|
|
156
|
-
- Realtime sync
|
|
156
|
+
- Realtime sync is enabled by default with the v0.12.0 version
|
|
157
157
|
|
|
158
158
|
4. In a chat with the LLM, you can reference a topic:
|
|
159
159
|
|
|
@@ -262,6 +262,43 @@ Examples of relations:
|
|
|
262
262
|
- documented_in [[Coffee Journal]]
|
|
263
263
|
```
|
|
264
264
|
|
|
265
|
+
## Using with VS Code
|
|
266
|
+
For one-click installation, click one of the install buttons below...
|
|
267
|
+
|
|
268
|
+
[](https://insiders.vscode.dev/redirect/mcp/install?name=basic-memory&config=%7B%22command%22%3A%22uvx%22%2C%22args%22%3A%5B%22basic-memory%22%2C%22mcp%22%5D%7D) [](https://insiders.vscode.dev/redirect/mcp/install?name=basic-memory&config=%7B%22command%22%3A%22uvx%22%2C%22args%22%3A%5B%22basic-memory%22%2C%22mcp%22%5D%7D&quality=insiders)
|
|
269
|
+
|
|
270
|
+
You can use Basic Memory with VS Code to easily retrieve and store information while coding. Click the installation buttons above for one-click setup, or follow the manual installation instructions below.
|
|
271
|
+
|
|
272
|
+
### Manual Installation
|
|
273
|
+
|
|
274
|
+
Add the following JSON block to your User Settings (JSON) file in VS Code. You can do this by pressing `Ctrl + Shift + P` and typing `Preferences: Open User Settings (JSON)`.
|
|
275
|
+
|
|
276
|
+
```json
|
|
277
|
+
{
|
|
278
|
+
"mcp": {
|
|
279
|
+
"servers": {
|
|
280
|
+
"basic-memory": {
|
|
281
|
+
"command": "uvx",
|
|
282
|
+
"args": ["basic-memory", "mcp"]
|
|
283
|
+
}
|
|
284
|
+
}
|
|
285
|
+
}
|
|
286
|
+
}
|
|
287
|
+
```
|
|
288
|
+
|
|
289
|
+
Optionally, you can add it to a file called `.vscode/mcp.json` in your workspace. This will allow you to share the configuration with others.
|
|
290
|
+
|
|
291
|
+
```json
|
|
292
|
+
{
|
|
293
|
+
"servers": {
|
|
294
|
+
"basic-memory": {
|
|
295
|
+
"command": "uvx",
|
|
296
|
+
"args": ["basic-memory", "mcp"]
|
|
297
|
+
}
|
|
298
|
+
}
|
|
299
|
+
}
|
|
300
|
+
```
|
|
301
|
+
|
|
265
302
|
## Using with Claude Desktop
|
|
266
303
|
|
|
267
304
|
Basic Memory is built using the MCP (Model Context Protocol) and works with the Claude desktop app (https://claude.ai/):
|
|
@@ -307,13 +344,7 @@ config:
|
|
|
307
344
|
|
|
308
345
|
2. Sync your knowledge:
|
|
309
346
|
|
|
310
|
-
|
|
311
|
-
# One-time sync of local knowledge updates
|
|
312
|
-
basic-memory sync
|
|
313
|
-
|
|
314
|
-
# Run realtime sync process (recommended)
|
|
315
|
-
basic-memory sync --watch
|
|
316
|
-
```
|
|
347
|
+
Basic Memory will sync the files in your project in real time if you make manual edits.
|
|
317
348
|
|
|
318
349
|
3. In Claude Desktop, the LLM can now use these tools:
|
|
319
350
|
|
|
@@ -29,6 +29,22 @@ Options:
|
|
|
29
29
|
- `--watch`: Continuously monitor for changes
|
|
30
30
|
- `--verbose`: Show detailed output
|
|
31
31
|
|
|
32
|
+
**Note**:
|
|
33
|
+
|
|
34
|
+
As of the v0.12.0 release syncing will occur in real time when the mcp process starts.
|
|
35
|
+
- The real time sync means that it is no longer necessary to run the `basic-memory sync --watch` process in a a terminal to sync changes to the db (so the AI can see them). This will be done automatically.
|
|
36
|
+
|
|
37
|
+
This behavior can be changed via the config. The config file for Basic Memory is in the home directory under `.basic-memory/config.json`.
|
|
38
|
+
|
|
39
|
+
To change the properties, set the following values:
|
|
40
|
+
```
|
|
41
|
+
~/.basic-memory/config.json
|
|
42
|
+
{
|
|
43
|
+
"sync_changes": false,
|
|
44
|
+
}
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
Thanks for using Basic Memory!
|
|
32
48
|
### import
|
|
33
49
|
|
|
34
50
|
Imports external knowledge sources:
|
|
@@ -89,22 +89,11 @@ Replace `/absolute/path/to/uvx` with the actual path you found in Step 1.
|
|
|
89
89
|
|
|
90
90
|
Close and reopen Claude Desktop for the changes to take effect.
|
|
91
91
|
|
|
92
|
-
### 3.
|
|
92
|
+
### 3. Sync changes in real time
|
|
93
93
|
|
|
94
|
-
> Note
|
|
95
|
-
|
|
96
|
-
Start the sync service to monitor your files for changes:
|
|
97
|
-
|
|
98
|
-
```bash
|
|
99
|
-
# One-time sync
|
|
100
|
-
basic-memory sync
|
|
101
|
-
|
|
102
|
-
# For continuous monitoring (recommended)
|
|
103
|
-
basic-memory sync --watch
|
|
104
|
-
```
|
|
105
|
-
|
|
106
|
-
The `--watch` flag enables automatic detection of file changes, updating your knowledge in real time.
|
|
94
|
+
> **Note**: The service will sync changes from your project directory in real time so they available for the AI assistant.
|
|
107
95
|
|
|
96
|
+
To disable realtime sync, you can update the config. See [[CLI Reference#sync]].
|
|
108
97
|
### 4. Staying Updated
|
|
109
98
|
|
|
110
99
|
To update Basic Memory when new versions are released:
|
|
@@ -145,8 +134,8 @@ If Claude cannot find Basic Memory tools:
|
|
|
145
134
|
1. **Check absolute paths**: Ensure you're using complete absolute paths to uvx in the Claude Desktop configuration
|
|
146
135
|
2. **Verify installation**: Run `basic-memory --version` in Terminal to confirm Basic Memory is installed
|
|
147
136
|
3. **Restart applications**: Restart both Terminal and Claude Desktop after making configuration changes
|
|
148
|
-
4. **Check sync status**:
|
|
149
|
-
|
|
137
|
+
4. **Check sync status**: You can view the sync status by running `basic-memory status
|
|
138
|
+
.
|
|
150
139
|
#### Permission Issues
|
|
151
140
|
|
|
152
141
|
If you encounter permission errors:
|
|
@@ -282,15 +271,15 @@ basic-memory import claude conversations
|
|
|
282
271
|
basic-memory import chatgpt
|
|
283
272
|
```
|
|
284
273
|
|
|
285
|
-
After importing,
|
|
274
|
+
After importing, the changes will be synced. Initial syncs may take a few moments. You can see info about your project by running `basic-memrory project info`.
|
|
286
275
|
|
|
287
276
|
## Quick Tips
|
|
288
277
|
|
|
289
|
-
-
|
|
278
|
+
- Basic Memory will sync changes from your project in real time.
|
|
290
279
|
- Use special prompts (Continue Conversation, Recent Activity, Search) to start contextual discussions
|
|
291
280
|
- Build connections between notes for a richer knowledge graph
|
|
292
|
-
- Use direct memory
|
|
293
|
-
- Use git to version control your knowledge base
|
|
281
|
+
- Use direct `memory://` URLs with a permalink when you need precise context. See [[User Guide#Using memory // URLs]]
|
|
282
|
+
- Use git to version control your knowledge base (git integration is on the roadmap)
|
|
294
283
|
- Review and edit AI-generated notes for accuracy
|
|
295
284
|
|
|
296
285
|
## Next Steps
|
|
@@ -144,7 +144,19 @@ permalink: auth-approaches-2024
|
|
|
144
144
|
---
|
|
145
145
|
```
|
|
146
146
|
|
|
147
|
-
If not specified, one will be generated automatically from the title.
|
|
147
|
+
If not specified, one will be generated automatically from the title, if the note has has a frontmatter section.
|
|
148
|
+
|
|
149
|
+
By default a notes' permalink value will not change if the file is moved. It's a **stable** identifier :). But if you'd rather permalinks are always updated when a file moves, you can set the config setting in the global config.
|
|
150
|
+
|
|
151
|
+
The config file for Basic Memory is in the home directory under `.basic-memory/config.json`.
|
|
152
|
+
|
|
153
|
+
To change the behavior, set the following value:
|
|
154
|
+
```
|
|
155
|
+
~/.basic-memory/config.json
|
|
156
|
+
{
|
|
157
|
+
"update_permalinks_on_move": true
|
|
158
|
+
}
|
|
159
|
+
```
|
|
148
160
|
|
|
149
161
|
### Using memory:// URLs
|
|
150
162
|
|
|
@@ -7,16 +7,24 @@ from fastapi.exception_handlers import http_exception_handler
|
|
|
7
7
|
from loguru import logger
|
|
8
8
|
|
|
9
9
|
from basic_memory import db
|
|
10
|
-
from basic_memory.
|
|
11
|
-
from basic_memory.
|
|
10
|
+
from basic_memory.api.routers import knowledge, memory, project_info, resource, search
|
|
11
|
+
from basic_memory.config import config as project_config
|
|
12
|
+
from basic_memory.services.initialization import initialize_app
|
|
12
13
|
|
|
13
14
|
|
|
14
15
|
@asynccontextmanager
|
|
15
16
|
async def lifespan(app: FastAPI): # pragma: no cover
|
|
16
17
|
"""Lifecycle manager for the FastAPI app."""
|
|
17
|
-
|
|
18
|
+
# Initialize database and file sync services
|
|
19
|
+
watch_task = await initialize_app(project_config)
|
|
20
|
+
|
|
21
|
+
# proceed with startup
|
|
18
22
|
yield
|
|
23
|
+
|
|
19
24
|
logger.info("Shutting down Basic Memory API")
|
|
25
|
+
if watch_task:
|
|
26
|
+
watch_task.cancel()
|
|
27
|
+
|
|
20
28
|
await db.shutdown_db()
|
|
21
29
|
|
|
22
30
|
|
|
@@ -1,18 +1,17 @@
|
|
|
1
|
-
import asyncio
|
|
2
1
|
from typing import Optional
|
|
3
2
|
|
|
4
3
|
import typer
|
|
5
4
|
|
|
6
|
-
from basic_memory import db
|
|
7
|
-
from basic_memory.config import config
|
|
8
|
-
|
|
9
5
|
|
|
10
6
|
def version_callback(value: bool) -> None:
|
|
11
7
|
"""Show version and exit."""
|
|
12
8
|
if value: # pragma: no cover
|
|
13
9
|
import basic_memory
|
|
10
|
+
from basic_memory.config import config
|
|
14
11
|
|
|
15
12
|
typer.echo(f"Basic Memory version: {basic_memory.__version__}")
|
|
13
|
+
typer.echo(f"Current project: {config.project}")
|
|
14
|
+
typer.echo(f"Project path: {config.home}")
|
|
16
15
|
raise typer.Exit()
|
|
17
16
|
|
|
18
17
|
|
|
@@ -21,11 +20,12 @@ app = typer.Typer(name="basic-memory")
|
|
|
21
20
|
|
|
22
21
|
@app.callback()
|
|
23
22
|
def app_callback(
|
|
23
|
+
ctx: typer.Context,
|
|
24
24
|
project: Optional[str] = typer.Option(
|
|
25
25
|
None,
|
|
26
26
|
"--project",
|
|
27
27
|
"-p",
|
|
28
|
-
help="Specify which project to use",
|
|
28
|
+
help="Specify which project to use 1",
|
|
29
29
|
envvar="BASIC_MEMORY_PROJECT",
|
|
30
30
|
),
|
|
31
31
|
version: Optional[bool] = typer.Option(
|
|
@@ -38,6 +38,7 @@ def app_callback(
|
|
|
38
38
|
),
|
|
39
39
|
) -> None:
|
|
40
40
|
"""Basic Memory - Local-first personal knowledge management."""
|
|
41
|
+
|
|
41
42
|
# We use the project option to set the BASIC_MEMORY_PROJECT environment variable
|
|
42
43
|
# The config module will pick this up when loading
|
|
43
44
|
if project: # pragma: no cover
|
|
@@ -57,9 +58,13 @@ def app_callback(
|
|
|
57
58
|
|
|
58
59
|
config = new_config
|
|
59
60
|
|
|
61
|
+
# Run migrations for every command unless --version was specified
|
|
62
|
+
if not version and ctx.invoked_subcommand is not None:
|
|
63
|
+
from basic_memory.config import config
|
|
64
|
+
from basic_memory.services.initialization import ensure_initialize_database
|
|
65
|
+
|
|
66
|
+
ensure_initialize_database(config)
|
|
60
67
|
|
|
61
|
-
# Run database migrations
|
|
62
|
-
asyncio.run(db.run_migrations(config))
|
|
63
68
|
|
|
64
69
|
# Register sub-command groups
|
|
65
70
|
import_app = typer.Typer(help="Import data from various sources")
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
"""MCP server command."""
|
|
2
|
+
|
|
3
|
+
import basic_memory
|
|
4
|
+
from basic_memory.cli.app import app
|
|
5
|
+
|
|
6
|
+
# Import mcp instance
|
|
7
|
+
from basic_memory.mcp.server import mcp as mcp_server # pragma: no cover
|
|
8
|
+
|
|
9
|
+
# Import mcp tools to register them
|
|
10
|
+
import basic_memory.mcp.tools # noqa: F401 # pragma: no cover
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
@app.command()
|
|
14
|
+
def mcp(): # pragma: no cover
|
|
15
|
+
"""Run the MCP server"""
|
|
16
|
+
from basic_memory.config import config
|
|
17
|
+
import asyncio
|
|
18
|
+
from basic_memory.services.initialization import initialize_database
|
|
19
|
+
|
|
20
|
+
# First, run just the database migrations synchronously
|
|
21
|
+
asyncio.run(initialize_database(config))
|
|
22
|
+
|
|
23
|
+
# Load config to check if sync is enabled
|
|
24
|
+
from basic_memory.config import config_manager
|
|
25
|
+
|
|
26
|
+
basic_memory_config = config_manager.load_config()
|
|
27
|
+
|
|
28
|
+
if basic_memory_config.sync_changes:
|
|
29
|
+
# For now, we'll just log that sync will be handled by the MCP server
|
|
30
|
+
from loguru import logger
|
|
31
|
+
|
|
32
|
+
logger.info("File sync will be handled by the MCP server")
|
|
33
|
+
|
|
34
|
+
# Start the MCP server
|
|
35
|
+
mcp_server.run()
|
|
@@ -70,6 +70,7 @@ async def get_sync_service(): # pragma: no cover
|
|
|
70
70
|
|
|
71
71
|
# Create sync service
|
|
72
72
|
sync_service = SyncService(
|
|
73
|
+
config=config,
|
|
73
74
|
entity_service=entity_service,
|
|
74
75
|
entity_parser=entity_parser,
|
|
75
76
|
entity_repository=entity_repository,
|
|
@@ -178,14 +179,14 @@ async def run_sync(verbose: bool = False, watch: bool = False, console_status: b
|
|
|
178
179
|
)
|
|
179
180
|
|
|
180
181
|
# full sync - no progress bars in watch mode
|
|
181
|
-
await sync_service.sync(config.home
|
|
182
|
+
await sync_service.sync(config.home)
|
|
182
183
|
|
|
183
184
|
# watch changes
|
|
184
185
|
await watch_service.run() # pragma: no cover
|
|
185
186
|
else:
|
|
186
|
-
# one time sync
|
|
187
|
+
# one time sync
|
|
187
188
|
logger.info("Running one-time sync")
|
|
188
|
-
knowledge_changes = await sync_service.sync(config.home
|
|
189
|
+
knowledge_changes = await sync_service.sync(config.home)
|
|
189
190
|
|
|
190
191
|
# Log results
|
|
191
192
|
duration_ms = int((time.time() - start_time) * 1000)
|
|
@@ -236,11 +237,11 @@ def sync(
|
|
|
236
237
|
if not isinstance(e, typer.Exit):
|
|
237
238
|
logger.exception(
|
|
238
239
|
"Sync command failed",
|
|
239
|
-
project=config.project,
|
|
240
|
-
error=str(e),
|
|
241
|
-
error_type=type(e).__name__,
|
|
242
|
-
watch_mode=watch,
|
|
243
|
-
directory=str(config.home),
|
|
240
|
+
f"project={config.project},"
|
|
241
|
+
f"error={str(e)},"
|
|
242
|
+
f"error_type={type(e).__name__},"
|
|
243
|
+
f"watch_mode={watch},"
|
|
244
|
+
f"directory={str(config.home)}",
|
|
244
245
|
)
|
|
245
246
|
typer.echo(f"Error during sync: {e}", err=True)
|
|
246
247
|
raise typer.Exit(1)
|
|
@@ -2,31 +2,29 @@
|
|
|
2
2
|
|
|
3
3
|
import asyncio
|
|
4
4
|
import sys
|
|
5
|
-
from typing import
|
|
5
|
+
from typing import Annotated, List, Optional
|
|
6
6
|
|
|
7
7
|
import typer
|
|
8
8
|
from loguru import logger
|
|
9
9
|
from rich import print as rprint
|
|
10
10
|
|
|
11
11
|
from basic_memory.cli.app import app
|
|
12
|
-
from basic_memory.mcp.tools import build_context as mcp_build_context
|
|
13
|
-
from basic_memory.mcp.tools import read_note as mcp_read_note
|
|
14
|
-
from basic_memory.mcp.tools import recent_activity as mcp_recent_activity
|
|
15
|
-
from basic_memory.mcp.tools import search_notes as mcp_search
|
|
16
|
-
from basic_memory.mcp.tools import write_note as mcp_write_note
|
|
17
12
|
|
|
18
13
|
# Import prompts
|
|
19
14
|
from basic_memory.mcp.prompts.continue_conversation import (
|
|
20
15
|
continue_conversation as mcp_continue_conversation,
|
|
21
16
|
)
|
|
22
|
-
|
|
23
17
|
from basic_memory.mcp.prompts.recent_activity import (
|
|
24
18
|
recent_activity_prompt as recent_activity_prompt,
|
|
25
19
|
)
|
|
26
|
-
|
|
20
|
+
from basic_memory.mcp.tools import build_context as mcp_build_context
|
|
21
|
+
from basic_memory.mcp.tools import read_note as mcp_read_note
|
|
22
|
+
from basic_memory.mcp.tools import recent_activity as mcp_recent_activity
|
|
23
|
+
from basic_memory.mcp.tools import search_notes as mcp_search
|
|
24
|
+
from basic_memory.mcp.tools import write_note as mcp_write_note
|
|
27
25
|
from basic_memory.schemas.base import TimeFrame
|
|
28
26
|
from basic_memory.schemas.memory import MemoryUrl
|
|
29
|
-
from basic_memory.schemas.search import
|
|
27
|
+
from basic_memory.schemas.search import SearchItemType
|
|
30
28
|
|
|
31
29
|
tool_app = typer.Typer()
|
|
32
30
|
app.add_typer(tool_app, name="tool", help="Access to MCP tools via CLI")
|
|
@@ -198,13 +196,28 @@ def search_notes(
|
|
|
198
196
|
raise typer.Abort()
|
|
199
197
|
|
|
200
198
|
try:
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
199
|
+
if permalink and title: # pragma: no cover
|
|
200
|
+
typer.echo(
|
|
201
|
+
"Use either --permalink or --title, not both. Exiting.",
|
|
202
|
+
err=True,
|
|
203
|
+
)
|
|
204
|
+
raise typer.Exit(1)
|
|
205
|
+
|
|
206
|
+
# set search type
|
|
207
|
+
search_type = ("permalink" if permalink else None,)
|
|
208
|
+
search_type = ("permalink_match" if permalink and "*" in query else None,)
|
|
209
|
+
search_type = ("title" if title else None,)
|
|
210
|
+
search_type = "text" if search_type is None else search_type
|
|
211
|
+
|
|
212
|
+
results = asyncio.run(
|
|
213
|
+
mcp_search(
|
|
214
|
+
query,
|
|
215
|
+
search_type=search_type,
|
|
216
|
+
page=page,
|
|
217
|
+
after_date=after_date,
|
|
218
|
+
page_size=page_size,
|
|
219
|
+
)
|
|
206
220
|
)
|
|
207
|
-
results = asyncio.run(mcp_search(query=search_query, page=page, page_size=page_size))
|
|
208
221
|
# Use json module for more controlled serialization
|
|
209
222
|
import json
|
|
210
223
|
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
"""Main CLI entry point for basic-memory.""" # pragma: no cover
|
|
2
|
+
|
|
3
|
+
from basic_memory.cli.app import app # pragma: no cover
|
|
4
|
+
|
|
5
|
+
# Register commands
|
|
6
|
+
from basic_memory.cli.commands import ( # noqa: F401 # pragma: no cover
|
|
7
|
+
db,
|
|
8
|
+
import_chatgpt,
|
|
9
|
+
import_claude_conversations,
|
|
10
|
+
import_claude_projects,
|
|
11
|
+
import_memory_json,
|
|
12
|
+
mcp,
|
|
13
|
+
project,
|
|
14
|
+
status,
|
|
15
|
+
sync,
|
|
16
|
+
tool,
|
|
17
|
+
)
|
|
18
|
+
from basic_memory.config import config
|
|
19
|
+
from basic_memory.services.initialization import ensure_initialization
|
|
20
|
+
|
|
21
|
+
if __name__ == "__main__": # pragma: no cover
|
|
22
|
+
# Run initialization if we are starting as a module
|
|
23
|
+
ensure_initialization(config)
|
|
24
|
+
|
|
25
|
+
# start the app
|
|
26
|
+
app()
|