aboutsummaryrefslogtreecommitdiffstats
path: root/apps/cli/src/commands/lists.ts
diff options
context:
space:
mode:
authorMohamed Bassem <me@mbassem.com>2026-01-26 01:12:37 +0000
committerGitHub <noreply@github.com>2026-01-26 01:12:37 +0000
commit42cdc937c867f5e35c75534f55caea51c60d388a (patch)
tree4676519f6b557c00f0598d4e7705dc08cd87f1f5 /apps/cli/src/commands/lists.ts
parent5656e394d3d879d9cd48c18400cd7ce4c12f416e (diff)
downloadkarakeep-42cdc937c867f5e35c75534f55caea51c60d388a.tar.zst
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 <noreply@anthropic.com>
Diffstat (limited to 'apps/cli/src/commands/lists.ts')
-rw-r--r--apps/cli/src/commands/lists.ts11
1 files changed, 10 insertions, 1 deletions
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 <id>", "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)];
}