CLI entry point — the function dist/index.js invokes when a user runs
enquire-mcp from the terminal. Builds the commander program, registers every
subcommand (serve, serve-http, setup, install-model, install-ocr-lang,
build-embeddings, index, eval, doctor, clear-cache, clear-index,
clear-embeddings, gen-token), wires the shared retrieval flags via
addAdvancedRetrievalOptions, and parses process.argv. Each subcommand
action handles its own errors and sets process.exitCode; main itself does
not catch — an unexpected throw propagates to the top-level handler in
index.ts which prints it and exits non-zero.
Returns Promise<void>
A promise that resolves once argument parsing + the selected
subcommand's action have completed (commander's parseAsync).
CLI entry point — the function
dist/index.jsinvokes when a user runsenquire-mcpfrom the terminal. Builds the commander program, registers every subcommand (serve,serve-http,setup,install-model,install-ocr-lang,build-embeddings,index,eval,doctor,clear-cache,clear-index,clear-embeddings,gen-token), wires the shared retrieval flags viaaddAdvancedRetrievalOptions, and parsesprocess.argv. Each subcommand action handles its own errors and setsprocess.exitCode;mainitself does not catch — an unexpected throw propagates to the top-level handler inindex.tswhich prints it and exits non-zero.