import { DEFAULT_INGEST_CONCURRENCY } from "../ingest/concurrency"; import { getCommandHintSync } from "./command-hint"; export function printHelp(advanced: boolean): void { const cmd = getCommandHintSync(); console.log("Librarian fetches and searches up-to-date developer docs on your machine."); console.log("Use it to give AI agents real context so they stop guessing and writing bad code."); console.log(""); console.log("Commands:"); console.log(" setup Guided setup"); console.log(" version Print version"); console.log(" update Update Librarian"); console.log(" add Add a source (GitHub or web URL)"); console.log(" ingest Ingest sources"); console.log(` ingest --concurrency N Ingest with N concurrent requests (default: ${DEFAULT_INGEST_CONCURRENCY})`); console.log(" detect Detect package versions in cwd"); console.log(" library Find a library and list versions"); console.log(" search --library "); console.log(" search --library --mode word|vector|hybrid "); console.log(" get Fetch a document"); console.log(" get --doc --slice a:b Fetch a document slice"); console.log(" db [sourceId] Open the local database"); console.log(" reset Delete local databases"); console.log(" cleanup Remove inactive docs and data"); console.log(" status Show counts"); console.log(" seed Add sources from a seed file"); console.log(""); console.log("Tip: run `library ` first to find the right library, then search it."); if (!advanced) { console.log(""); console.log("Common add flags (GitHub):"); console.log(" --docs Docs folder in the repo"); console.log(" --ref Git ref to ingest"); console.log(" --version