Repository navigation
Releases: Sasivarnasarma/infinite-bookshelf
Release list
v1.1.0: Books That Remember
Long books that build on themselves, thinking models handled properly, and better rewrites. Nothing breaks: your books, backups, settings and API clients from 1.0.0 keep working.
Tip
Try it: ib.sasivarnasarma.me. If you run the :1 image, docker compose pull && docker compose up -d brings you this release.
✨ Highlights
📚 Long books that build on themselves
After each section, the model now writes a short summary that readers never see. Later sections get these summaries as context, so chapter 8 knows what chapter 2 actually explained, not just how it began. It comes with the section, in the same request, so there is no extra cost.
🧠 Thinking models, handled
Reasoning models such as DeepSeek-R1, Qwen3, and most Ollama and LM Studio models can write their thinking into the text. It's now kept out of sections, outlines and titles. While the model thinks, the reader shows Thinking until the first words arrive.
🪄 Better rewrites
- Quick changes: Shorter, Longer, Simpler, More technical, Add an example, Add code, Fix mistakes, More engaging. Pick several and add your own note.
- Recent notes are offered again.
- Undo rewrite brings back the previous version.
🧩 Smaller things
- Reading time on book cards and the book page.
- The browser asks before closing the tab while a book is being written.
- When Ollama or LM Studio isn't running, the error says so, says how to start it, and gives the address to use from Docker.
🔧 Fixes
- A busy server no longer stalls. Many slow streams could use up the server's worker threads, so health checks, settings and PDF exports hung and Docker marked the container unhealthy. Streams now have their own threads.
- Braces in a thinking model's reasoning can no longer break the outline.
🛠️ For developers
/api/sections/streamaddsthinkingandsummaryevents. Send each section'ssummaryback inbook.writtento use it as context. Both are optional, and older clients keep working.- Tests now cover the browser's writing loop: pause and resume, key failover, chapter-by-chapter, rewrites and recovery.
- New quality report:
uv run python -m infinite_bookshelf.engine.quality backup.jsonshows section lengths against their targets, repetition between sections, and summary coverage.
🐳 Images
| Tag | Points to |
|---|---|
1.1.0 |
Exactly this release |
1.1 |
The newest 1.1.x release (fixes only) |
1 |
The newest 1.x release (recommended) |
latest |
The main branch |
📚 Documentation
- Changelog
- Architecture: section summaries and thinking models
- API reference: the new
thinkingandsummaryevents
✨ What's Changed
- fix: keep the server responsive under load, and stop long books repeating themselves by @Sasivarnasarma in #24
- feat: thinking models, clearer local-model errors, better rewrites, and reading time by @Sasivarnasarma in #25
- chore(release): 1.1.0 by @Sasivarnasarma in #26
Full history: v1.0.0...v1.1.0
v1.0.0: The Rebuild
Infinite Bookshelf is now a stateless FastAPI API and a React web app, shipped as one Docker image for amd64 and arm64. Type a topic, review the outline, and watch the whole book being written live by the AI model you choose.
Your books and API keys stay in your browser. The server stores nothing (no database, no accounts, no sessions), so one instance can be shared without holding anyone's data.
Tip
Try it without installing: ib.sasivarnasarma.me. Bring a key from any provider (Gemini, Groq and Cerebras have free tiers).
✨ Highlights
📝 Writing
- Outline first: review the drafted contents, then rename, reorder by drag and drop, change levels, and add or remove entries before anything is written.
- Live streaming: every section appears word by word, and each one knows the outline and what earlier sections covered, so chapters build on each other.
- Whole book or chapter by chapter, with pause and resume at any time, even after closing the tab.
- Your direction: section length, writing style, depth, guidelines, and your own notes or a
.txt/.mdfile as source material. - Rewrite any section with a note such as "add a worked example", using the same model or another. The original stays until the new version is finished.
🤖 Models and keys
- 16 built-in providers: OpenAI, Anthropic Claude, Google Gemini, xAI Grok, DeepSeek, Mistral AI, Moonshot Kimi, Alibaba Qwen, Z.ai GLM, OpenRouter, Groq, Together AI, Fireworks AI, Cerebras, Ollama and LM Studio, plus any OpenAI-compatible API.
- A model per step: the outline, title and chapters can each use a different model, even from different providers, with best, balanced and fast suggestions.
- Switch models whenever a book is paused, or straight from an error with Try again with another model.
- Several keys per provider, switching automatically when one is rejected, out of credits or rate-limited.
- Readable errors: the provider's own explanation and what to do next, with the full error one click away.
📖 Reading and export
- A reader that follows the section being written, a contents sidebar, light and dark themes, and three reading sizes.
- Maths, tables and highlighted code, in the reader and in exports.
- Export as Markdown, a typeset PDF (title page, contents with page numbers, maths), or a JSON backup to move books between devices.
- Works on phones and tablets, and installs to the home screen like an app.
🔒 Privacy and security
- API keys are used by the server for one request, never stored or logged. Turn off Remember my keys to keep them only for the current tab.
- A strict Content Security Policy, with no third-party scripts, fonts or trackers.
- On public servers, custom endpoints can't reach private network addresses, redirects aren't followed, and requests are rate-limited per visitor (also behind reverse proxies).
🚀 Run it
🐳 Docker
git clone https://github.com/Sasivarnasarma/infinite-bookshelf.git
cd infinite-bookshelf
docker compose up -dThen open http://localhost:9752.
Or run the image directly:
docker run -d -p 9752:9752 ghcr.io/sasivarnasarma/infinite-bookshelf:1| Tag | Points to |
|---|---|
1.0.0 |
Exactly this release |
1.0 |
The newest 1.0.x release (fixes only) |
1 |
The newest 1.x release (recommended) |
latest |
The main branch |
📦 Without Docker
Needs Python 3.11+, uv, Node 22+ and pnpm:
pnpm bootstrap
pnpm build
pnpm startRunning a server for other people? Read Running a public instance first.
⬆️ Coming from 0.5.0
This is a full rebuild, and the Streamlit app is gone:
- Books saved by 0.5.0 in
.data/booksand keys in.data/settings.jsonaren't carried over. Books now live in your browser; add your keys again in Settings. - The 0.5.0 release stays available if you need it.
📚 Documentation
- Self-hosting: Docker, configuration, local models, reverse proxies, public instances
- Architecture: how the browser and server work together
- API reference, also interactive at
/api/docs - Changelog
✨ What's Changed
- feat!: rebuild Infinite Bookshelf as a FastAPI API and React web app by @Sasivarnasarma in #1
- build(deps): bump docker/metadata-action from 5 to 6 by @dependabot[bot] in #3
- build(deps): bump docker/setup-buildx-action from 3 to 4 by @dependabot[bot] in #4
- build(deps): bump pnpm/action-setup from 4 to 6 by @dependabot[bot] in #5
- build(deps): bump docker/build-push-action from 6 to 7 by @dependabot[bot] in #6
- build(deps): bump actions/checkout from 4 to 7 by @dependabot[bot] in #7
- build(deps): bump the web group with 4 updates by @dependabot[bot] in #8
- build: move the Docker image and CI to Node 24 LTS by @Sasivarnasarma in #9
- build(deps): bump the actions group across 1 directory with 4 updates by @dependabot[bot] in #10
- feat!: plain-HTTP fixes, deployment port 9752, and dev auto-reload by @Sasivarnasarma in #11
- feat: root .env, proxy-aware rate limit, and pre-v1 bug fixes by @Sasivarnasarma in #12
- fix(api): don't follow redirects from custom endpoints on public servers by @Sasivarnasarma in #13
- feat: run without Docker with pnpm start, and split large build chunks by @Sasivarnasarma in #14
- feat: API address for separately hosted web apps, link previews and app metadata by @Sasivarnasarma in #16
- docs: rewrite the README and guides, and trim code comments by @Sasivarnasarma in #17
- ci: publish the Docker image for arm64 as well as amd64 by @Sasivarnasarma in #18
- fix: readable provider errors, model switching on failure, and bounded timeouts by @Sasivarnasarma in #19
- fix(web): stop sideways scrolling on phones, and redesign the footer by @Sasivarnasarma in #20
- fix: drop repeated section titles and nest headings under their section by @Sasivarnasarma in #21
- ci: smoke-test the Docker image, and post the CI report on pull requests by @Sasivarnasarma in #22
- chore(release): 1.0.0 by @Sasivarnasarma in #23
🆕 New Contributors
- @Sasivarnasarma made their first contribution in #1
- @dependabot[bot] made their first contribution in #3
Full history: v0.5.0...v1.0.0
v0.5.0: the Streamlit edition
The final release of the original Streamlit edition of Infinite Bookshelf. It generates complete, structured non-fiction books from a single topic, with live streaming and a choice of AI providers.
Note
This version has been superseded. From the next release onwards, Infinite Bookshelf is a stateless FastAPI API with a React web app, shipped as one Docker image (see #1). This release stays available for anyone who prefers the Streamlit app or needs to open books saved with it.
Highlights
Writing
- Outline first: the model drafts a title and a multi-chapter table of contents, which you can review and edit before any section is written. You can rename, reorder, add, delete and change levels, or draft a fresh outline.
- Coherent chapters: every section is written with the full outline and a digest of what earlier sections covered, so chapters build on each other instead of repeating the basics.
- Live streaming: sections appear as they're written, with tokens-per-second shown for every provider.
- Rewrite any section with a note ("add a worked example", "make it shorter"). The model sees the previous version, and an interrupted rewrite keeps the old text.
- Length control: short, medium or long sections (about 500, 1,000 or 2,000 words).
- Advanced options: writing style, depth, outline detail, and your own seed notes or reference file.
- Pause, resume and restart: a section interrupted mid-stream is written again on resume, and you can switch model or provider before resuming, for example after a rate-limit error.
Providers and models
- Works with Google Gemini, OpenAI, DeepSeek, Groq, OpenRouter, Ollama (local) and any custom OpenAI-compatible endpoint.
- Mix models across providers: one model for the whole book, or a different one per step (title, outline, chapters).
- Settings page: save keys for several providers, test them, load each provider's live model list, and choose which models to offer.
- Throttling: a configurable delay (0–10 seconds) between sections helps stay under free-tier rate limits.
- Automatic request adjustment: options a model doesn't support (such as
temperatureormax_tokenson reasoning models, or JSON mode on some proxies) are adjusted automatically.
Reading and export
- Reading-first interface: a dark theme taken from the logo, a title page, a sticky table of contents with live progress, and a serif reading column.
- Export: clean Markdown (
.md), styled PDF (.pdf, WeasyPrint with an fpdf2 fallback) or structured JSON (.json). - Clear errors: actionable messages for authentication, rate-limit, unknown-model, rejected-request and network errors.
Storage
- Saved per book: each book is saved to
.data/books/<id>.jsonafter every section. The book's id is kept in the URL (?book=<id>), so reloading restores your book. - Keys saved locally: keys are stored in
.data/settings.jsonon your own computer, or read from a.envfile. They're never written into book files.
Running this version
Requires Python 3.10+. Check out this release and run it with uv:
git clone --branch v0.5.0 https://github.com/Sasivarnasarma/infinite-bookshelf.git
cd infinite-bookshelf
uv run streamlit run main.pyOr with pip:
python -m venv .venv
.venv/bin/pip install -r requirements.txt # Windows: .venv\Scripts\pip
.venv/bin/streamlit run main.py # Windows: .venv\Scripts\streamlitThen open http://localhost:8501. To pre-load keys, copy example.env to .env and fill in GEMINI_API_KEY, OPENAI_API_KEY, DEEPSEEK_API_KEY, OPENROUTER_API_KEY or GROQ_API_KEY.
Known limitations
These are what the rebuild addresses:
- Server-side storage: books and keys live on the machine running Streamlit, so a shared or hosted instance keeps everyone's data in one place.
- One process per user: Streamlit reruns the whole script on every interaction, and generation runs inside the user's session.
- No phone-friendly layout, and no Docker image for self-hosting.
Notes
- Version number: the package metadata in this release still reads
0.4.0. Thev0.5.0tag marks this final Streamlit state. - Credits: based on the original Infinite Bookshelf by Benjamin Klieger. MIT licence.