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
ingest calls an LLM and an embedding provider, so it needs credentials —
an Anthropic key (LLM) and an OpenAI key (embeddings) by default. Set them
once; they persist in ~/.booksmart/config.toml:
$ booksmart config set anthropic_api_key # hidden prompt, or pipe the key in
$ booksmart config set openai_api_key
$ 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"
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, config set/get/unset/list.
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, -1–1).
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
Any setting — provider, model, API keys, locations — can be persisted with
booksmart config set <field> [value] (omit the value to enter it via hidden
prompt or piped stdin, keeping keys out of shell history). Values live in
~/.booksmart/config.toml, created 0600 and safe to hand-edit.
Each setting resolves through one chain, highest first:
BOOKSMART_*environment variables (e.g.BOOKSMART_LLM_PROVIDER) — explicit targeting for scripts and one-offs.config.toml— whatconfig setwrites.- The vendors' conventional variables (
ANTHROPIC_API_KEY,OPENAI_API_KEY,GEMINI_API_KEY) — API keys only, so an already-exported key just works. - Defaults (SQLite,
storage/and embedded Qdrant under~/.booksmart).
booksmart config list shows every field's effective value and which layer it
came from. Set BOOKSMART_QDRANT_URL (or config set qdrant_url ...) to use a
Qdrant server instead of the embedded on-disk store; BOOKSMART_HOME moves the
whole installation.
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file booksmart-0.2.0.tar.gz.
File metadata
- Download URL: booksmart-0.2.0.tar.gz
- Upload date:
- Size: 21.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9e912e6dd858c910d12871bc6c6dc9a3e0cb230bb23544a8c011f9810e2d192c
|
|
| MD5 |
ffa9fb345060880cd9ae7fd9350ef5fd
|
|
| BLAKE2b-256 |
bf607e910541561bc91d5d3db66b0b9f404e1e8a03b7394984f20bd861d44002
|
Provenance
The following attestation bundles were made for booksmart-0.2.0.tar.gz:
Publisher:
publish.yml on dworznik/booksmart
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
booksmart-0.2.0.tar.gz -
Subject digest:
9e912e6dd858c910d12871bc6c6dc9a3e0cb230bb23544a8c011f9810e2d192c - Sigstore transparency entry: 2131008227
- Sigstore integration time:
-
Permalink:
dworznik/booksmart@31629df1b25ea83a7baf720b09428f0bc0bafacb -
Branch / Tag:
refs/tags/cli-v0.2.0 - Owner: https://github.com/dworznik
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@31629df1b25ea83a7baf720b09428f0bc0bafacb -
Trigger Event:
push
-
Statement type:
File details
Details for the file booksmart-0.2.0-py3-none-any.whl.
File metadata
- Download URL: booksmart-0.2.0-py3-none-any.whl
- Upload date:
- Size: 19.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
791b8e166675e07cabd53aafa8467b3c7afec5d19578ecd5f1a24f759ccdd929
|
|
| MD5 |
9130e52094ad2cfed5d7c8869d9d9b44
|
|
| BLAKE2b-256 |
23d76b243537857dd849091d241e06eeee51beb1f236e25fcfdb7a982f972904
|
Provenance
The following attestation bundles were made for booksmart-0.2.0-py3-none-any.whl:
Publisher:
publish.yml on dworznik/booksmart
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
booksmart-0.2.0-py3-none-any.whl -
Subject digest:
791b8e166675e07cabd53aafa8467b3c7afec5d19578ecd5f1a24f759ccdd929 - Sigstore transparency entry: 2131008278
- Sigstore integration time:
-
Permalink:
dworznik/booksmart@31629df1b25ea83a7baf720b09428f0bc0bafacb -
Branch / Tag:
refs/tags/cli-v0.2.0 - Owner: https://github.com/dworznik
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@31629df1b25ea83a7baf720b09428f0bc0bafacb -
Trigger Event:
push
-
Statement type: