Lectio Documentation

Lectio runs the same SQLite WAL core across the hosted web application (app.lectio.wiki), the offline macOS Apple Silicon desktop app, and self-hosted Linux servers.

Hosted Web App

Visit https://app.lectio.wiki to create an account with open registration. Each user receives an isolated SQLite database and Markdown vault mirror on disk, running FSRS-6 out of the box. You can export your full library as a Vault ZIP, Anki TSV, or Revlog CSV from Settings at any time.

macOS Apple Silicon Desktop

Download Lectio-0.2.0-macOS-arm64.zip from GitHub Releases. The bundle includes Node 22, Python 3.12, rwkv_srs, and three SHA-256 verified RWKV-7 weights so the neural engine works offline with zero manual setup.

  1. Unzip Lectio-0.2.0-macOS-arm64.zip.
  2. Double-click 签名并打开.command to clear the download quarantine flag, ad-hoc sign locally, and start Lectio.app.
  3. If Gatekeeper prompts once, right-click Lectio.app, choose Open, and drag the app into /Applications.

Local data is stored in ~/Library/Application Support/Lectio with automatic daily snapshots retained for 14 days.

Self-Host from Source

Lectio uses Node 22's built-in node:sqlite module and requires no external database server.

Install & Build
git clone https://github.com/veritaswiki/lectio.git
cd lectio
npm ci
npm run build
LECTIO_DATA_DIR=./data npm run server

The server listens strictly on http://127.0.0.1:4318 by default. Place Caddy, Nginx, or a Cloudflare Tunnel in front of it for HTTPS.

RWKV-7 Neural Engine

Without local weights, Lectio automatically schedules reviews with pure TypeScript FSRS-6. To enable the RWKV-7 continuous-time neural memory sidecar:

Fetch Weights
python3 scripts/fetch-models.py

Ensure rwkv_srs is installed in .venv (Python 3.12). Lectio verifies checkpoint checksums automatically and falls back to FSRS-6 if the sidecar is unavailable.

Multi-User Auth & systemd

Configure runtime behavior with LECTIO_* environment variables (legacy SYMBIOTE_* variables remain supported as fallback):

Variable Values Purpose
LECTIO_AUTH_MODE off | single | invite | open Controls single-user local mode vs isolated multi-user authentication.
LECTIO_RWKV_POLICY disabled | owner-only | per-user | all Controls which accounts can spawn a Python RWKV-7 sidecar.
LECTIO_DATA_DIR Absolute path Root storage directory for SQLite, assets, backups, and user isolation.
LECTIO_TRUST_PROXY 0 | 1 Enable when serving behind Cloudflare Tunnel or a trusted reverse proxy.

Bootstrap an Owner account before exposing an existing library in multi-user mode:

Owner Bootstrap
LECTIO_DATA_DIR=/path/to/lectio-data npm run auth:init-owner

Reproducible user-level systemd templates and Cloudflare Tunnel scripts are included under deploy/systemd/ in the repository.

CLI Reference

CLI Commands
node bin/symbiote.mjs status
node bin/symbiote.mjs queue
node bin/symbiote.mjs stream --at +6h
node bin/symbiote.mjs import ./paper.md --priority 80
node bin/symbiote.mjs mirror
node bin/symbiote.mjs export-revlog ./revlog.csv