Skip to main content

AI-powered personal ebook library manager

Project description

Libra

AI-powered personal ebook library manager. Scan your collection, auto-tag with AI, search by meaning, clean up messy filenames.

Features

  • AI tagging — auto-generate tags, clean titles, detect authors from messy filenames
  • Semantic search — find files by concept, not just keywords ("那篇讲垃圾回收的论文")
  • Three-layer search — FTS5 keyword + vector similarity + path matching
  • Multi-version grouping — automatically groups editions and formats of the same work
  • Rename — batch rename files based on canonical metadata, cross-platform safe
  • fzf integration — interactive browse with preview, open, edit, copy path
  • Controlled vocabulary — tags from a predefined taxonomy, extensible

Install

# From PyPI
pip install libra-ebook

# From source
git clone https://github.com/balusch/libra && cd libra
uv sync

Quick Start

# Set your OpenAI API key
export OPENAI_API_KEY="sk-..."

# Scan your library
libra scan ~/Documents/EBooks

# Search
libra search "distributed systems"
libra search "垃圾回收" --fzf

# Browse interactively
libra browse --tag ai

# See what you have
libra stats
libra tags
libra dupes

Commands

Command Description
libra scan [PATH] Scan directory, AI tag & embed (--limit N to cap)
libra search QUERY Three-layer search (FTS + semantic + path)
libra browse Interactive fzf browser
libra list List files with filters
libra show ID|PATH Show file details (by ID or path)
libra open ID Open file with system app
libra edit ID Edit tags/metadata
libra related ID Find similar files
libra prefer ID Mark preferred version
libra retag Re-run AI tagging on selected files
libra summarize Generate AI summaries from file content
libra rename [PATH] Rename files from metadata (--id ID for single file)
libra tags List tags with counts
libra dupes Find duplicates + versions
libra stats Library statistics
libra export Export index (JSON/CSV)

Configuration

# ~/.config/libra/config.toml

[api]
openai_key = "sk-..."          # or use OPENAI_API_KEY env var

[library]
paths = ["~/Documents/EBooks"]

[search]
weight_fts = 0.4                 # keyword search weight
weight_semantic = 0.5            # semantic search weight
weight_path = 0.1                # path match weight

The database is stored at {library_path}/.libra/libra.db.

Shell Completion

# bash
libra --install-completion bash

# zsh
libra --install-completion zsh

# fish
libra --install-completion fish

Development

uv sync --all-groups   # install with dev deps
make check             # lint + typecheck + test
make format            # auto-format
make build             # build distribution

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

libra_ebook-0.1.0.tar.gz (123.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

libra_ebook-0.1.0-py3-none-any.whl (43.1 kB view details)

Uploaded Python 3

File details

Details for the file libra_ebook-0.1.0.tar.gz.

File metadata

  • Download URL: libra_ebook-0.1.0.tar.gz
  • Upload date:
  • Size: 123.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.7 {"installer":{"name":"uv","version":"0.11.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for libra_ebook-0.1.0.tar.gz
Algorithm Hash digest
SHA256 9fda187d25db4370c8400eb37c63578f8d4e187be003c4018c332f2c9797c9d1
MD5 45914a1c442fc9a71b9dbef58d9389e3
BLAKE2b-256 77b98f7cb3837fcbe9620acb26ac29001b654889cc063e873dc381797afcab0d

See more details on using hashes here.

File details

Details for the file libra_ebook-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: libra_ebook-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 43.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.7 {"installer":{"name":"uv","version":"0.11.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for libra_ebook-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 4f2cf9b8d64ac18f37761eb616338f27592416d092b2e06743fb4c7bdd60fdd2
MD5 e7258998a922a1ef767208c278c83938
BLAKE2b-256 d6f3e79116f8669983c41d917302480c5792bec53242e7042bb8bf1d4e1c9f5d

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page