crd/notes-analyzer

A python CLI to semantically search your Bear.app notes, and ask it questions, all with local models!

★ 0Forks 0GitHub ↗Compare

README

notes-analyzer

PyPI Changelog Tests License

Using smollm2 to interact with your Bear notes.

Search through and ask questions about your Bear notes using local AI models served by Ollama.

Quickstart

Run the following:

make init # pulls model down, starts ollama, syncs your Bear notes to a folder, and then indexes them as embeddings into ChromaDB sqlite db
make search # search through your notes using semantic search
make ask # generate AI responses to your prompts

Features

  • Semantic Search: Use make search to find relevant notes based on meaning, not just keywords
  • AI Generation: Use make ask to generate AI responses to your prompts
  • Bear Integration: Automatically syncs with your Bear notes
  • Local Processing: All processing happens on your machine using Ollama

Requirements

  • Bear notes installed on your Mac
  • Ollama installed on your Mac
  • Python installed on your Mac
    • Python 3.11.1 is recommended

Technology Used

  • smollm2 - a small language model for AI responses
  • nomic-embed-text - a small text embedding model for semantic search
  • ChromaDB - an open-source vector database to store and query embeddings
  • Ollama - an open-source language model runner

Installation

Install this tool using pip:

pip install notes-analyzer

Usage

For help, run:

notes-analyzer --help

Basic commands:

make sync   # Sync Bear notes to local directory
make index  # Create searchable index of your notes
make search # Search through your notes
make ask    # Generate AI responses to prompts

You can also use the Python module directly:

python -m notes_analyzer --help

Development

To contribute to this tool, first checkout the code. Then create a new virtual environment:

cd notes-analyzer
python -m venv venv
source venv/bin/activate

Now install the dependencies and test dependencies:

pip install -e '.[test]'

To run the tests:

python -m pytest

Contributors

program247365

Issues