suchi serve
Runs the HTTP server. Blocks until SIGINT/SIGTERM.
- Applies embedded migrations up to the current schema version.
- Auto-loads the JD starter tree on first boot.
- Starts the durable-outbox dispatcher.
- Logs the effective egress surface at INFO.
- Listens on
LISTEN_ADDR(default:8000).
suchi healthcheck
Probes LISTEN_ADDR’s /readyz over loopback. Exit 0 if the server
answers 200, non-zero otherwise. Wired as the Docker HEALTHCHECK
so the distroless-static image doesn’t need wget/curl.
suchi import paperless [flags]
Import a compatible export bundle. See importer for the
full walkthrough.
Flags
Category-resolution flags (
--flat, --map-jd, --auto-jd) are
mutually exclusive.suchi gc [flags]
Mark-and-sweep the CAS: walks every blob under $DATA_DIR/blobs/
and deletes anything not referenced by any documents row
(including trashed rows). The blob’s on-disk mtime gates a grace
window — a fresh-uploaded blob whose documents row is still in a
pending write won’t be reclaimed.
Dry-run by default. Nothing is deleted until you pass --apply.
Flags
Recommended cadence: nightly
suchi gc --apply via cron once the
instance is a few weeks old. The design doc keeps this deliberately
manual — automatic gc on hostile data is how you lose files.suchi taxonomy merge [flags]
Admin operation for post-import cleanup: after years of use (or a
big import), taxonomy tables accumulate near-duplicates
(“BESCOM” and “Bescom”, “Tax” and “TAX”). Merge picks one, moves
every reference from the other, deletes the source, and rewrites
any classifier rules that referenced the source name.
Dry-run by default. Reports how many docs would move before you
commit.
Flags
Example:
suchi doctor
One-shot diagnostic report. Prints:
- Egress surface (every URL the running binary would call out to, with the config key + status)
- Optional binaries on PATH (
qpdf,pdftotext,pdftoppm,tesseract,ocrmypdf,djvutxt,msgconvert,anydoc, …) with their versions - DB schema version + whether every migration applied
$DATA_DIRwritability, disk-free, sub-directory presence (blobs/,rendered/,backups/)- Operational health: last-backup age (WARN past 2×
BACKUP_INTERVAL), dead-job count, oldest running job (WARN >15m), effective upload cap, last boot’s reaper count (from thejobs.reclaimedaudit event — a crash-looping box surfaces here without journalctl), CAS-shard subdir count, andaudit_eventsrow total against the retention window.
suchi mcp [flags]
Start an MCP v2 (Model Context Protocol) server that adapts the REST
surface into MCP tools. See MCP guide for the client-side
setup + tool reference.
Flags
The binary also responds to
suchi-mcp when invoked via symlink — the
argv[0] dispatcher rewrites the command so command: "suchi-mcp" in a
Claude Desktop config stays clean.
Uses a scoped API token, not an admin token. Every MCP call is
attributed to that token’s owner in the audit log.
suchi demo [flags]
Seed $DATA_DIR with a small, representative dataset so a fresh
install has something to click through. See the plan doc’s Phase 4.5
notes for the philosophy — “kick-tires-ready without editing a config”.
Flags
Seeds one admin user (skipped if any user exists — never clobbers
credentials), four correspondents, four document types, four tags,
three sample documents (metadata only — no CAS blobs), one classifier
rule, one automation. Idempotent — re-run without duplicates.
suchi refile [flags]
The “come back and change your mind” primitive — re-run the rules
classifier + enqueue a render/move job for every live doc so a
preset swap, template edit, or new rule actually takes effect across
the existing corpus. Full walkthrough at refile.
Flags
Safe against a live server — uploads that arrive mid-sweep use the
normal postingest chain and land under the new tree automatically.
suchi export --out FILE.zip
Portable takeout of everything a user owns. Writes a single zip
containing the original bytes of every live document plus a
documents/<name>-<id>.json sidecar in the standard suchi format
(see formats § JSON sidecar), plus
flat JSON dumps of the taxonomy tables (tags, correspondents,
document types, storage paths, custom fields, JD categories).
- Avatars, thumbnails (derived — regenerate on re-import).
- Document versions history.
- Approvals + audit history.
- Share links + saved views.
version in manifest.json
so importers can gate on it.
suchi version
Prints the binary version, build revision, and the Go version it
was compiled with. --json for scripting.