Skip to content

About

CadabraCraft is a desktop app for writing and formatting books. Write in a rich-text editor, organize chapters, pick a template, and export EPUB 3 and print-ready PDF.

Topics

Resources

Contributing

Accessibility

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

860 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CadabraCraft logo

CadabraCraft

Write, format and publish your book. Local-first, source-available, no account.

CI Website Docs

GitHub Sponsors Buy Me a Coffee PayPal

CadabraCraft is a desktop app for writing and formatting books. Write in a rich-text editor, organize chapters, pick a template, and export EPUB 3 and print-ready PDF.

  • Local-first. Your project is a folder of plain, documented files. No account, no server, no telemetry.
  • Your sync, your choice. Point the folder at Google Drive, Dropbox or iCloud Drive. Conflicting edits keep both copies.
  • Free, and never sold. The app, the file format and the exporters all live in this repo. Authors and publishing companies can use CadabraCraft free to write and publish books. The software itself is never sold, by anyone, including its maker (see License).

What it is

CadabraCraft is for authors who want to write a whole book in one place and publish it themselves. You write in a rich-text editor, organise chapters and front and back matter, and export an EPUB e-book, a print-ready PDF or Markdown. Everything stays on your computer, with no account. New to the app? Read the user guide.

Install

There is no release yet, so there is no installer to download. Today you can build the app from source (the commands are under Quick start: install the prerequisites, run scripts/fetch-typst.sh and scripts/fetch-sherpa.sh once, then pnpm install and pnpm tauri dev).

Once releases exist, they will be published on GitHub Releases for macOS and Linux (AppImage); Windows is coming soon (the code runs there and CI tests it, but no Windows installer is released yet). The macOS builds are signed and notarized by the release workflow, so they should open without an "unidentified developer" warning; the first dry run checks this (see docs/release-checklist.md). The app checks GitHub Releases for newer versions at launch (switchable in Settings); that is its only network request.

Your book is a folder

A book is a plain folder you choose: one file per chapter, your images, and a cadabra.json with the title and chapter order. You can copy it, back it up or keep it in Dropbox, Google Drive or iCloud Drive (sync with real clients is not yet tested, see the user guide). Exports go to its exports/ folder, and removed chapters go to .cadabra/trash/ rather than being deleted. Earlier versions of each chapter are kept in .cadabra/backups/, which belongs to your computer, so keep .cadabra out of cloud sync. Details are in docs/file-format.md.

Features

  • Editor: chapters you can add, rename, reorder, trash and restore, with undo and redo for structure edits, autosave, per-chapter History (automatic snapshots you can compare and restore), focus mode and a reading mode.
  • Front and back matter: title page, copyright, dedication, epigraph, foreword, preface, acknowledgments, about the author, also by, colophon.
  • Import: Word (.docx), Markdown, HTML and plain-text manuscripts, with a report of anything that could not be kept. See docs/import.md.
  • Export: EPUB 3 (passes EPUBCheck), print PDF through Typst (trim sizes, templates, PDF/A, cover, footnotes), Markdown, and Word (.docx) and Rich Text (.rtf) in standard manuscript format for agents and editors.
  • Back-of-book index and glossary: select words and add them as an index entry (Cmd/Ctrl+Alt+X, or Insert > Index Entry) or a glossary term (Cmd/Ctrl+Alt+G, or Insert > Glossary Term); the Index and Glossary panels list, edit, merge and jump to them, and every export can write both pages after the back matter (page numbers in the print PDF, links in the EPUB).
  • Templates and settings: novel, nonfiction and modern templates, an approximate print preview, and a Settings page.
  • Book details: title, author, language, ISBN, identifier and cover image.
  • Headless MCP server: create, edit, import and export books (EPUB, PDF, Markdown) from an AI agent or script. See docs/mcp.md.

Ideas outside the current milestone live in docs/roadmap.md.

Quick start

Prerequisites: Node 26, pnpm 11, Rust (stable). Run scripts/fetch-typst.sh once (downloads the Typst sidecar and Inter fonts the app bundles; also needed before cargo test) and scripts/fetch-sherpa.sh (the text-to-speech program for audiobook export, one 200 to 400 MB download that leaves a 30 MB program; also needed before cargo test), Java 17 (a JDK) for EPUBCheck, scripts/stage-epubcheck.sh and scripts/build-jre.sh (stage EPUBCheck and build the trimmed Java runtime the app bundles for its "Check EPUB" step; a debug run finds them in src-tauri/binaries or falls back to java on PATH), poppler for the PDF integration tests, and Playwright's Chromium for e2e.

pnpm install
pnpm dev                      # UI in a browser at http://localhost:1420
pnpm tauri dev                # full desktop app

Project layout

apps/
  desktop/          Tauri app (src/ React UI: app/ screens, editor/, state/, lib/, ui/; src-tauri/ Rust; e2e/ Playwright). Tests sit in __tests__/ beside the code
  website/          Marketing site (Next.js static export, cadabracraft.com)
packages/
  shared/           Shared types (chapter JSON, metadata)
  editor-schema/    TipTap schema for the v1 node set
  format/           Manifest validation, migrations, chapter-tree edits, file naming
  templates/        Novel, nonfiction and modern templates as data
  story-structures/ Story structures (Hero's Journey, Save the Cat, ...) as data, and scene placeholders made from them
  export-epub/      Chapter JSON to EPUB 3
  export-pdf/       Print PDF via Typst
  export-markdown/  Chapter JSON to Markdown (inverse of the importer)
  outline/          Scene outline writers (OPML, Markdown, CSV) and parsers
  export-docx/      Chapter JSON to a manuscript-format .docx (hand-written OOXML)
  export-rtf/       Chapter JSON to a manuscript-format .rtf (hand-written RTF)
  import-docx/      Markdown, HTML and DOCX import with warnings (the app imports .docx through the Rust port in src-tauri; see docs/import.md)
  export-audio/     Audiobook rendering plan and chapter audio helpers
  project-fs/       Node port of the project-folder rules
  mcp/              Headless MCP server (stdio)
fixtures/           Sample manuscripts, golden outputs, shared Rust/TS contract vectors
docs/               Architecture, file format, guides ([index](docs/README.md))
brand/              Logo and icon sources

Packages never import from apps/desktop. Stack: Tauri 2 (Rust), React 19, TypeScript, Vite, TipTap 3, Tailwind CSS v4, Radix UI, Vitest, Playwright, pnpm workspaces.

Testing

pnpm typecheck
pnpm test                     # Vitest in every package
pnpm test:coverage             # Vitest + instrumented Playwright + JS coverage gates
cd apps/desktop && pnpm exec playwright install chromium && pnpm test:e2e
cd apps/desktop/src-tauri && cargo test
  • The large-input import tests (100 MB of real Wikipedia text) skip without tools/enwik8/; run scripts/fetch-enwik8.sh once (36 MB download, SHA-1 checked, gitignored) and set REQUIRE_ENWIK8=1 to make them fail when it is missing, as in CI.
  • PDF tests skip when Typst or poppler is missing. Set REQUIRE_TYPST=1 to make them fail instead.
  • E2E tests fake the Tauri bridge in memory, so they do not cover the Rust side or the native window.

Validate an EPUB (the EPUBCheck test skips without the jar; REQUIRE_EPUBCHECK=1 makes it fail, as in CI):

scripts/fetch-epubcheck.sh    # one-time download into tools/ (gitignored)
pnpm --filter @cadabracraft/export-epub build:sample
java -jar tools/epubcheck-5.4.0/epubcheck.jar out/sample.epub

Drive the real app (agents and scripts; release builds never include the bridge):

pnpm automation:scenario      # launches the app with the dev-only bridge and clicks through the main flows

More in docs/agent-testing.md.

Documentation

Start at the docs index. Highlights:

  • User guide: writing, organising, importing, exporting and troubleshooting, for authors.
  • File format: the project folder layout. Deleting a chapter moves it to .cadabra/trash/; the app never permanently deletes.
  • Architecture: decisions and the alternatives we rejected.
  • Design: tokens, screens and breakpoints, mirrored from design/cadabracraft.fig.
  • MCP server and Import.

Support CadabraCraft

CadabraCraft is free and built in the open. If it helps your writing, you can support its development:

GitHub Sponsors Buy Me a Coffee PayPal

Contributing

Work milestone by milestone, one PR each, with tests and docs. Record ideas outside the current milestone in docs/roadmap.md. See CLAUDE.md for the rules agents follow and CONTRIBUTING.md for contribution terms.

License

CadabraCraft is source-available under the Apache License 2.0 with the Commons Clause, plus clarifications and a pledge. In plain words:

  • Authors and publishing companies: use it free to write, format, export and publish books, including books you sell. Your books and the files it makes are yours.
  • Everyone: read the code, change it and share your changes for free (keep LICENSE and NOTICE with them).
  • Nobody sells it: you can't sell, rent or charge for the software or a changed version, offer it as a paid or hosted service, charge clients to format their books with it, or charge for support or training. Rabin Apps LLC pledges not to do any of that either.

It is not open source in the OSI sense, because the Commons Clause restricts selling. This summary is not the legal text: LICENSE, NOTICE and the clarifications file are.

About

CadabraCraft is a desktop app for writing and formatting books. Write in a rich-text editor, organize chapters, pick a template, and export EPUB 3 and print-ready PDF.

Topics

Resources

Contributing

Accessibility

Stars

0 stars

Watchers

0 watching

Forks

Releases

Sponsor this project

Contributors

Languages