Live-translate an EPUB on your machine and share a reading link on your local network.
Do you speak english? … I’m french… I’m french
- Live translation — segments are translated in batches; the shared EPUB updates as work progresses
- Stable memory — resume later without redoing finished segments (keyed by file + index)
- LAN share — QR code + tokenized URL; phone browser reader (epub.js)
- Reading bookmark — last position restored across reloads / new share tokens
- MLX only — runs via
mlx_vlm.serveron Apple Silicon
| Need | Notes |
|---|---|
| macOS Apple Silicon | MLX is the only backend |
Python 3 + mlx-vlm |
used to serve the model |
| Rust (stable) | only if building from source |
python3 -m pip install -U mlx-vlmpublish does not bundle models or mlx-vlm. It looks for a python3 that can import mlx_vlm, optionally downloads/verifies weights, then starts python -m mlx_vlm.server.
| Situation | Behavior |
|---|---|
| No python3 | Fails immediately with install hints |
python3 found, no mlx_vlm |
Fails immediately with pip install mlx-vlm + PUBLISH_PYTHON hint |
PUBLISH_PYTHON set but broken |
Fails immediately |
| Weights missing | Download / verify phase with progress, then server start |
| Server load | Compact loading model … line; details in a size-capped temp log |
| Something already on the LLM port | Reuses it (no spawn) |
curl -fsSL https://raw.githubusercontent.com/promptegrity/publish-cli/master/install.sh | bashInstalls into ~/.local/bin (override with PREFIX=/usr/local).
Fork: PUBLISH_REPO=you/publish-cli bash …
Supported prebuilds: macOS Apple Silicon, Linux x86_64 (Linux still needs you to run an MLX-capable setup or point at a remote server — primary target is Apple Silicon).
cargo install --path .
# or: cargo install --git https://github.com/promptegrity/publish-cligit tag v0.1.1
git push origin v0.1.1--lang is required.
publish translate book.epub --lang fr
publish translate book.epub --lang esDefaults: LAN share on, keep share until Ctrl-C.
# no LAN share
publish translate book.epub --lang fr --no-share
# translate then exit
publish translate book.epub --lang fr --no-keep-share
# other quant / local path
publish translate book.epub --lang fr \
--model mlx-community/gemma-4-12B-it-8bit
publish translate book.epub --lang fr \
--mlx-model ~/models/gemma-4-12B-it-mxfp4
# stats / share only
publish status --epub book.epub
publish share --epub book.epub| How | Location |
|---|---|
| Default | platform data dir + publish-cli (e.g. ~/Library/Application Support/publish-cli on macOS) |
| Override | --data-dir /path or env PUBLISH_DATA_DIR |
<data-dir>/
epub-memory/<book_id>.json
epub-work/<book_id>/…
| Variable | Purpose |
|---|---|
PUBLISH_DATA_DIR |
Same as --data-dir |
PUBLISH_PYTHON |
Force the Python used for mlx_vlm.server |
PUBLISH_MLX_MODEL_PATH |
Local model directory (must contain config.json) |
EPUB scan → MLX (OpenAI-compatible HTTP on :8080)
→ memory + live rebuild
→ optional LAN HTTP server + in-browser reader
- Translation quality depends on the local MLX model
- Respect EPUB / book copyright and licensing
- LAN share is for a trusted network (URL token, not a public CDN)
- Cold start can download/load multi‑GB weights
See CONTRIBUTING.md.
See SECURITY.md.