From 42cdc937c867f5e35c75534f55caea51c60d388a Mon Sep 17 00:00:00 2001 From: Mohamed Bassem Date: Mon, 26 Jan 2026 01:12:37 +0000 Subject: feat(cli): Add bookmark search command (#2426) * feat(cli): Add search subcommand to bookmarks Add a new search subcommand that uses the searchBookmarks API endpoint. The command supports: - Full-text search with advanced query matchers (tag:, is:, list:, etc.) - Pagination with --all flag to fetch all results - Sorting by relevance, ascending, or descending order - Optional full content inclusion with --include-content - Configurable result limit per page Example usage: bookmarks search "is:fav tag:important" bookmarks search "kotlin" --sort-order desc --limit 20 bookmarks search "title:api" --include-content --all * fixes + format --------- Co-authored-by: Claude --- apps/cli/src/commands/lists.ts | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'apps/cli/src/commands/lists.ts') diff --git a/apps/cli/src/commands/lists.ts b/apps/cli/src/commands/lists.ts index 864fa790..1d9341d7 100644 --- a/apps/cli/src/commands/lists.ts +++ b/apps/cli/src/commands/lists.ts @@ -86,15 +86,24 @@ listsCmd .command("get") .description("gets all the ids of the bookmarks assigned to the list") .requiredOption("--list ", "the id of the list") + .option( + "--include-content", + "include full bookmark content in results", + false, + ) .action(async (opts) => { const api = getAPIClient(); try { - let resp = await api.bookmarks.getBookmarks.query({ listId: opts.list }); + let resp = await api.bookmarks.getBookmarks.query({ + listId: opts.list, + includeContent: opts.includeContent, + }); let results: string[] = resp.bookmarks.map((b) => b.id); while (resp.nextCursor) { resp = await api.bookmarks.getBookmarks.query({ listId: opts.list, cursor: resp.nextCursor, + includeContent: opts.includeContent, }); results = [...results, ...resp.bookmarks.map((b) => b.id)]; } -- cgit v1.2.3-70-g09d2