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.

refactor(cli): clean up rough edges and add toolkit version display

jkomyno7ef89854e54e
diff --git a/ts/packages/cli/src/commands/connected-accounts/commands/connected-accounts.whoami.cmd.ts b/ts/packages/cli/src/commands/connected-accounts/commands/connected-accounts.whoami.cmd.ts
index 00cd32b13..6e7272337 100644
--- a/ts/packages/cli/src/commands/connected-accounts/commands/connected-accounts.whoami.cmd.ts
+++ b/ts/packages/cli/src/commands/connected-accounts/commands/connected-accounts.whoami.cmd.ts
@@ -4,8 +4,7 @@ import { ComposioToolkitsRepository } from 'src/services/composio-clients';
import { TerminalUI } from 'src/services/terminal-ui';
import { requireAuth } from 'src/effects/require-auth';
import { handleHttpServerError } from 'src/effects/handle-http-error';
-import { bold, gray } from 'src/ui/colors';
-import { redact } from 'src/ui/redact';
+import { formatConnectedAccountWhoami } from '../format';
const id = Args.text({ name: 'id' }).pipe(
Args.withDescription('Connected account ID (nanoid)'),
@@ -67,18 +66,7 @@ export const connectedAccountsCmd$Whoami = Command.make('whoami', { id }, ({ id
yield* ui.log.warn(`This connected account has status ${item.status}.`);
}
- const redactedId = redact({ value: item.id, prefix: 'con_' });
- const redactedAuthConfigId = redact({ value: item.auth_config.id, prefix: 'ac_' });
-
- const lines: string[] = [];
- lines.push(`${bold('Id:')} ${redactedId}`);
- lines.push(`${bold('Toolkit:')} ${item.toolkit.slug}`);
- lines.push(`${bold('User Id:')} ${item.user_id}`);
- lines.push(`${bold('Status:')} ${item.status === 'ACTIVE' ? item.status : gray(item.status)}`);
- lines.push(`${bold('Auth Config:')} ${redactedAuthConfigId}`);
- lines.push(`${bold('Auth Scheme:')} ${item.auth_config.auth_scheme}`);
-
- yield* ui.note(lines.join('\n'), `whoami: ${item.toolkit.slug}`);
+ yield* ui.note(formatConnectedAccountWhoami(item), `whoami: ${item.toolkit.slug}`);
yield* ui.output(
JSON.stringify(
diff --git a/ts/packages/cli/src/commands/connected-accounts/format.ts b/ts/packages/cli/src/commands/connected-accounts/format.ts
index d6046d087..b25e398bc 100644
--- a/ts/packages/cli/src/commands/connected-accounts/format.ts
+++ b/ts/packages/cli/src/commands/connected-accounts/format.ts
@@ -72,3 +72,17 @@ export function formatConnectedAccountInfo(item: ConnectedAccountItem): string {
return lines.join('\n');
}
+
+/**
+ * Format a connected account for the whoami display (compact 6-field subset).
+ */
+export function formatConnectedAccountWhoami(item: ConnectedAccountItem): string {
+ const lines: string[] = [];
+ lines.push(`${bold('Id:')} ${redact({ value: item.id, prefix: 'con_' })}`);
+ lines.push(`${bold('Status:')} ${item.status === 'ACTIVE' ? item.status : gray(item.status)}`);
+ lines.push(`${bold('Toolkit:')} ${item.toolkit.slug}`);
+ lines.push(`${bold('User Id:')} ${item.user_id}`);
+ lines.push(`${bold('Auth Config:')} ${redact({ value: item.auth_config.id, prefix: 'ac_' })}`);
+ lines.push(`${bold('Auth Scheme:')} ${item.auth_config.auth_scheme}`);
+ return lines.join('\n');
+}
diff --git a/ts/packages/cli/src/commands/toolkits/commands/toolkits.info.cmd.ts b/ts/packages/cli/src/commands/toolkits/commands/toolkits.info.cmd.ts
index 47c32db2b..3a245c35d 100644
--- a/ts/packages/cli/src/commands/toolkits/commands/toolkits.info.cmd.ts
+++ b/ts/packages/cli/src/commands/toolkits/commands/toolkits.info.cmd.ts
@@ -1,90 +1,16 @@
import { Args, Command } from '@effect/cli';
import { Effect, Option } from 'effect';
-import { ComposioToolkitsRepository, HttpServerError } from 'src/services/composio-clients';
+import { ComposioToolkitsRepository } from 'src/services/composio-clients';
import { TerminalUI } from 'src/services/terminal-ui';
import { requireAuth } from 'src/effects/require-auth';
-import type { ToolkitDetailed, AuthConfigDetail } from 'src/models/toolkits';
-import { bold, gray } from 'src/ui/colors';
+import { handleHttpServerError } from 'src/effects/handle-http-error';
+import { formatToolkitInfo } from '../format';
const slug = Args.text({ name: 'slug' }).pipe(
Args.withDescription('Toolkit slug (e.g. "gmail")'),
Args.optional
);
-/**
- * Format auth config fields for display.
- */
-function formatFields(fields: ReadonlyArray<AuthConfigDetail['fields']['auth_config_creation']>) {
- const lines: string[] = [];
-
- for (const group of fields) {
- const allFields = [
- ...group.required.map(f => ({ ...f, label: 'required' })),
- ...group.optional.map(f => ({ ...f, label: 'optional' })),
- ];
-
- if (allFields.length === 0) {
- lines.push(' (none)');
- } else {
- const nameWidth = Math.max(...allFields.map(f => f.name.length));
- const labelWidth = Math.max(...allFields.map(f => f.label.length));
- const typeWidth = Math.max(...allFields.map(f => f.type.length));
-
- for (const field of allFields) {
- const desc = field.description ? ` ${gray(`"${field.description}"`)}` : '';
- lines.push(
- ` ${field.name.padEnd(nameWidth)} ${field.label.padEnd(labelWidth)} ${field.type.padEnd(typeWidth)}${desc}`
- );
- }
- }
- }
-
- return lines.join('\n');
-}
-
-/**
- * Format a detailed toolkit for interactive display.
- */
-function formatToolkitInfo(toolkit: ToolkitDetailed): string {
- const lines: string[] = [];
-
- lines.push(`${bold('Name:')} ${toolkit.name}`);
- lines.push(`${bold('Slug:')} ${toolkit.slug}`);
- lines.push(`${bold('Description:')} ${toolkit.meta.description || '(none)'}`);
-
- // Derive auth schemes from auth_config_details
- const authSchemes = toolkit.auth_config_details.map(d => d.mode);
- if (toolkit.no_auth) {
- lines.push(`${bold('Auth:')} No authentication required`);
- } else if (authSchemes.length > 0) {
- lines.push(`${bold('Auth Schemes:')} ${authSchemes.join(', ')}`);
- if (toolkit.composio_managed_auth_schemes.length > 0) {
- lines.push(
- `${bold('Composio Managed Auth Schemes:')} ${toolkit.composio_managed_auth_schemes.join(', ')}`
- );
- }
- }
-
- // Auth config creation fields
- if (toolkit.auth_config_details.length > 0) {
- lines.push('');
- lines.push(bold('Fields Required for AuthConfig creation:'));
- for (const detail of toolkit.auth_config_details) {
- lines.push(` ${detail.name} (${detail.mode}):`);
- lines.push(formatFields([detail.fields.auth_config_creation]));
- }
-
- lines.push('');
- lines.push(bold('Fields Required for Connected Account creation:'));
- for (const detail of toolkit.auth_config_details) {
- lines.push(` ${detail.name} (${detail.mode}):`);
- lines.push(formatFields([detail.fields.connected_account_initiation]));
- }
- }
-
- return lines.join('\n');
-}
-
/**
* View details of a specific toolkit including auth schemes and required fields.
*
@@ -113,34 +39,21 @@ export const toolkitsCmd$Info = Command.make('info', { slug }, ({ slug }) =>
.withSpinner(`Fetching toolkit "${slugValue}"...`, repo.getToolkitDetailed(slugValue))
.pipe(
Effect.asSome,
- Effect.catchTag('services/HttpServerError', (e: HttpServerError) =>
- Effect.gen(function* () {
- // Show structured error message and suggested fix from the API
- if (e.details) {
- yield* ui.log.error(e.details.message);
- yield* ui.log.step(e.details.suggestedFix);
- } else {
- yield* ui.log.error(`Failed to fetch toolkit "${slugValue}".`);
- }
-
- // Try to suggest similar toolkits
- const suggestions = yield* repo.searchToolkits({ search: slugValue, limit: 3 }).pipe(
- Effect.map(r => r.items),
- Effect.catchAll(() => Effect.succeed([]))
- );
-
- if (suggestions.length > 0) {
- const suggestionLines = suggestions
- .map(s => ` ${s.slug} — ${s.meta.description}`)
- .join('\n');
- yield* ui.log.step(
- `Did you mean?\n${suggestionLines}\n\n> composio toolkits info "${suggestions[0]!.slug}"`
- );
- } else {
- yield* ui.log.step('Browse available toolkits:\n> composio toolkits list');
- }
-
- return Option.none();
+ Effect.catchTag(
+ 'services/HttpServerError',
+ handleHttpServerError(ui, {
+ fallbackMessage: `Failed to fetch toolkit "${slugValue}".`,
+ hint: 'Browse available toolkits:\n> composio toolkits list',
+ fallbackValue: Option.none(),
+ searchForSuggestions: () =>
+ repo.searchToolkits({ search: slugValue, limit: 3 }).pipe(
+ Effect.map(r =>
+ r.items.map(s => ({
+ label: `${s.slug} — ${s.meta.description}`,
+ command: `> composio toolkits info "${s.slug}"`,
+ }))
+ )
+ ),
})
)
);
@@ -155,7 +68,7 @@ export const toolkitsCmd$Info = Command.make('info', { slug }, ({ slug }) =>
// Next step hint
yield* ui.log.step(
- `To list tools in this toolkit:\n> composio tools list --toolkit "${toolkit.slug}"`
+ `To list tools in this toolkit:\n> composio tools list --toolkits "${toolkit.slug}"`
);
yield* ui.output(JSON.stringify(toolkit, null, 2));
diff --git a/ts/packages/cli/src/commands/toolkits/format.ts b/ts/packages/cli/src/commands/toolkits/format.ts
index 94b877149..7e2c2b81f 100644
--- a/ts/packages/cli/src/commands/toolkits/format.ts
+++ b/ts/packages/cli/src/commands/toolkits/format.ts
@@ -1,4 +1,4 @@
-import type { Toolkit } from 'src/models/toolkits';
+import type { Toolkit, ToolkitDetailed, AuthConfigDetail } from 'src/models/toolkits';
import { bold, gray } from 'src/ui/colors';
import { truncate } from 'src/ui/truncate';
@@ -6,15 +6,16 @@ import { truncate } from 'src/ui/truncate';
* Format a list of toolkits as a human-readable table.
*/
export function formatToolkitsTable(toolkits: ReadonlyArray<Toolkit>): string {
- const header = `${bold('Name'.padEnd(20))} ${bold('Slug'.padEnd(20))} ${bold('Tools'.padEnd(7))} ${bold('Triggers'.padEnd(10))} ${bold('Description')}`;
+ const header = `${bold('Name'.padEnd(20))} ${bold('Slug'.padEnd(20))} ${bold('Version'.padEnd(12))} ${bold('Tools'.padEnd(7))} ${bold('Triggers'.padEnd(10))} ${bold('Description')}`;
const rows = toolkits.map(t => {
const name = t.name.padEnd(20);
const slug = t.slug.padEnd(20);
+ const version = (t.meta.available_versions.at(-1) ?? '-').padEnd(12);
const tools = String(t.meta.tools_count).padEnd(7);
const triggers = String(t.meta.triggers_count).padEnd(10);
const desc = gray(truncate(t.meta.description, 50));
- return `${name} ${slug} ${tools} ${triggers} ${desc}`;
+ return `${name} ${slug} ${version} ${tools} ${triggers} ${desc}`;
});
return [header, ...rows].join('\n');
@@ -28,6 +29,7 @@ export function formatToolkitsJson(toolkits: ReadonlyArray<Toolkit>): string {
toolkits.map(t => ({
name: t.name,
slug: t.slug,
+ latest_version: t.meta.available_versions.at(-1) ?? null,
tools_count: t.meta.tools_count,
triggers_count: t.meta.triggers_count,
description: t.meta.description,
@@ -36,3 +38,80 @@ export function formatToolkitsJson(toolkits: ReadonlyArray<Toolkit>): string {
2
);
}
+
+/**
+ * Format auth config fields for display.
+ */
+function formatFields(group: AuthConfigDetail['fields']['auth_config_creation']) {
+ const allFields = [
+ ...group.required.map(f => ({ ...f, label: 'required' })),
+ ...group.optional.map(f => ({ ...f, label: 'optional' })),
+ ];
+
+ if (allFields.length === 0) {
+ return ' (none)';
+ }
+
+ const nameWidth = Math.max(...allFields.map(f => f.name.length));
+ const labelWidth = Math.max(...allFields.map(f => f.label.length));
+ const typeWidth = Math.max(...allFields.map(f => f.type.length));
+
+ return allFields
+ .map(field => {
+ const desc = field.description ? ` ${gray(`"${field.description}"`)}` : '';
+ return ` ${field.name.padEnd(nameWidth)} ${field.label.padEnd(labelWidth)} ${field.type.padEnd(typeWidth)}${desc}`;
+ })
+ .join('\n');
+}
+
+/**
+ * Format a detailed toolkit for interactive display.
+ */
+export function formatToolkitInfo(toolkit: ToolkitDetailed): string {
+ const lines: string[] = [];
+
+ lines.push(`${bold('Name:')} ${toolkit.name}`);
+ lines.push(`${bold('Slug:')} ${toolkit.slug}`);
+
+ const versions = toolkit.meta.available_versions;
+ const latest = versions.at(-1);
+ if (latest) {
+ lines.push(`${bold('Latest Version:')} ${latest} (${versions.length} available)`);
+ } else {
+ lines.push(`${bold('Latest Version:')} -`);
+ }
+
+ lines.push(`${bold('Description:')} ${toolkit.meta.description || '(none)'}`);
+
+ // Derive auth schemes from auth_config_details
+ const authSchemes = toolkit.auth_config_details.map(d => d.mode);
+ if (toolkit.no_auth) {
+ lines.push(`${bold('Auth:')} No authentication required`);
+ } else if (authSchemes.length > 0) {
+ lines.push(`${bold('Auth Schemes:')} ${authSchemes.join(', ')}`);
+ if (toolkit.composio_managed_auth_schemes.length > 0) {
+ lines.push(
+ `${bold('Composio Managed Auth Schemes:')} ${toolkit.composio_managed_auth_schemes.join(', ')}`
+ );
+ }
+ }
+
+ // Auth config creation fields
+ if (toolkit.auth_config_details.length > 0) {
+ lines.push('');
+ lines.push(bold('Fields Required for AuthConfig creation:'));
+ for (const detail of toolkit.auth_config_details) {
+ lines.push(` ${detail.name} (${detail.mode}):`);
+ lines.push(formatFields(detail.fields.auth_config_creation));
+ }
+
+ lines.push('');
+ lines.push(bold('Fields Required for Connected Account creation:'));
+ for (const detail of toolkit.auth_config_details) {
+ lines.push(` ${detail.name} (${detail.mode}):`);
+ lines.push(formatFields(detail.fields.connected_account_initiation));
+ }
+ }
+
+ return lines.join('\n');
+}
diff --git a/ts/packages/cli/src/commands/tools/commands/tools.info.cmd.ts b/ts/packages/cli/src/commands/tools/commands/tools.info.cmd.ts
index 1b1587ef4..4bfbe6f03 100644
--- a/ts/packages/cli/src/commands/tools/commands/tools.info.cmd.ts
+++ b/ts/packages/cli/src/commands/tools/commands/tools.info.cmd.ts
@@ -1,8 +1,9 @@
import { Args, Command } from '@effect/cli';
import { Effect, Option } from 'effect';
-import { ComposioToolkitsRepository, HttpServerError } from 'src/services/composio-clients';
+import { ComposioToolkitsRepository } from 'src/services/composio-clients';
import { TerminalUI } from 'src/services/terminal-ui';
import { requireAuth } from 'src/effects/require-auth';
+import { handleHttpServerError } from 'src/effects/handle-http-error';
import { formatToolInfo } from '../format';
const slug = Args.text({ name: 'slug' }).pipe(
@@ -40,34 +41,21 @@ export const toolsCmd$Info = Command.make('info', { slug }, ({ slug }) =>
.withSpinner(`Fetching tool "${slugValue}"...`, repo.getToolDetailed(slugValue))
.pipe(
Effect.asSome,
- Effect.catchTag('services/HttpServerError', (e: HttpServerError) =>
- Effect.gen(function* () {
- // Show structured error message and suggested fix from the API
- if (e.details) {
- yield* ui.log.error(e.details.message);
- yield* ui.log.step(e.details.suggestedFix);
- } else {
- yield* ui.log.error(`Tool "${slugValue}" not found.`);
- }
-
- // Try to suggest similar tools
- const suggestions = yield* repo.searchTools({ search: slugValue, limit: 3 }).pipe(
- Effect.map(r => r.items),
- Effect.catchAll(() => Effect.succeed([]))
- );
-
- if (suggestions.length > 0) {
- const suggestionLines = suggestions
- .map(s => ` ${s.slug} — ${s.description}`)
- .join('\n');
- yield* ui.log.step(
- `Did you mean?\n${suggestionLines}\n\n> composio tools info "${suggestions[0]!.slug}"`
- );
- } else {
- yield* ui.log.step('Browse available tools:\n> composio tools list');
- }
-
- return Option.none();
+ Effect.catchTag(
+ 'services/HttpServerError',
+ handleHttpServerError(ui, {
+ fallbackMessage: `Tool "${slugValue}" not found.`,
+ hint: 'Browse available tools:\n> composio tools list',
+ fallbackValue: Option.none(),
+ searchForSuggestions: () =>
+ repo.searchTools({ search: slugValue, limit: 3 }).pipe(
+ Effect.map(r =>
+ r.items.map(s => ({
+ label: `${s.slug} — ${s.description}`,
+ command: `> composio tools info "${s.slug}"`,
+ }))
+ )
+ ),
})
)
);
diff --git a/ts/packages/cli/src/commands/tools/commands/tools.list.cmd.ts b/ts/packages/cli/src/commands/tools/commands/tools.list.cmd.ts
index 84a2e4bd2..13bdfa765 100644
--- a/ts/packages/cli/src/commands/tools/commands/tools.list.cmd.ts
+++ b/ts/packages/cli/src/commands/tools/commands/tools.list.cmd.ts
@@ -74,7 +74,7 @@ export const toolsCmd$List = Command.make(
yield* ui.log.info(
totalPages > 1
? `Listing ${showing} tools (page 1 of ${totalPages})\n\n${formatToolsTable(result.items)}`
- : `Fetched ${showing} tools\n\n${formatToolsTable(result.items)}`
+ : `Listing ${showing} tools\n\n${formatToolsTable(result.items)}`
);
// Next step hint
diff --git a/ts/packages/cli/src/commands/tools/commands/tools.search.cmd.ts b/ts/packages/cli/src/commands/tools/commands/tools.search.cmd.ts
index 2a9599a51..0c1f5a602 100644
--- a/ts/packages/cli/src/commands/tools/commands/tools.search.cmd.ts
+++ b/ts/packages/cli/src/commands/tools/commands/tools.search.cmd.ts
@@ -56,7 +56,13 @@ export const toolsCmd$Search = Command.make(
return;
}
- yield* ui.log.info(`Found ${result.items.length} tools\n\n${formatToolsTable(result.items)}`);
+ const showing = result.items.length;
+ const totalPages = result.total_pages;
+ yield* ui.log.info(
+ totalPages > 1
+ ? `Found ${showing} tools (page 1 of ${totalPages})\n\n${formatToolsTable(result.items)}`
+ : `Found ${showing} tools\n\n${formatToolsTable(result.items)}`
+ );
// Next step hint
const firstSlug = result.items[0]?.slug;
diff --git a/ts/packages/cli/src/effects/handle-http-error.ts b/ts/packages/cli/src/effects/handle-http-error.ts
index 0d3d6018c..165dd7227 100644
--- a/ts/packages/cli/src/effects/handle-http-error.ts
+++ b/ts/packages/cli/src/effects/handle-http-error.ts
@@ -2,12 +2,23 @@ import { Effect } from 'effect';
import type { HttpServerError } from 'src/services/composio-clients';
import type { TerminalUI } from 'src/services/terminal-ui';
+export interface Suggestion {
+ readonly label: string;
+ readonly command: string;
+}
+
+const noSuggestions: ReadonlyArray<Suggestion> = [];
+
/**
* Create an HttpServerError handler that logs the structured error details
* (or a fallback message) and a contextual hint, then returns a fallback value.
*
* Used by info/delete/create commands that share the same error-handling shape.
*
+ * When `searchForSuggestions` is provided, the handler will attempt to find
+ * similar items and display "Did you mean?" suggestions instead of the generic hint.
+ * Suggestion search failures are silently swallowed — the handler always completes.
+ *
* @example
* ```ts
* .pipe(
@@ -28,6 +39,11 @@ export const handleHttpServerError =
readonly fallbackMessage: string;
readonly hint: string;
readonly fallbackValue: A;
+ readonly searchForSuggestions?: () => Effect.Effect<
+ ReadonlyArray<Suggestion>,
+ unknown,
+ never
+ >;
}
) =>
(e: HttpServerError) =>
@@ -39,6 +55,19 @@ export const handleHttpServerError =
yield* ui.log.error(opts.fallbackMessage);
}
+ if (opts.searchForSuggestions) {
+ const suggestions = yield* opts
+ .searchForSuggestions()
+ .pipe(Effect.catchAll(() => Effect.succeed(noSuggestions)));
+
+ const [first] = suggestions;
+ if (first) {
+ const lines = suggestions.map(s => ` ${s.label}`).join('\n');
+ yield* ui.log.step(`Did you mean?\n${lines}\n\n${first.command}`);
+ return opts.fallbackValue;
+ }
+ }
+
yield* ui.log.step(opts.hint);
return opts.fallbackValue;
});
diff --git a/ts/packages/cli/test/src/commands/toolkits/toolkits.info.cmd.test.ts b/ts/packages/cli/test/src/commands/toolkits/toolkits.info.cmd.test.ts
index da6c96a73..d0b3fd31a 100644
--- a/ts/packages/cli/test/src/commands/toolkits/toolkits.info.cmd.test.ts
+++ b/ts/packages/cli/test/src/commands/toolkits/toolkits.info.cmd.test.ts
@@ -18,7 +18,7 @@ const testToolkits: Toolkits = [
categories: [],
created_at: new Date('2024-05-03T11:44:32.061Z') as any,
updated_at: new Date('2024-05-03T11:44:32.061Z') as any,
- available_versions: [],
+ available_versions: ['20250101', '20250601', '20250909'],
tools_count: 36,
triggers_count: 2,
},
@@ -37,7 +37,7 @@ const detailedToolkits: ToolkitDetailed[] = [
categories: [],
created_at: new Date('2024-05-03T11:44:32.061Z') as any,
updated_at: new Date('2024-05-03T11:44:32.061Z') as any,
- available_versions: [],
+ available_versions: ['20250101', '20250601', '20250909'],
tools_count: 36,
triggers_count: 2,
},
@@ -125,6 +125,8 @@ describe('CLI: composio toolkits info', () => {
expect(output).toContain('Gmail');
expect(output).toContain('gmail');
expect(output).toContain('Email service to send and receive emails');
+ expect(output).toContain('20250909');
+ expect(output).toContain('3 available');
expect(output).toContain('OAUTH2');
expect(output).toContain('BEARER_TOKEN');
expect(output).toContain('apiKey');
@@ -145,6 +147,8 @@ describe('CLI: composio toolkits info', () => {
const output = lines.join('\n');
expect(output).toContain('Code Interpreter');
+ expect(output).toContain('Latest Version:');
+ expect(output).toContain('-');
expect(output).toContain('No authentication required');
})
);
diff --git a/ts/packages/cli/test/src/commands/toolkits/toolkits.list.cmd.test.ts b/ts/packages/cli/test/src/commands/toolkits/toolkits.list.cmd.test.ts
index f9d052ee0..43f518360 100644
--- a/ts/packages/cli/test/src/commands/toolkits/toolkits.list.cmd.test.ts
+++ b/ts/packages/cli/test/src/commands/toolkits/toolkits.list.cmd.test.ts
@@ -18,7 +18,7 @@ const testToolkits: Toolkits = [
categories: [],
created_at: new Date('2024-05-03T11:44:32.061Z') as any,
updated_at: new Date('2024-05-03T11:44:32.061Z') as any,
- available_versions: [],
+ available_versions: ['20250101', '20250909'],
tools_count: 36,
triggers_count: 2,
},
@@ -52,7 +52,7 @@ const testToolkits: Toolkits = [
categories: [],
created_at: new Date('2024-05-03T11:44:32.061Z') as any,
updated_at: new Date('2024-05-03T11:44:32.061Z') as any,
- available_versions: [],
+ available_versions: ['20260101'],
tools_count: 50,
triggers_count: 10,
},
@@ -81,6 +81,10 @@ describe('CLI: composio toolkits list', () => {
expect(output).toContain('gmail');
expect(output).toContain('Slack');
expect(output).toContain('GitHub');
+ // Version column
+ expect(output).toContain('Version');
+ expect(output).toContain('20250909');
+ expect(output).toContain('20260101');
expect(output).toContain('Listing 3 of 3 toolkits');
})
);
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 37663d023..b9667963d 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
@@ -18,7 +18,7 @@ const testToolkits: Toolkits = [
categories: [],
created_at: new Date('2024-05-03T11:44:32.061Z') as any,
updated_at: new Date('2024-05-03T11:44:32.061Z') as any,
- available_versions: [],
+ available_versions: ['20250909'],
tools_count: 36,
triggers_count: 2,
},
@@ -52,7 +52,7 @@ const testToolkits: Toolkits = [
categories: [],
created_at: new Date('2024-05-03T11:44:32.061Z') as any,
updated_at: new Date('2024-05-03T11:44:32.061Z') as any,
- available_versions: [],
+ available_versions: ['20250101', '20260101'],
tools_count: 42,
triggers_count: 5,
},
diff --git a/ts/packages/cli/test/src/commands/tools/tools.list.cmd.test.ts b/ts/packages/cli/test/src/commands/tools/tools.list.cmd.test.ts
index b993752e9..6f10c88b3 100644
--- a/ts/packages/cli/test/src/commands/tools/tools.list.cmd.test.ts
+++ b/ts/packages/cli/test/src/commands/tools/tools.list.cmd.test.ts
@@ -67,7 +67,7 @@ describe('CLI: composio tools list', () => {
expect(output).toContain('GMAIL_SEND_EMAIL');
expect(output).toContain('SLACK_SEND_MESSAGE');
- expect(output).toContain('Fetched 3 tools');
+ expect(output).toContain('Listing 3 tools');
})
);
}
@@ -85,7 +85,7 @@ describe('CLI: composio tools list', () => {
expect(output).toContain('GMAIL_SEND_EMAIL');
expect(output).toContain('GMAIL_CREATE_DRAFT');
expect(output).not.toContain('SLACK_SEND_MESSAGE');
- expect(output).toContain('Fetched 2 tools');
+ expect(output).toContain('Listing 2 tools');
})
);
}