Skip to main content

Booksmart CLI — a local, single-user front end over booksmart-core (embedded storage, no server).

Project description

booksmart

The Booksmart CLI — turn books into queryable knowledge, locally.

A single-user front end over booksmart-core: register PDFs/EPUBs, ingest them through the parsing → structure → profile → extraction → summaries → embeddings pipeline, and browse the results. Everything runs against an auto-migrated SQLite file and embedded Qdrant under ~/.booksmart/ — no Docker, no Postgres, no server.

Install

Needs Python 3.12 or newer. booksmart is a command-line tool, so install it into its own environment rather than into a project's:

$ uv tool install booksmart
$ pipx install booksmart

Either puts a booksmart command on your PATH. Plain pip install booksmart also works if you would rather have it in the current environment. booksmart-core comes along as a dependency in every case.

Quickstart

$ booksmart add ./clean-code.pdf --title "Clean Code" --author "Robert C. Martin"
$ booksmart ingest <book-id>
$ booksmart structure <book-id>
$ booksmart knowledge list <book-id>
$ booksmart search all "how do deep modules reduce complexity"

ingest calls an LLM and an embedding provider, so it needs credentials — ANTHROPIC_API_KEY and OPENAI_API_KEY by default. To drive the whole pipeline with no keys, no network and no cost, select the deterministic fake providers:

$ BOOKSMART_LLM_PROVIDER=fake BOOKSMART_EMBEDDING_PROVIDER=fake booksmart ingest <book-id>

Commands

add, ingest, books list/show/update, runs list/show, structure, profile, knowledge list/show, search.

Search

booksmart search <book-id|all> "<query>" ranks the chapters, sections and knowledge objects most similar to a natural-language query, over the embeddings an ingest produced. Restrict it with --type (repeatable: chapter, section, knowledge_object), cap it with --limit, and drop weak hits with --score-threshold (a cosine similarity, -11).

The query is embedded with the model the vector collection is locked to; if that is not the currently configured embedding model, search refuses rather than return plausible, silently wrong rankings (ADR 0001).

Configuration

Providers and locations come from BOOKSMART_* environment variables (e.g. BOOKSMART_LLM_PROVIDER, BOOKSMART_HOME). Set BOOKSMART_QDRANT_URL to use a Qdrant server instead of the embedded on-disk store.

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

booksmart-0.1.1.tar.gz (17.0 kB view details)

Uploaded Source

Built Distribution

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

booksmart-0.1.1-py3-none-any.whl (15.7 kB view details)

Uploaded Python 3

File details

Details for the file booksmart-0.1.1.tar.gz.

File metadata

  • Download URL: booksmart-0.1.1.tar.gz
  • Upload date:
  • Size: 17.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for booksmart-0.1.1.tar.gz
Algorithm Hash digest
SHA256 1641c457f412b484ae228ed845038135447bf21175c0a18a4ce2645a1fd91689
MD5 f1b933d82a579922d4e958f3ccc5bc3e
BLAKE2b-256 ad43b509f7bfc6ad5e42973aab6321cc1eb7399f6b696e2e11ed1cac73dc5a64

See more details on using hashes here.

Provenance

The following attestation bundles were made for booksmart-0.1.1.tar.gz:

Publisher: publish.yml on dworznik/booksmart

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file booksmart-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: booksmart-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 15.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for booksmart-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 56d656f6ad041a8c9caa6f35eddeacbe7eecd4307cf5d94b3d6c53d731586d82
MD5 d1caf07ee6980768363b98fb796f27c6
BLAKE2b-256 578bcbf8539e202ec542c0ec33aa2b6ef53391f46337c99dd960fe39264788a6

See more details on using hashes here.

Provenance

The following attestation bundles were made for booksmart-0.1.1-py3-none-any.whl:

Publisher: publish.yml on dworznik/booksmart

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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