
### Zim Utils
Node.js wrapper around [kiwix-tools](https://github.com/kiwix/kiwix-tools) for managing a local ZIM library, serving content, and searching both locally and against the Kiwix catalog
[](https://git.zakscode.com/ztimson/zim-utils/tags)
[](https://git.zakscode.com/ztimson/zim-utils/pulls)
[](https://git.zakscode.com/ztimson/zim-utils/issues)
---
---
## Table of Contents
- [Zim Utils](#top)
- [About](#about)
- [Built With](#built-with)
- [Setup](#setup)
- [Production](#production)
- [Usage](#usage)
- [KiwixServer](#kiwixserver)
- [Catalog](#catalog)
- [License](#license)
## About
`@ztimson/zim-utils` manages a local [ZIM](https://wiki.openzim.org/wiki/ZIM_file_format) library by driving the official [kiwix-tools](https://github.com/kiwix/kiwix-tools) binaries (`kiwix-serve`, `kiwix-manage`) as child processes, rather than re-implementing ZIM reading from scratch. This means content serving, indexing, and fulltext search all come straight from Kiwix's own battle-tested implementation.
It comes with:
- **`KiwixServer`** — Owns a directory of `.zim` files: builds/rebuilds `library.xml`, starts/stops `kiwix-serve`, lists the local library, runs fulltext search, and resolves content URLs/bytes for any archive+page
- **Catalog** (`zimCatalog`/`zimCatalogInfo`) — Helper functions to search the remote Kiwix OPDS catalog, for discovering and downloading new ZIMs
### Built With
[](https://nodejs.org/)
[](https://javascript.com/)
[](https://github.com/kiwix/kiwix-tools)
## Setup