feat: add docs search command
This commit is contained in:
19
src/cli/docs-cli.ts
Normal file
19
src/cli/docs-cli.ts
Normal file
@@ -0,0 +1,19 @@
|
||||
import type { Command } from "commander";
|
||||
|
||||
import { docsSearchCommand } from "../commands/docs.js";
|
||||
import { defaultRuntime } from "../runtime.js";
|
||||
|
||||
export function registerDocsCli(program: Command) {
|
||||
program
|
||||
.command("docs")
|
||||
.description("Search the live Clawdbot docs")
|
||||
.argument("[query...]", "Search query")
|
||||
.action(async (queryParts: string[]) => {
|
||||
try {
|
||||
await docsSearchCommand(queryParts, defaultRuntime);
|
||||
} catch (err) {
|
||||
defaultRuntime.error(String(err));
|
||||
defaultRuntime.exit(1);
|
||||
}
|
||||
});
|
||||
}
|
||||
Reference in New Issue
Block a user