bkmr


Namebkmr JSON
Version 2.0.1 PyPI version JSON
download
home_pageNone
SummarySuper fast bookmark manager with semantic full text search'
upload_time2024-09-01 12:38:40
maintainerNone
docs_urlNone
authorNone
requires_python>=3.10
licenseBSD-3-Clause
keywords bookmark launcher
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # bkmr

### [Generalized Semantic Search](https://github.com/sysid/bkmr/wiki/Semantic-Search)

# Ultrafast Bookmark Manager and Launcher

> New Feature: Semantic Search (AI Embeddings)

[Elevating Bookmark Management with AI-Driven Semantic Search](https://sysid.github.io/elevating-bookmark-management-with-ai-driven-semantic-search/)

Features:
- semantic search using OpenAI embeddings (requires OpenAI API key)
- full-text search with semantic ranking (FTS5)
- fuzzy search `--fzf` (CTRL-O: copy to clipboard, CTRL-E: edit, CTRL-D: delete, Enter: open)
- tags for classification
- can handle HTTP URLs, directories, files (e.g. Office, Images, ....)
- can execute URI strings as shell commands via protocol prefix: 'shell::'
  URI-Example: `shell::vim +/"## SqlAlchemy" $HOME/document.md`
- automatically enriches URLs with title and description from Web
- manages statistics about bookmark usage

**`bkmr search --fzf` is a great way to open bookmarks very fast.**

## Usage
```bash
bkmr --help

A Bookmark Manager and Launcher for the Terminal

Usage: bkmr [OPTIONS] [NAME] [COMMAND]

Commands:
  search      Searches Bookmarks
  sem-search  Semantic Search with OpenAI
  open        Open/launch bookmarks
  add         Add a bookmark
  delete      Delete bookmarks
  update      Update bookmarks
  edit        Edit bookmarks
  show        Show Bookmarks (list of ids, separated by comma, no blanks)
  surprise    Opens n random URLs
  tags        Tag for which related tags should be shown. No input: all tags are printed
  create-db   Initialize bookmark database
  backfill    Backfill embeddings for bookmarks
  load-texts  Load texts for semantic similarity search
  help        Print this message or the help of the given subcommand(s)

Arguments:
  [NAME]  Optional name to operate on
```

<a href="https://asciinema.org/a/ULCDIrw4pG9diaVJb17AjIAa7?autoplay=1&speed=2"><img src="https://asciinema.org/a/ULCDIrw4pG9diaVJb17AjIAa7.png" width="836"/></a>

### Examples
```bash
# FTS examples (https://www.sqlite.org/fts5.htm)
bkmr search '"https://securit" *'
bkmr search 'security NOT keycloak'

# FTS combined with tag filtering
bkmr search -t tag1,tag2 -n notag1 <searchquery>

# Search by any tag and sort by bookmark age ascending
bkmr search -T tag1,tag2 -O

# Give me the 10 oldest bookmarks
bkmr search -O --limit 10

# Adding URI to local files
bkmr add /home/user/presentation.pptx tag1,tag2 --title 'My super Presentation'

# Adding shell commands as URI
bkmr add "shell::vim +/'# SqlAlchemy' sql.md" shell,sql,doc --title 'sqlalchemy snippets'

# JSON dump of entire database
bkmr search --json

# Semantic Search based on OpenAI Embeddings
bkmr --openai sem-search "python security"  # requires OPENAI_API_KEY
```
Tags must be separated by comma without blanks.

## Installation
1. `cargo install bkmr`
2. initialize the database: `bkmr create-db db_path`
3. `export "BKMR_DB_URL=db-path"`, location of created sqlite database must be known
4. add URLs

More configuration options can be found at [documentation page](https://github.com/sysid/bkmr/wiki/configuration).

### Upgrade to 1.x.x
A database migration will be performed on the first run of the new version.
This will add two columns to the bookmarks table for the OpenAI embeddings.
No destructive changes are made to the database.

## Semantic Search
`bkmr` provides now full semantic search of generalized bookmarks using OpenAI's Embeddings. 

You can find more information on the [documentation page](https://github.com/sysid/bkmr/wiki/semantic-search).

## Benchmarking
- ca. 20x faster than the Python original [twbm](https://github.com/sysid/twbm) after warming up Python.
```bash
time twbm search 'zzz*' --np
0. zzzeek : Asynchronous Python and Databases [343]
   https://techspot.zzzeek.org/2015/02/15/asynchronous-python-and-databases/
   async, knowhow, py


Found: 1
343

real    0m0.501s
user    0m0.268s
sys     0m0.070s



time bkmr search 'zzz*' --np
1. zzzeek : Asynchronous Python and Databases [343]
   https://techspot.zzzeek.org/2015/02/15/asynchronous-python-and-databases/
   async knowhow py


real    0m0.027s
user    0m0.008s
sys     0m0.016s
```
[sysid blog: bkmr](https://sysid.github.io/bkmr/)


<!-- Badges -->
[pypi-image]: https://img.shields.io/pypi/v/bkmr?color=blue
[pypi-url]: https://pypi.org/project/bkmr/
[build-image]: https://github.com/sysid/bkmr/actions/workflows/build.yml/badge.svg
[build-url]: https://github.com/sysid/bkmr/actions/workflows/build.yml
[coverage-image]: https://codecov.io/gh/sysid/bkmr/branch/main/graph/badge.svg
[coverage-url]: https://codecov.io/gh/sysid/bkmr
[quality-image]: https://api.codeclimate.com/v1/badges/3130fa0ba3b7993fbf0a/maintainability
[quality-url]: https://codeclimate.com/github/nalgeon/podsearch-py


            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "bkmr",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.10",
    "maintainer_email": null,
    "keywords": "bookmark, launcher",
    "author": null,
    "author_email": "sysid <sysid@gmx.de>",
    "download_url": null,
    "platform": null,
    "description": "# bkmr\n\n### [Generalized Semantic Search](https://github.com/sysid/bkmr/wiki/Semantic-Search)\n\n# Ultrafast Bookmark Manager and Launcher\n\n> New Feature: Semantic Search (AI Embeddings)\n\n[Elevating Bookmark Management with AI-Driven Semantic Search](https://sysid.github.io/elevating-bookmark-management-with-ai-driven-semantic-search/)\n\nFeatures:\n- semantic search using OpenAI embeddings (requires OpenAI API key)\n- full-text search with semantic ranking (FTS5)\n- fuzzy search `--fzf` (CTRL-O: copy to clipboard, CTRL-E: edit, CTRL-D: delete, Enter: open)\n- tags for classification\n- can handle HTTP URLs, directories, files (e.g. Office, Images, ....)\n- can execute URI strings as shell commands via protocol prefix: 'shell::'\n  URI-Example: `shell::vim +/\"## SqlAlchemy\" $HOME/document.md`\n- automatically enriches URLs with title and description from Web\n- manages statistics about bookmark usage\n\n**`bkmr search --fzf` is a great way to open bookmarks very fast.**\n\n## Usage\n```bash\nbkmr --help\n\nA Bookmark Manager and Launcher for the Terminal\n\nUsage: bkmr [OPTIONS] [NAME] [COMMAND]\n\nCommands:\n  search      Searches Bookmarks\n  sem-search  Semantic Search with OpenAI\n  open        Open/launch bookmarks\n  add         Add a bookmark\n  delete      Delete bookmarks\n  update      Update bookmarks\n  edit        Edit bookmarks\n  show        Show Bookmarks (list of ids, separated by comma, no blanks)\n  surprise    Opens n random URLs\n  tags        Tag for which related tags should be shown. No input: all tags are printed\n  create-db   Initialize bookmark database\n  backfill    Backfill embeddings for bookmarks\n  load-texts  Load texts for semantic similarity search\n  help        Print this message or the help of the given subcommand(s)\n\nArguments:\n  [NAME]  Optional name to operate on\n```\n\n<a href=\"https://asciinema.org/a/ULCDIrw4pG9diaVJb17AjIAa7?autoplay=1&speed=2\"><img src=\"https://asciinema.org/a/ULCDIrw4pG9diaVJb17AjIAa7.png\" width=\"836\"/></a>\n\n### Examples\n```bash\n# FTS examples (https://www.sqlite.org/fts5.htm)\nbkmr search '\"https://securit\" *'\nbkmr search 'security NOT keycloak'\n\n# FTS combined with tag filtering\nbkmr search -t tag1,tag2 -n notag1 <searchquery>\n\n# Search by any tag and sort by bookmark age ascending\nbkmr search -T tag1,tag2 -O\n\n# Give me the 10 oldest bookmarks\nbkmr search -O --limit 10\n\n# Adding URI to local files\nbkmr add /home/user/presentation.pptx tag1,tag2 --title 'My super Presentation'\n\n# Adding shell commands as URI\nbkmr add \"shell::vim +/'# SqlAlchemy' sql.md\" shell,sql,doc --title 'sqlalchemy snippets'\n\n# JSON dump of entire database\nbkmr search --json\n\n# Semantic Search based on OpenAI Embeddings\nbkmr --openai sem-search \"python security\"  # requires OPENAI_API_KEY\n```\nTags must be separated by comma without blanks.\n\n## Installation\n1. `cargo install bkmr`\n2. initialize the database: `bkmr create-db db_path`\n3. `export \"BKMR_DB_URL=db-path\"`, location of created sqlite database must be known\n4. add URLs\n\nMore configuration options can be found at [documentation page](https://github.com/sysid/bkmr/wiki/configuration).\n\n### Upgrade to 1.x.x\nA database migration will be performed on the first run of the new version.\nThis will add two columns to the bookmarks table for the OpenAI embeddings.\nNo destructive changes are made to the database.\n\n## Semantic Search\n`bkmr` provides now full semantic search of generalized bookmarks using OpenAI's Embeddings. \n\nYou can find more information on the [documentation page](https://github.com/sysid/bkmr/wiki/semantic-search).\n\n## Benchmarking\n- ca. 20x faster than the Python original [twbm](https://github.com/sysid/twbm) after warming up Python.\n```bash\ntime twbm search 'zzz*' --np\n0. zzzeek : Asynchronous Python and Databases [343]\n   https://techspot.zzzeek.org/2015/02/15/asynchronous-python-and-databases/\n   async, knowhow, py\n\n\nFound: 1\n343\n\nreal    0m0.501s\nuser    0m0.268s\nsys     0m0.070s\n\n\n\ntime bkmr search 'zzz*' --np\n1. zzzeek : Asynchronous Python and Databases [343]\n   https://techspot.zzzeek.org/2015/02/15/asynchronous-python-and-databases/\n   async knowhow py\n\n\nreal    0m0.027s\nuser    0m0.008s\nsys     0m0.016s\n```\n[sysid blog: bkmr](https://sysid.github.io/bkmr/)\n\n\n<!-- Badges -->\n[pypi-image]: https://img.shields.io/pypi/v/bkmr?color=blue\n[pypi-url]: https://pypi.org/project/bkmr/\n[build-image]: https://github.com/sysid/bkmr/actions/workflows/build.yml/badge.svg\n[build-url]: https://github.com/sysid/bkmr/actions/workflows/build.yml\n[coverage-image]: https://codecov.io/gh/sysid/bkmr/branch/main/graph/badge.svg\n[coverage-url]: https://codecov.io/gh/sysid/bkmr\n[quality-image]: https://api.codeclimate.com/v1/badges/3130fa0ba3b7993fbf0a/maintainability\n[quality-url]: https://codeclimate.com/github/nalgeon/podsearch-py\n\n",
    "bugtrack_url": null,
    "license": "BSD-3-Clause",
    "summary": "Super fast bookmark manager with semantic full text search'",
    "version": "2.0.1",
    "project_urls": {
        "Source Code": "https://github.com/sysid/bkmr"
    },
    "split_keywords": [
        "bookmark",
        " launcher"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "801a06551ef4c72ade6b736de78f5c36ce958d6445c69aa34ec0bca3ff558fbb",
                "md5": "63367e7f86af39a09d4b0d9046d413a1",
                "sha256": "e68fd03646a626186a6605e047d8b8409f0d9ec38e019e7c889f1d0028a86fc4"
            },
            "downloads": -1,
            "filename": "bkmr-2.0.1-cp312-cp312-manylinux_2_34_x86_64.whl",
            "has_sig": false,
            "md5_digest": "63367e7f86af39a09d4b0d9046d413a1",
            "packagetype": "bdist_wheel",
            "python_version": "cp312",
            "requires_python": ">=3.10",
            "size": 7552414,
            "upload_time": "2024-09-01T12:38:40",
            "upload_time_iso_8601": "2024-09-01T12:38:40.891393Z",
            "url": "https://files.pythonhosted.org/packages/80/1a/06551ef4c72ade6b736de78f5c36ce958d6445c69aa34ec0bca3ff558fbb/bkmr-2.0.1-cp312-cp312-manylinux_2_34_x86_64.whl",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-09-01 12:38:40",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "sysid",
    "github_project": "bkmr",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "bkmr"
}
        
Elapsed time: 4.83766s