# epubook

Latest version **0.0.12-beta.4** (published 2026-09-05) · MIT license · 0 weekly downloads

## Install

```sh
npm install epubook
pnpm add epubook
yarn add epubook
bun add epubook
```

## Health

**Score 70/100 (B)** — status: active.

Positive: has types; esm support; no vulnerabilities; has provenance; recently updated; high maintenance score.

Warnings: low downloads; pre 1.0.

## Facts

| | |
|---|---|
| Version | 0.0.12-beta.4 |
| Published | 2026-09-05 |
| First published | 2023-02-25 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM |
| Node | >=v20.10.0 |
| Dependencies | 4 |
| Unpacked size | 4.3 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Provenance | attested (GitHub Actions) |
| GitHub stars | 11 |
| Author | XLor |
| Maintainers | yjl9903 |
| Keywords | ebook, epub, epub-generator, epubook |

## Links

- npm: https://www.npmjs.com/package/epubook
- Repository: https://github.com/yjl9903/epubook
- Homepage: https://github.com/yjl9903/epubook#readme
- Issues: https://github.com/yjl9903/epubook/issues
- npm.io page: https://npm.io/package/epubook

## Dependencies (4)

- [@epubook/xml](https://npm.io/package/@epubook/xml.md) 0.0.12-beta.4
- [@epubook/core](https://npm.io/package/@epubook/core.md) 0.0.12-beta.4
- [@epubook/theme](https://npm.io/package/@epubook/theme.md) 0.0.12-beta.4
- [@epubook/bundler](https://npm.io/package/@epubook/bundler.md) 0.0.12-beta.4

## Recent versions

- 0.0.12-beta.4 (latest) — 2026-09-05
- 0.0.12-beta.2 — 2026-05-04
- 0.0.12-beta.1 — 2026-05-04
- 0.0.11 — 2023-08-23
- 0.0.10 — 2023-04-10
- 0.0.9 — 2023-03-09
- 0.0.8 — 2023-03-09
- 0.0.7 — 2023-03-09
- 0.0.6 — 2023-03-09
- 0.0.5 — 2023-03-05
- 0.0.4 — 2023-03-04
- 0.0.3 — 2023-03-03
- 0.0.2 — 2023-02-28
- 0.0.1 — 2023-02-25

## README

# epubook

[![version](https://img.shields.io/npm/v/epubook?color=rgb%2850%2C203%2C86%29&label=epubook)](https://www.npmjs.com/package/epubook) [![CI](https://github.com/yjl9903/epubook/actions/workflows/ci.yml/badge.svg)](https://github.com/yjl9903/epubook/actions/workflows/ci.yml)

A Node [EPUB 3](https://www.w3.org/publishing/epub32/) generation library which supports from **low-level API** to **high-level ebook abstraction** with **customizable themes**.

+ Just use [epubook](https://github.com/yjl9903/epubook/tree/main/packages/epubook) in your project to generate epub easily
+ [@epubook/core](https://github.com/yjl9903/epubook/tree/main/packages/core) provides low-level EPUB generation API
+ [@epubook/theme](https://github.com/yjl9903/epubook/tree/main/packages/theme) is the default theme used in [epubook](https://github.com/yjl9903/epubook/tree/main/packages/epubook)
+ [@epubook/cli](https://github.com/yjl9903/epubook/tree/main/packages/cli) generates EPUB from local configuration and markdown content

## Usage

### Library

```bash
npm i epubook
```

```ts
import { Epubook } from 'epubook'

const ebook = await Epubook.create({
  title: 'title',
  description: 'something'
})

const cover = await ebook.cover('./assets/cover.jpg')
const main = ebook.page('chapter', { title: 'Main', content: 'Hello, World!' })

ebook.toc(cover, main)

await ebook.writeFile('./output.epub')
```

You can see full generation demo [here](https://github.com/yjl9903/epubook/blob/main/packages/epubook/test/index.test.ts).

### CLI

```bash
npm i -g @epubook/cli

epubook --version

epubook --help
```

## Resources

+ [EPUB 3.2 specification](https://www.w3.org/publishing/epub32/)
+ [EPUB 3.3 specification](https://www.w3.org/TR/epub-33/)
+ [epubcheck](https://github.com/w3c/epubcheck)
+ [epub-tests](https://w3c.github.io/epub-tests/)
+ [EbookLib](https://github.com/aerkalov/ebooklib)

## License

MIT License © 2023 [XLor](https://github.com/yjl9903)

---
_Source: https://npm.io/package/epubook · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
