Optionalinvocation: { argsPrefix: string[]; command: string }
Physical Node + package entry identity captured by the CLI entry guard. Programmatic callers may omit it and use the exact-version npx fallback for generated commands.
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,configure,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.