Docs · Reference · v0.2.1

Complete CLI, keys, and security reference.

Every flag, subcommand, exit code, keyboard shortcut, and storage path shipped in hoja v0.2.1.

Exit codes 0–4Dvorak-friendly keys0600 / 0700 storagev0.2.1View .md

01 · Root CLI

Flags and exit codes.

FlagMeaning
[SOURCE]...PDF, .tex, .md, .typ, .epub path, http(s) PDF/article URL, or arXiv ID/URL
--paperStart in original paper colors instead of OKLab terminal theme
-w, --watchWatch local .tex, .md, .typ, or .pdf for changes and reload live
--password <PASS>Password for encrypted PDFs (falls back to HOJA_PDF_PASSWORD)
--textExtract text headlessly to stdout (all pages or -p N)
--pngRender a page to PNG headlessly (-p N -o PATH --width 1600)
--perfShow live FPS, frame time, and Kitty transport HUD in status bar
Exit codeMeaning
0Success
1Runtime error (bad color/style, missing libpdfium, unreadable file, invalid HOJA_DATA_DIR, no source)
2Clap usage error (unknown flag or missing required flag)
3no_match or no_live_reader
4ambiguous match (retry with --occurrence K or --all)

02 · Subcommands

annot, ctl, skills, and rex.

CommandKey flags & purpose
hoja annot ls--by human|agent|<slug>, -p, --stack, --json, --md
hoja annot add--by, --match / --from+--to / --rect, -p, --color, --style, --note, --occurrence, --all, --dry-run
hoja annot applyFILE or -, --by, --batch, --dry-run, --json (atomic batch)
hoja annot rm / noteID..., --by (caller's own layer only; rejects human)
hoja annot clear--by <slug> or --by agent, --batch (never touches human)
hoja annot export--obsidian, -o, --include-agent, --force, --json
hoja ctl ls / status--pid, --block, --json
hoja ctl openTARGET, --focus, -p, --find, --by
hoja ctl switch / close1-based index or title substring
hoja ctl goto--page, --y, --doc
hoja ctl peek--text or --png -o <PATH>
hoja ctl searchQUERY, --limit 1..=200, --json
hoja skills list / getcore [--full], annotate, rex
hoja rex install / uninstallInstall or remove Rex Cmd+Shift+P Lua plugin

03 · Privacy & Security

Local-only storage with 0600 permissions.

  • Private files: Annotations, exports, caches, and handoff bundles write as 0600; runtime, stack, and handoff directories write as 0700.
  • Multi-process locking: Annotation writes acquire an exclusive flock on <hash>.lock and rename atomically so the reader and agent panes never interleave partial JSON.
  • No telemetry or stored secrets: Local reading never touches the network; PDF passwords stay in memory; remote URL query strings and credentials are stripped before saving titles or logs.