Skip to content

Composio powers 1000+ toolkits, tool search, context management, authentication, and a sandboxed workbench to help you build AI agents that turn intent into action.

cli: show total counts in toolkit search

jkomyno8b7f32f1ce05
diff --git a/ts/packages/cli/src/commands/toolkits/commands/toolkits.search.cmd.ts b/ts/packages/cli/src/commands/toolkits/commands/toolkits.search.cmd.ts
index deb5a15d0..b274db160 100644
--- a/ts/packages/cli/src/commands/toolkits/commands/toolkits.search.cmd.ts
+++ b/ts/packages/cli/src/commands/toolkits/commands/toolkits.search.cmd.ts
@@ -47,8 +47,11 @@ export const toolkitsCmd$Search = Command.make('search', { query, limit }, ({ qu
return;
}
+ const showing = result.items.length;
+ const total = result.total_items;
+
yield* ui.log.info(
- `Found ${result.items.length} toolkits\n\n${formatToolkitsTable(result.items)}`
+ `Found ${showing} of ${total} toolkits\n\n${formatToolkitsTable(result.items)}`
);
// Next step hint
diff --git a/ts/packages/cli/test/src/commands/toolkits/toolkits.search.cmd.test.ts b/ts/packages/cli/test/src/commands/toolkits/toolkits.search.cmd.test.ts
index 243bf2381..37663d023 100644
--- a/ts/packages/cli/test/src/commands/toolkits/toolkits.search.cmd.test.ts
+++ b/ts/packages/cli/test/src/commands/toolkits/toolkits.search.cmd.test.ts
@@ -80,7 +80,7 @@ describe('CLI: composio toolkits search', () => {
expect(output).toContain('Gmail');
expect(output).toContain('Outlook');
expect(output).not.toContain('Slack');
- expect(output).toContain('Found 2 toolkits');
+ expect(output).toContain('Found 2 of 2 toolkits');
})
);
}
@@ -110,7 +110,7 @@ describe('CLI: composio toolkits search', () => {
const lines = yield* MockConsole.getLines({ stripAnsi: true });
const output = lines.join('\n');
- expect(output).toContain('Found 1 toolkits');
+ expect(output).toContain('Found 1 of 2 toolkits');
})
);
}