booksmart
Turn books into queryable knowledge, on your own machine.
Point it at a PDF or an EPUB. It reads the book, works out its chapters and sections, extracts the ideas it teaches, summarises them, and makes the whole thing searchable in plain language — so you can ask "how do deep modules reduce complexity?" and get the passage that answers it, with the chapter it came from.
Everything stays local: an SQLite file and an embedded vector store under
~/.booksmart/. No Docker, no Postgres, no server, nothing to run alongside it.
Install
Python 3.12 or newer. booksmart is a command-line tool, so install it into its
own environment rather than a project's:
$ uv tool install booksmart
$ pipx install booksmart
Either puts a booksmart command on your PATH. Plain pip install booksmart
works too if you would rather have it in the current environment.
Quickstart
Reading a book calls an LLM and an embedding provider, so it needs credentials — by default an Anthropic key for the language model and an OpenAI key for embeddings. Set them once; they persist:
$ booksmart config set anthropic_api_key # hidden prompt, or pipe the key in
$ booksmart config set openai_api_key
$ booksmart add ./a-book.pdf --title "A Book About Software" --author "A. N. Author"
$ booksmart ingest <book-id>
$ booksmart search all "how do deep modules reduce complexity"
Then look around: booksmart structure <book-id> for the chapter tree,
booksmart knowledge list <book-id> for the ideas it pulled out, and
booksmart books list for what you have.
Want to try the whole pipeline with no keys, no network and no cost? Use the built-in fake providers:
$ BOOKSMART_LLM_PROVIDER=fake BOOKSMART_EMBEDDING_PROVIDER=fake booksmart ingest <book-id>
Searching
$ booksmart search <book-id|all> "<query>"
Search matches two ways at once — by meaning, so a question finds a passage phrased differently, and by words, so an exact term or a proper noun still ranks even if the model never learned it. Results fuse both.
--dense-only— match by meaning alone.--type— restrict tochapter,sectionorknowledge_object; repeatable.--limit— how many hits.--score-threshold— drop weak hits by similarity.
The score column means different things in the two modes, so the output says
which you are looking at. With --dense-only it is a similarity between -1 and
- Fused, it measures how strongly both kinds of matching agreed, and only
compares within one set of results — a fused
0.583can be the best hit there is.
Changing your embedding model means re-reading your books. Search refuses to run against a collection built with a different model rather than return plausible, silently wrong rankings — and tells you so.
Commands
add, ingest, books list/show/update, runs list/show, structure,
profile, knowledge list/show, search, config set/get/unset/list.
Configuration
Any setting — provider, model, API keys, locations — persists with
booksmart config set <field> [value]. Omit the value to enter it at a hidden
prompt or pipe it in, which keeps keys out of your shell history. Values live in
~/.booksmart/config.toml, created 0600 and safe to hand-edit.
Settings resolve through one chain, highest wins:
BOOKSMART_*environment variables (e.g.BOOKSMART_LLM_PROVIDER) — for scripts and one-offs.config.toml— whatconfig setwrites.- The vendors' own variables (
ANTHROPIC_API_KEY,OPENAI_API_KEY,GEMINI_API_KEY) — API keys only, so an already-exported key just works. - Defaults.
booksmart config list shows every field's effective value and which layer it
came from. BOOKSMART_QDRANT_URL points at a Qdrant server instead of the
embedded store; BOOKSMART_HOME moves the whole installation.
Built on booksmart-core, which is
the same pipeline as a library if you would rather call it than run it.
Metadata
Release files for booksmart 0.4.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| booksmart-0.4.0.tar.gz | 25.1 kB | With provenance | Details for booksmart-0.4.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| booksmart-0.4.0-py3-none-any.whl | Python 3 | none | any | Details for booksmart-0.4.0-py3-none-any.whl |
Total release size: 46.1 kB
Release files / booksmart-0.4.0.tar.gz
| Download URL | booksmart-0.4.0.tar.gz |
|---|---|
| Size | 25.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
6fa270d24cf66363b6bd59110df5d36ae7e20c9f2c41dfdd5d776c6c9de0e0ae
|
|
BLAKE2b-256 checksum How to use checksums |
aae02e6f19343f4688eafb50644f6a1b7285506b5f758c3e0a7efb72ee6be734
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 13, 2026.
Transparency logRelease files / booksmart-0.4.0-py3-none-any.whl
| Download URL | booksmart-0.4.0-py3-none-any.whl |
|---|---|
| Size | 20.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
93799c39863c94c0348204c5e1d5405f20848bd33b7e13ad5d78d7affc46b846
|
|
BLAKE2b-256 checksum How to use checksums |
0575301e83cfcdd0a325df7a00517f3a66e8773d4f41e74467919cf7dd5f0eee
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 13, 2026.
Transparency logSecurity for booksmart 0.4.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for booksmart-0.4.0.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 13, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.