Rcarmo/bun-packrat: Single-file web archive: SQLite-backed, self-contained HTML

rcarmo1 pts0 comments

GitHub - rcarmo/bun-packrat: Single-file web archive: SQLite-backed, self-contained HTML, iOS Safari compatible · GitHub

/" data-turbo-transient="true" />

Skip to content

Search/

Sign in<br>Sign upAppearance settings

You signed in with another tab or window. Reload to refresh your session.<br>You signed out in another tab or window. Reload to refresh your session.<br>You switched accounts on another tab or window. Reload to refresh your session.

Dismiss alert

{{ message }}

rcarmo

bun-packrat

Public

Notifications<br>You must be signed in to change notification settings

Fork

Star

main

BranchesTags

Go to file

CodeOpen more actions menu

Folders and files<br>NameNameLast commit message<br>Last commit date<br>Latest commit

History<br>29 Commits<br>29 Commits

docker

docker

docs

docs

src

src

tests

tests

.dockerignore

.dockerignore

.gitignore

.gitignore

Dockerfile

Dockerfile

LICENSE

LICENSE

Makefile

Makefile

README.md

README.md

bun.lock

bun.lock

docker-compose.yml

docker-compose.yml

package.json

package.json

tsconfig.json

tsconfig.json

View all files

Repository files navigation

bun-packrat

bun-packrat captures rendered web pages into SQLite. New captures use Chromium MHTML as the source of record and derive safe offline HTML, Article, Markdown, EPUB and PDF views on demand.

The service runs on Bun with SQLite FTS5, an in-process job queue and Playwright. It is designed for desktop browsers and Safari on iPhone and iPad.

Features

one SQLite database for captures, metadata, search, tags and jobs;

canonical Chromium MHTML with SHA-256 verification;

offline full-page and simplified Article views;

server-side full-text search, filters and pagination;

HTML, Markdown ZIP, EPUB 3 and on-demand PDF exports;

HTTP API, bookmarklet and Bun CLI;

HTTP Basic authentication by default;

consistent online backup and integrity verification.

Start with Docker

Set a password, then build and start the service:

export PACKRAT_AUTH_PASSWORD='replace-with-a-secret'<br>make up

Open http://localhost:3047/ and sign in as packrat.

For an unauthenticated service on a trusted network, set PACKRAT_AUTH_DISABLED=1 explicitly.

Develop locally

bun install<br>bun run typecheck<br>bun test<br>PACKRAT_AUTH_DISABLED=1 bun run src/server.ts

The default database path is ./data/packrat.db.

Project status

Fresh capture, search, offline reading, export, deletion, backup and verification are implemented and tested. The ArchiveBox bulk importer and final hostname cutover are planned.

See the documentation index for setup, configuration, architecture, API, CLI and operations. Requirements and delivery status are tracked in the product requirements and implementation plan.

Licence

MIT © 2026 Rui Carmo

About<br>Single-file web archive: SQLite-backed, self-contained HTML, iOS Safari compatible<br>Resources<br>Readme<br>MIT license<br>Activity<br>Stars<br>0 stars<br>Watchers<br>0 watching<br>Forks<br>0 forks<br>Report repository

Releases

Packages

Contributors

Languages

You can’t perform that action at this time.

packrat sqlite html docker file search

Related Articles