Smart Vault is a Python-based system designed to enhance Obsidian note-taking workflows. It leverages advanced Natural Language Processing (NLP) techniques to extract entities and relationships from your Obsidian vault, building a knowledge graph that facilitates better organization and understanding of your notes. This project is geared towards users of Obsidian who want to improve their note organization and discover connections between seemingly disparate pieces of information.
- Entity Extraction: Identifies key entities (people, places, concepts) within your Obsidian notes.
- Relationship Extraction: Discovers relationships between entities, creating a knowledge graph.
- Automated Link Creation: Suggests and creates links between relevant notes based on extracted entities and relationships.
- Note Organization: Helps organize your notes by automatically grouping related information.
- Knowledge Graph Export: Exports the generated knowledge graph for further analysis or visualization.
- Obsidian Vault Synchronization: Facilitates syncing the knowledge graph with your Obsidian vault.
- Customizable Configuration: Allows tailoring the system's behavior through a YAML configuration file.
- Entity Type Inference: Automatically infers entity types from PARA folder structure and filename patterns.
- Language: Python
- Libraries: (Specific libraries used will need to be determined by examining
pyproject.tomlanduv.lockfiles - likely includes NLP libraries like spaCy or similar, YAML parsing libraries)
- Python 3.x (version specified in
pyproject.toml) pip(Python package installer)- Obsidian (with a vault to process)
-
Clone the repository:
git clone https://github.com/mahdz/smart-vault.git cd smart-vault -
Install dependencies:
pip install -r requirements.txt #(or use `pip install --upgrade pip` and then `pip install .` if a `pyproject.toml` is used for managing dependencies.) -
Configure
config.yaml:- Adjust settings in
config.yamlto specify the path to your Obsidian vault and other preferences.
- Adjust settings in
-
Preprocessing (Recommended): Run entity type inference before main processing:
python add-entity-types.py --apply # Apply entity type inference from PARA structure -
Run the main processing scripts:
python organize_notes.py # Organizes notes based on detected relationships. python export_memory.py # Exports a representation of the knowledge graph python auto_relation_inserter.py # Creates links between related notes. python memory_classify_links.py # Classify links based on context python memory_insert_links.py # Insert newly classified links in the knowledge graph.
-
Optional: Use
sync-with-obsidian.sh: This script will need further analysis to understand its function in more detail, it's likely meant to sync changes back to obsidian vault (after editing the graph in memory)
smart-vault/
├── add-entity-types.py # Entity type inference from PARA structure
├── auto_relation_inserter.py
├── config.yaml
├── entity_merge.py
├── export_memory.py
├── interactive_link_creator.py
├── memory-bank/
├── memory_classify_links.py
├── memory_insert_links.py
├── organize_notes.py
├── pyproject.toml
├── sync-with-obsidian.sh
├── test_entity_linker.py
└── uv.lock
The system is configured via config.yaml. This file specifies the path to your Obsidian vault, the NLP model to use (if applicable), and other parameters. Examine config.yaml for detailed configuration options.
The add-entity-types.py script automatically infers entity types based on:
- PARA Folder Structure: Maps folders like
00-inbox,01-daily,02-projectsto appropriate entity types - Filename Patterns: Recognizes patterns like
task-*, date prefixes,prompt,guide, etc. - Dry-Run Safety: Use without
--applyflag to preview changes safely
Usage:
python add-entity-types.py # Dry run - preview changes
python add-entity-types.py --apply # Apply changes to filesThe test_entity_linker.py file contains unit tests. To run them:
pytest #Requires pytest to be installed as a dependencyContributions are welcome! Please open an issue to discuss any proposed changes or features.
This project is licensed under the MIT License - see the LICENSE file for details.
Made with ❤️ by mahdz