# bookworm 📖
[![main](https://github.com/kiran94/bookworm/actions/workflows/main.yml/badge.svg)](https://github.com/kiran94/bookworm/actions/workflows/main.yml) [![PyPI version](https://badge.fury.io/py/bookworm_genai.svg)](https://badge.fury.io/py/bookworm_genai)
> LLM-powered bookmark search engine
`bookworm` allows you to search your locally stored bookmarks using human language.
## Install
```bash
python -m pip install bookworm_genai
```
## Usage
```bash
export OPENAI_API_KEY=
# Run once and then anytime bookmarks across supported browsers changes
bookworm sync
# Ask questions against the bookmark database
bookworm ask
# Ask questions against the bookmark database
# Specify the query when invoking the command
# If you omit this then you will be asked for a query when the tool is running
bookworm ask -q pandas
# Ask questions against the bookmark database and specify the number of results that should come back
bookworm ask -n 1
```
The `sync` process currently supports the following configurations:
| Operating System | Google Chrome | Mozilla Firefox | Brave | Microsoft Edge |
| ------------------ | --------------- | ----------------- | ------- | ---------------- |
| **Linux** | ✅ | ✅ | ✅ | ❌ |
| **macOS** | ✅ | ❌ | ❌ | ❌ |
| **Windows** | ❌ | ❌ | ❌ | ❌ |
## Processes
*`bookworm sync`*
```python
python -m bookworm sync
```
```mermaid
graph LR
subgraph Bookmarks
Chrome(Chrome Bookmarks)
Brave(Brave Bookmarks)
Firefox(Firefox Bookmarks)
end
Bookworm(bookworm sync)
EmbeddingsService(Embeddings Service e.g OpenAIEmbeddings)
VectorStore(Vector Store e.g DuckDB)
Chrome -->|load bookmarks|Bookworm
Brave -->|load bookmarks|Bookworm
Firefox -->|load bookmarks|Bookworm
Bookworm -->|vectorize bookmarks|EmbeddingsService-->|store embeddings|VectorStore
```
---
*`bookworm ask`*
```python
python -m bookworm ask
```
```mermaid
graph LR
query
Bookworm(bookworm ask)
subgraph _
LLM(LLM e.g OpenAI)
VectorStore(Vector Store e.g DuckDB)
end
query -->|user queries for information|Bookworm
Bookworm -->|simularity search|VectorStore -->|send similar docs + user query|LLM
LLM -->|send back response|Bookworm
```
---
## Developer Setup
```bash
# LLMs
export OPENAI_API_KEY=
# Langchain (optional, but useful for debugging)
export LANGCHAIN_API_KEY=
export LANGCHAIN_TRACING_V2=true
export LANGCHAIN_PROJECT=bookworm
# Misc (optional)
export LOGGING_LEVEL=INFO
```
Recommendations:
- Install [`pyenv`](https://github.com/pyenv/pyenv?tab=readme-ov-file#installation) and ensure [build dependencies are installed](https://github.com/pyenv/pyenv?tab=readme-ov-file#install-python-build-dependencies) for your OS.
- Install [Poetry](https://python-poetry.org/docs/) we will be using [environment management](https://python-poetry.org/docs/managing-environments/) below.
```bash
poetry env use 3.9 # or path to your 3.9 installation
poetry shell
poetry install
bookworm --help
```
Raw data
{
"_id": null,
"home_page": "https://pypi.org/project/bookworm_genai/",
"name": "bookworm_genai",
"maintainer": null,
"docs_url": null,
"requires_python": "<4.0,>=3.9",
"maintainer_email": null,
"keywords": "bookmarks, bookmark-manager, genai, chatbots",
"author": "kiran94",
"author_email": null,
"download_url": "https://files.pythonhosted.org/packages/55/e0/337f6b2d8b8e17220783ddc0bf4efb97673a667d0a999c546776685a44f2/bookworm_genai-0.7.0.tar.gz",
"platform": null,
"description": "# bookworm \ud83d\udcd6\n\n[![main](https://github.com/kiran94/bookworm/actions/workflows/main.yml/badge.svg)](https://github.com/kiran94/bookworm/actions/workflows/main.yml) [![PyPI version](https://badge.fury.io/py/bookworm_genai.svg)](https://badge.fury.io/py/bookworm_genai)\n\n> LLM-powered bookmark search engine\n\n`bookworm` allows you to search your locally stored bookmarks using human language.\n\n## Install\n\n```bash\npython -m pip install bookworm_genai\n```\n\n## Usage\n\n```bash\nexport OPENAI_API_KEY=\n\n# Run once and then anytime bookmarks across supported browsers changes\nbookworm sync\n\n# Ask questions against the bookmark database\nbookworm ask\n\n# Ask questions against the bookmark database\n# Specify the query when invoking the command\n# If you omit this then you will be asked for a query when the tool is running\nbookworm ask -q pandas\n\n# Ask questions against the bookmark database and specify the number of results that should come back\nbookworm ask -n 1\n```\n\nThe `sync` process currently supports the following configurations:\n\n| Operating System | Google Chrome | Mozilla Firefox | Brave | Microsoft Edge |\n| ------------------ | --------------- | ----------------- | ------- | ---------------- |\n| **Linux** | \u2705 | \u2705 | \u2705 | \u274c |\n| **macOS** | \u2705 | \u274c | \u274c | \u274c |\n| **Windows** | \u274c | \u274c | \u274c | \u274c |\n\n## Processes\n\n*`bookworm sync`*\n\n```python\npython -m bookworm sync\n```\n\n```mermaid\ngraph LR\n\nsubgraph Bookmarks\n Chrome(Chrome Bookmarks)\n Brave(Brave Bookmarks)\n Firefox(Firefox Bookmarks)\nend\n\nBookworm(bookworm sync)\n\nEmbeddingsService(Embeddings Service e.g OpenAIEmbeddings)\n\nVectorStore(Vector Store e.g DuckDB)\n\nChrome -->|load bookmarks|Bookworm\nBrave -->|load bookmarks|Bookworm\nFirefox -->|load bookmarks|Bookworm\n\nBookworm -->|vectorize bookmarks|EmbeddingsService-->|store embeddings|VectorStore\n```\n\n---\n\n*`bookworm ask`*\n\n```python\npython -m bookworm ask\n```\n\n```mermaid\ngraph LR\n\nquery\nBookworm(bookworm ask)\n\nsubgraph _\n LLM(LLM e.g OpenAI)\n VectorStore(Vector Store e.g DuckDB)\nend\n\nquery -->|user queries for information|Bookworm\n\nBookworm -->|simularity search|VectorStore -->|send similar docs + user query|LLM\nLLM -->|send back response|Bookworm\n```\n\n---\n\n## Developer Setup\n\n```bash\n# LLMs\nexport OPENAI_API_KEY=\n\n# Langchain (optional, but useful for debugging)\nexport LANGCHAIN_API_KEY=\nexport LANGCHAIN_TRACING_V2=true\nexport LANGCHAIN_PROJECT=bookworm\n\n# Misc (optional)\nexport LOGGING_LEVEL=INFO\n```\n\nRecommendations:\n\n- Install [`pyenv`](https://github.com/pyenv/pyenv?tab=readme-ov-file#installation) and ensure [build dependencies are installed](https://github.com/pyenv/pyenv?tab=readme-ov-file#install-python-build-dependencies) for your OS.\n- Install [Poetry](https://python-poetry.org/docs/) we will be using [environment management](https://python-poetry.org/docs/managing-environments/) below.\n\n\n```bash\npoetry env use 3.9 # or path to your 3.9 installation\n\npoetry shell\npoetry install\n\nbookworm --help\n```\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "Bookworm - A LLM-powered bookmark search engine",
"version": "0.7.0",
"project_urls": {
"Documentation": "https://github.com/kiran94/bookworm/blob/main/README.md",
"Homepage": "https://pypi.org/project/bookworm_genai/",
"Repository": "https://github.com/kiran94/bookworm"
},
"split_keywords": [
"bookmarks",
" bookmark-manager",
" genai",
" chatbots"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "3261ccd278189c4eb7fada54a9c7e1605344080c02afe1ba4554c65ad61a2534",
"md5": "b0f6b0152a77ab02933052b4a9eec3a1",
"sha256": "8b9e8cd4ed4ff3d2f381a8ccad70bc42db6e8a1096ea722d87fe32bfa77284c8"
},
"downloads": -1,
"filename": "bookworm_genai-0.7.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "b0f6b0152a77ab02933052b4a9eec3a1",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": "<4.0,>=3.9",
"size": 11151,
"upload_time": "2024-08-26T12:00:54",
"upload_time_iso_8601": "2024-08-26T12:00:54.238628Z",
"url": "https://files.pythonhosted.org/packages/32/61/ccd278189c4eb7fada54a9c7e1605344080c02afe1ba4554c65ad61a2534/bookworm_genai-0.7.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "55e0337f6b2d8b8e17220783ddc0bf4efb97673a667d0a999c546776685a44f2",
"md5": "5d9577557c49221cdb7d1644d411ab4c",
"sha256": "7f8680ce93217c47fec88845ac7593c3b11a605af560328037f433d49eb99d37"
},
"downloads": -1,
"filename": "bookworm_genai-0.7.0.tar.gz",
"has_sig": false,
"md5_digest": "5d9577557c49221cdb7d1644d411ab4c",
"packagetype": "sdist",
"python_version": "source",
"requires_python": "<4.0,>=3.9",
"size": 9337,
"upload_time": "2024-08-26T12:00:55",
"upload_time_iso_8601": "2024-08-26T12:00:55.424733Z",
"url": "https://files.pythonhosted.org/packages/55/e0/337f6b2d8b8e17220783ddc0bf4efb97673a667d0a999c546776685a44f2/bookworm_genai-0.7.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-08-26 12:00:55",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "kiran94",
"github_project": "bookworm",
"github_not_found": true,
"lcname": "bookworm_genai"
}