BookLeme CLI
Python CLI that compiles a book into an installable Agent Skill: a knowledge pack or a behavior skill with verbatim quote checks
- 182 ★ on the repository
- Last commit
- MIT
Extended access
Why this level
- Reads your book files and writes skills, and with --install writes them into the agent skills directory
- A skill built from a book enters the agent as instructions and may diverge from your rights to the text
Install
Manual install
git clone https://github.com/bookleme/bookleme.git
cd bookleme
python3 -m bookleme --versionPython 3.9 or newer is required and there are no dependencies. Run on a book: python3 -m bookleme run --input <file> --title "<title>".
Access and checks
How we reviewExtended accessThe tool runs code or makes network calls and only reads external data.
- Reads your book files and writes skills, and with --install writes them into the agent skills directory
- A skill built from a book enters the agent as instructions and may diverge from your rights to the text
This is third-party code. Review the repository files before installing.
What it does
BookLeme reads a book and builds an Agent Skill from it. The author starts from the idea that a book is valuable for how the author works, such as the order of questions or the conditions and rules of verification, and that has to become a callable procedure. The book is read once at build time and at run time the agent loads the needed fragments. There are two kinds of output: knowledge_pack gives a reference with a topic index and behavior_skill gives a process with states, such as a coaching dialogue. The engine is chosen with --engine auto|knowledge_pack|behavior_skill|both, the genre through plugins such as coach_dialogue and knowledge_reference. Accepted formats are PDF, EPUB, DOCX, MD, HTML, RTF and MOBI. Verification runs through scripts. Every quote must be an exact substring of the book, and seven metrics, among them citation resolution rate, verbatim violations, overlap with the text and coverage, are labeled measured or heuristic. A group of copyright checks limits the quote share, and the --user-rights owned|licensed|public_domain|unknown flag records the rights to the book. Publishing needs the explicit confirmation --public --confirm-public PUBLISH.
Who it is for. Coaches, analysts and teachers who work with professional books and want agent skills from them in place of summaries.
Good fit when
- You have your own book or a book you have rights to use and want a dialogue skill from its method
- You need a reference to a book with a topic index and source links
- Before install you need a check that every quote is an exact substring of the text
- You need to measure the quote share and overlap with the original before publishing
- The book is in EPUB, DOCX or MOBI and has to be parsed with no manual prep
Not a fit when
- You need a retelling of a book for reading: the tool builds working skills
- Rights to the book are not confirmed and the result must not be distributed: publishing needs explicit confirmation
- You need an LLM groundedness judge: the groundedness metric is only heuristic and not connected yet
- The book is not about a method: the skill is built on question order, conditions and verification rules
Example request
Compile my book book.epub into a behavior skill with python3 -m bookleme run --input book.epub --title "My book" --user-rights owned, then check the result with validateLimitations
- Python 3.9 or newer is required; there are no third-party dependencies. Tests run with python3 -m unittest discover -s tests -v.
- The groundedness metric is labeled heuristic in the README and equals null for now because the LLM judge is not connected.
- The metrics in the README come from one real 273-page book and synthetic samples.
- Rights to the source book stay with you: --user-rights records a statement and public distribution needs --public --confirm-public PUBLISH.
How to disable. Installed skills are removed from the agent skills directory, and the tool itself goes away with the repository clone. The --install flag is off by default, so nothing is written to the skills directory without it.
FAQ
How do I install BookLeme?
Run git clone https://github.com/bookleme/bookleme.git, enter the folder and check python3 -m bookleme --version. Python 3.9 or newer is enough.
Which book formats does BookLeme accept?
PDF, EPUB, DOCX, MD, HTML, RTF and MOBI. For a test run the repository has a synthetic book evals/cases/synthetic/coach_book.md.
How do knowledge_pack and behavior_skill differ?
knowledge_pack gives a reference with a topic index and behavior_skill gives a process with states, such as a coaching dialogue. --engine both produces both.
How does BookLeme check that the skill has no invented quotes?
The validate command checks that every quote exactly matches a substring of the book and also computes overlap with the text and coverage. A quote share cap is part of the copyright checks.
Does BookLeme write the skill into the agent directory by itself?
No, the --install flag is off by default. Without it the result stays in the run folder.
Discussion
No questions or reviews yet.
Related
CLI toolsTurns a technical book or a folder of documents into a structured skill with chapters, a glossary and a cheatsheet
A skill set for building interactive MkDocs textbooks: concept graph, chapters, simulations, quizzes and glossary.
A skill that translates whole books in PDF, DOCX and EPUB into any language using parallel subagents
litdb keeps your scientific literature in a local database with semantic search and gives an agent a skill and an MCP server
Learn from materials
learn-from-materials
A skill that turns books, PDFs, slides and documents into a traceable knowledge base and an interactive learning page with sources, maps and self-check
Two skills for Claude Code and Codex: the agent translates papers in the EasyRead library and answers your margin notes
README in short
The document explains the idea that a book is valuable for the author's way of working and shows three design principles. Then it describes the two kinds of output, the dual engine, quote and copyright verification, a quick start with run and validate commands, the architecture, a comparison with similar projects and a roadmap.