CLI reference¶
The vera console script and python -m vera_cli expose the same command
parser.
vera convert
vera inspect
vera get
vera filter
vera search
vera index build
vera index update
vera index status
vera validate
vera export
vera figures
vera eval
vera mcp
vera ocr-languages list
vera ocr-languages download
Run vera COMMAND --help for parser-generated usage. This page is the
human-oriented overview. The portable skill's
exhaustive CLI contract documents
complete JSON object shapes, stdout/stderr behavior, exit codes, and filesystem
effects without duplicating that contract here.
vera convert INPUT [OUTPUT]¶
Convert one PDF, Markdown, Word, PowerPoint, Excel (ooxml), HTML (--parser docling), or a directory of supported sources. .docx, .pptx, and .xlsx use ooxml unless --parser docling is set.
Options:
--model MODEL(hashing; acceptsprovider:model-idspecs such assentence-transformers:all-MiniLM-L6-v2oropenai:text-embedding-3-small; unknown providers exit with an error; MiniLM needs themlextra, or theonnxextra plus an ONNX snapshot, other Sentence Transformers models need themlextra, and the Windows installer vendors a VERA-exported MiniLM graph. MiniLM uses ONNX Runtime when a graph is present and Sentence Transformers otherwise. OpenAI embeddings ship withveraasvera-embed-openai; setOPENAI_API_KEY. Archives converted with OpenAI are not portable for semantic search)--parser PARSER(omitted: choose from the file extension — PDF →pymupdf, Markdown →markdown, DOCX/PPTX/XLSX/HTML →doclingwhenvera[docling]is installed; acceptsprovider[:variant]specs such asdocling/docling:hybrid, orplansheetfor construction drawing sets (externalvera-ingest-plansheetplugin,OPENROUTER_API_KEY, never chosen by extension); unknown providers exit with an error; the 0.3.x Windows installer does not include Docling). SetVERA_PIPELINE_PYTHONto a virtual environment folder or Python executable that hasveraand another pipeline installed to use that pipeline from this one:--parser NAMEthen converts the file in a child process there. Pipelines this environment already has stay local, and a pipeline from that environment is never chosen by file extension--chunk-size N(500; compatibility alias; PyMuPDF counts whitespace-split words, Docling counts whitespace tokens)--overlap N(75; compatibility alias; PyMuPDF counts whitespace-split words; forwarded only when the pipeline advertises overlap, e.g. PyMuPDF — not Docling; sliding-window chunking clamps overlap tochunk_size - 1)--store-original VALUE(true)--ocr auto|off|force(auto; compatibility alias)--ocr-language CODE(eng; Tesseract/PyMuPDF compatibility alias; not forwarded to Docling)--ocr-dpi N(300, must be positive; compatibility alias; PyMuPDF only)--ocr-allow-download(compatibility alias; PyMuPDF only; fetches missing--ocr-languageTesseract data from a curated, checksum-verified registry into a local cache instead of failing — seevera ocr-languages)--pipeline-option KEY=VALUE(repeatable; provider-owned options that override compatibility aliases for the same key)--embedder-option KEY=VALUE(repeatable; provider-owned embedding options forwarded to the selected embedding provider)--metadata KEY=VALUE(repeatable; stamps the same keys onto archive metadata and every chunk; reserved citation, ingest, format, and JSON locator keys (file,path,ok,error) are rejected)--recursive--overwrite--json
Conversion selectively OCRs image-based low-text pages through PyMuPDF and
Tesseract, publishes a validated temporary archive atomically, and fails when
no searchable chunks are extracted. English language data is bundled for
offline, zero-setup OCR; other selected languages either require
--ocr-allow-download (or the equivalent ocr_download pipeline option) to
auto-fetch curated language data, or a manually installed Tesseract
.traineddata file with TESSDATA_PREFIX set. Directory conversion writes
<filename>.vera beside each source (manual.pdf becomes manual.pdf.vera),
skips an existing .vera only when it validates and its stored
source_file_hash matches the current source file, renames an older
manual.vera that belongs to that source onto the new name (renamed_existing),
reports malformed outputs separately, and does not accept OUTPUT.
Pipeline-owned defaults and validation live in each ingest plugin; advertised
integer minimum/maximum bounds are enforced (for example chunk_size
100–3000). See Convert documents.
Embedding-provider options follow the same Options + descriptor pattern
(hashing dimension is 8–4096); see
Creating an embedding provider.
vera inspect FILE¶
Print archive metadata and summary counts, including archive size, creation
time, embedding dimensions and normalization policy, parser/chunking settings,
and attachment count when recorded. Normalization is l2, none, or
unknown. Text mode does not print the pipeline ocr diagnostics bag.
Options: --json. JSON includes file (the requested path), path (the
opened archive), and ocr (pipeline diagnostics: PyMuPDF OCR pages, Docling
recovery, or {} for Markdown). See
Inspect metadata.
vera get FILE CHUNK_ID¶
Fetch one stored chunk by exact id from a single .vera archive. CHUNK_ID
is case-sensitive; there is no prefix match or directory/corpus lookup.
Options:
--json--figures--regions
JSON is one object with ok, file, path, chunk_id, text, and the same
citation fields as a search hit (page_start, page_end, heading_path,
source_filename, document_id). ok, file, and path are transport
fields for the opened archive and are not taken from chunk metadata. It does
not include score. --figures and --regions add the same metadata shapes
as vera search. An unknown or whitespace-only id exits 1 with
{"ok": false, "error": "chunk not found: ..."}.
vera filter PATH¶
List every chunk whose metadata matches --where, or the filter facets when
--where is omitted. PATH is one .vera file or a directory of them.
This is a complete unranked list. It does not search, and it does not read the
archive header or attachments. Locator fields such as page_start and
heading_path are not facets.
Options:
--where KEY=VALUEexact metadata match (repeatable). Distinct keys are AND; comma-separated values are IN.--recursiveinclude nested folders. A managed library already includes its archives.--json
Without --where, JSON is facets plus skipped_files. Each facet has key,
count, and distinct. values (value and count) is included when few
distinct values exist. With --where, JSON adds where, total, and
records, and still includes facets. A miss returns an empty records list.
Each record is a locator: file, path, source_filename, chunk_id,
page_start, page_end, heading_path, regions, and metadata. Scalar
chunk metadata keeps its stored names inside metadata. The chunk text and
figure bytes are omitted; open one row with vera get. A malformed archive is
listed in skipped_files and the rest of the folder is still returned.
vera filter C:\Plans --json
vera filter C:\Plans --where record_type=detail --where cd_sheet_number=C-501 --json
vera search FILE_OR_DIRECTORY QUERY¶
Search one archive or a directory as a corpus.
Options:
--mode semantic|keyword|hybrid(hybrid)--top-k N(10)--context-chunks N(0)--figures--regions--recursive--exclude PATTERN(repeatable)--include PATTERN(repeatable; directory search only — error on a single file)--where KEY=VALUE(repeatable; stored metadata filter applied beforetop_k; distinct keys are AND; comma-separated values are IN)--json--pretty(mutually exclusive with--json)
--figures, --regions, and context fields are exposed through JSON output.
--pretty emits Markdown-like readable context with result numbers, corpus
archive paths, headings, source/page citations, complete hit text, requested
neighboring chunks, and requested figure captions. It omits scores, chunk ids,
and region coordinates; use --json when those structured fields are needed.
Python callers can render the same text with
vera_ingest.viewer.format_search_context.
Directory search JSON also includes skipped_files with paths and validation
reasons for malformed archives that were excluded. Indexed directory search
also includes skipped_semantic_model_groups; each entry identifies a model
name, indexed dimension, and loading or dimension error that prevented that
group from participating in semantic or hybrid retrieval. Non-JSON output
prints the same entries as warnings.
--where is applied before top_k. Do not post-filter the JSON results
array. Values coerce like --pipeline-option. A missing key fails the
predicate. List-valued stored metadata is not an IN clause. Convert
--metadata tags live on the archive and every chunk, so those keys match
on single-file and corpus search. Convert-owned archive headers such as
source_file_name and page_count are not copied onto chunks: indexed
directory search can filter them at the archive level, but single-file
search and per-file fallback evaluate chunk metadata only. --include and
--exclude choose files during discovery. A fresh index built without
includes still serves a narrower --include (for example one subfolder) and
filters to matching archives before top_k. When a --where key is not
archive metadata or an indexed citation column, directory search falls back
to per-file search and sets index.used to false with
chunk metadata filter not in collection index in index.reasons.
--include on a single-file search exits 2.
vera index build DIRECTORY¶
Build a local collection index.
Options:
--recursive--exclude PATTERN(repeatable)--include PATTERN(repeatable; stored in index discovery settings)--json
Writes .vera-index/ under the library root. Indexing uses a unique
temporary sibling; publication takes .vera-index/build.lock, then deletes
every other generation directory. An empty discovery set raises unstructured
No .vera files found in ... (exit 1, no JSON). JSON reports invalid
(validation or open failure) and incompatible (vector length ≠ declared
dimension) separately; those rows also appear on index status as
skipped_files. If no archive can be indexed, the command raises
No valid .vera files could be indexed on stderr and does not print JSON.
vera index update DIRECTORY¶
Rebuild an existing index using its saved discovery settings.
Options: --json.
vera index status DIRECTORY¶
Report whether an index exists and is fresh, including the paths, categories,
and reasons retained for files skipped by the active index. Existing-index
reports also include generation/build/check/verification timestamps, storage
sizes, source-versus-indexed chunk coverage, and per-model dimensions and
document/chunk counts. CLI status hashes archives (verified_at is set).
Directory search and the desktop badge use size/mtime only
(verified_at is null) unless desktop Inspect refreshes with hashes.
Options: --json.
Exits 1 when the index is missing or stale while still emitting a report.
vera validate FILE¶
Validate archive integrity and consistency.
Options: --json. JSON includes file (the requested path) and path (the
opened archive). Counts keys are chunks, embeddings, fts_rows, and
attachments.
Exits 1 when validation finds an issue while still emitting a report.
vera export FILE [OUTPUT]¶
Write the embedded source document to its stored filename, a chosen path, or an existing directory.
Options: --json.
vera figures FILE¶
List stored figure attachments, or write their image files to a directory.
FILE is a single .vera archive.
Options:
--out-dir DIRwrites{asset_id}.{ext}files and addspathto JSON--asset-id IDlimits to one attachment id (repeatable)--page-start N/--page-end N(1-based page filter)--json
Without --out-dir the JSON has out_dir: null and no path fields. Image
bytes are never included. A missing or non-figure --asset-id exits 1 with
{"ok": false, "error": "..."}.
vera eval FILE QUERIES¶
Evaluate retrieval against expected pages or terms. FILE is a single
.vera archive; the command does not search a directory or collection index.
Options:
--mode semantic|keyword|hybrid|all(all)--top-k N(5)--json
Exits 1 if any expected answer is missed while still emitting a report.
A managed library stores its index at .vera/index. vera index build,
vera index update, and vera index status use that directory when
.vera/library.json exists. An empty managed library can publish an empty
index. Search of a subfolder is scoped to that subfolder and results include
source_path.
vera library init DIRECTORY¶
Options: --adopt, --model, --parser, --pipeline-option,
--embedder-option, --metadata, --json.
Creates .vera/ (library.json, README.txt, archives/, index/) and
hides it on Windows. --adopt moves matching sibling archives into
.vera/archives/, including file.pdf.vera and an older file.vera whose
stored hash matches the source. Refuses a second library inside an existing one.
vera library sync DIRECTORY¶
Options: --dry-run, --confirm-deletes, --reconvert, --json.
Keeps .vera/archives/ aligned with the source tree: convert new or changed
files, move renamed archives, and trash archives whose sources are gone.
--dry-run plans without writing. A missing folder, or a disappearance of
more than 20% of archives and more than 5 files, sets needs_confirmation
until --confirm-deletes. --reconvert rebuilds unchanged sources too.
vera library pipeline DIRECTORY¶
Options: --folder, --parser, --pipeline-option, --clear, --json.
Lists, sets, or clears folder pipeline rules in .vera/library.json
(convert.pipeline_rules). With no --parser or --clear, it lists the
library parser, pipeline_options, and rules (each folder, parser,
pipeline_options). --folder is relative to the library root, * and ?
match within one folder name, and leaving it out means the whole library.
--parser sets the rule. --clear removes it and cannot be combined with
--parser. The deepest matching rule wins. A rule only changes formats its
pipeline reads. Nothing converts until the next vera library sync, which
reconverts the affected files with "reason": "pipeline". Exit 1 for an
unknown pipeline, a folder outside the library, or an unmanaged folder.
vera library status DIRECTORY¶
Options: --json.
Pending-change report. Does not convert and does not take the sync lock.
The report includes pipeline_rules, and each convert action includes the
parser that will convert the file (null means the default for its
extension).
vera library trash list DIRECTORY¶
Options: --json.
Lists trashed archives (entry, source_path, trashed_at).
vera library restore DIRECTORY ENTRY¶
Options: --json.
Restores one trash ENTRY by exporting its stored original and moving the
archive back.
vera mcp¶
Run the long-lived stdio MCP server. This command does not accept --json.
Install the mcp optional dependency first. Desktop Agent access is a
separate loopback service (mcp-service / mcp-connect) and does not change
this command. Restricted servers report library_roots and libraries. On
that service, tools accept library plus a relative path. See mcp.md.
vera ocr-languages list [LANGUAGE]¶
List Tesseract OCR language codes usable by the pymupdf parser: bundled
(ships with VERA, English only), cached (already downloaded), and
downloadable (in VERA's curated, checksum-verified registry of
tesseract-ocr/tessdata_fast codes). LANGUAGE optionally limits the report
to specific +-joined codes (e.g. eng+fra); omit it to list every known
code.
Options: --json.
Codes outside the curated registry are reported with downloadable: false
and need a manually installed .traineddata file plus TESSDATA_PREFIX.
vera ocr-languages download LANGUAGE¶
Fetch one or more +-joined Tesseract language codes (e.g. fra or
fra+deu) into the local cache (override the location with
VERA_TESSDATA_CACHE), verifying each download's SHA-256 against VERA's
pinned registry before it is used. Already-cached codes are reused without a
network request. Exits 2 for a code with no bundled or registry data.
Options: --json.
JSON and exit codes¶
One-shot commands support --json and print one JSON object on success.
Do not assume nonzero output is unstructured:
validatereturns a report when the archive is invalid;index statusreturns a report when the index is stale or missing;evalreturns a report when a query misses;exportreturns an error object when no source is stored;figuresreturns an error object when a requested--asset-idis missing or is not a figure attachment;getreturns an error object when the chunk id is missing from the archive;convertreturns{"ok": false, "error": "..."}when extraction or validation fails, the input path is missing, or an OpenAI embedder fails (missingOPENAI_API_KEY, HTTP errors) (exit 1), or--parser/--modelis unknown (exit 2). Directory conversion also prints a batch report and exits 1 when any file failed or an existing output was malformed;ocr-languages downloadreturns{"ok": false, "error": "..."}and exits 2 for an unknown or unregistered code;mcpprints an install hint and exits 2 when the optionalmcpextra is not installed (this command does not accept--json).
Other path, dependency, and runtime failures generally write an unstructured error or traceback to stderr. Check the exit status and command-specific contract before parsing output.
Shell quoting¶
Quote file paths and natural-language queries:
For multi-line commands, POSIX shells use \ while PowerShell uses a backtick.
Single-line commands are portable across both.