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.

fix(cli): send x-user-api-key and use COMPOSIO_USER_API_KEY (#2779)

Musthaq Ahamad6db846310e5d
diff --git a/.changeset/khaki-coats-start.md b/.changeset/khaki-coats-start.md
new file mode 100644
index 000000000..e9c8d9c5e
--- /dev/null
+++ b/.changeset/khaki-coats-start.md
@@ -0,0 +1,5 @@
+---
+'@composio/cli': patch
+---
+
+Skip user api key from env
diff --git a/.github/workflows/build-cli-binaries.yml b/.github/workflows/build-cli-binaries.yml
index c95cc88aa..caa0f16fc 100644
--- a/.github/workflows/build-cli-binaries.yml
+++ b/.github/workflows/build-cli-binaries.yml
@@ -75,7 +75,7 @@ jobs:
- name: Test binary
working-directory: ts/packages/cli
env:
- COMPOSIO_API_KEY: test-dummy-api-key-for-ci
+ COMPOSIO_USER_API_KEY: test-dummy-api-key-for-ci
run: |
./dist/binaries/${{ matrix.artifact }} --version
./dist/binaries/${{ matrix.artifact }} --help | head -5
diff --git a/.github/workflows/ts.test-e2e.yml b/.github/workflows/ts.test-e2e.yml
index 196ace674..043caafa6 100644
--- a/.github/workflows/ts.test-e2e.yml
+++ b/.github/workflows/ts.test-e2e.yml
@@ -4,10 +4,10 @@ on:
push:
branches: [master, next]
paths:
- - "ts/**"
+ - 'ts/**'
pull_request:
paths:
- - "ts/**"
+ - 'ts/**'
workflow_dispatch:
jobs:
@@ -25,6 +25,7 @@ jobs:
env:
CI: 1
COMPOSIO_API_KEY: ${{ secrets.COMPOSIO_API_KEY }}
+ COMPOSIO_USER_API_KEY: ${{ secrets.COMPOSIO_USER_API_KEY }}
COMPOSIO_E2E_NODE_VERSION: ${{ matrix.node-version }}
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
@@ -32,6 +33,11 @@ jobs:
- name: Checkout Code
uses: actions/checkout@v6
+ - name: Normalize Composio API keys
+ run: |
+ echo "COMPOSIO_USER_API_KEY=${COMPOSIO_USER_API_KEY}" >> "$GITHUB_ENV"
+ echo "COMPOSIO_API_KEY=${COMPOSIO_API_KEY}" >> "$GITHUB_ENV"
+
- name: Setup Node.js, pnpm, Bun
uses: ./.github/actions/setup-node-pnpm-bun
@@ -68,6 +74,7 @@ jobs:
env:
CI: 1
COMPOSIO_API_KEY: ${{ secrets.COMPOSIO_API_KEY }}
+ COMPOSIO_USER_API_KEY: ${{ secrets.COMPOSIO_USER_API_KEY }}
COMPOSIO_E2E_DENO_VERSION: ${{ matrix.deno-version }}
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
@@ -75,6 +82,11 @@ jobs:
- name: Checkout Code
uses: actions/checkout@v6
+ - name: Normalize Composio API keys
+ run: |
+ echo "COMPOSIO_USER_API_KEY=${COMPOSIO_USER_API_KEY}" >> "$GITHUB_ENV"
+ echo "COMPOSIO_API_KEY=${COMPOSIO_API_KEY}" >> "$GITHUB_ENV"
+
- name: Setup Deno
uses: denoland/setup-deno@v2
with:
@@ -99,6 +111,7 @@ jobs:
permissions: read-all
env:
CI: 1
+ COMPOSIO_USER_API_KEY: ${{ secrets.COMPOSIO_USER_API_KEY }}
COMPOSIO_API_KEY: ${{ secrets.COMPOSIO_API_KEY }}
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
@@ -106,6 +119,11 @@ jobs:
- name: Checkout Code
uses: actions/checkout@v6
+ - name: Normalize Composio API keys
+ run: |
+ echo "COMPOSIO_USER_API_KEY=${COMPOSIO_USER_API_KEY}" >> "$GITHUB_ENV"
+ echo "COMPOSIO_API_KEY=${COMPOSIO_API_KEY}" >> "$GITHUB_ENV"
+
- name: Setup Node.js, pnpm, Bun
uses: ./.github/actions/setup-node-pnpm-bun
@@ -137,12 +155,18 @@ jobs:
permissions: read-all
env:
COMPOSIO_API_KEY: ${{ secrets.COMPOSIO_API_KEY }}
+ COMPOSIO_USER_API_KEY: ${{ secrets.COMPOSIO_USER_API_KEY }}
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
steps:
- name: Checkout Code
uses: actions/checkout@v6
+ - name: Normalize Composio API keys
+ run: |
+ echo "COMPOSIO_USER_API_KEY=${COMPOSIO_USER_API_KEY}" >> "$GITHUB_ENV"
+ echo "COMPOSIO_API_KEY=${COMPOSIO_API_KEY}" >> "$GITHUB_ENV"
+
- name: Setup Node.js, pnpm, Bun
uses: ./.github/actions/setup-node-pnpm-bun
with:
@@ -170,4 +194,6 @@ jobs:
- name: Run Cloudflare Workers E2E Tests
run: pnpm run test:e2e:cloudflare
env:
+ COMPOSIO_USER_API_KEY: ${{ secrets.COMPOSIO_USER_API_KEY }}
+ COMPOSIO_API_KEY: ${{ secrets.COMPOSIO_API_KEY }}
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
diff --git a/ts/e2e-tests/_utils/Dockerfile.cli b/ts/e2e-tests/_utils/Dockerfile.cli
index 0f238c72e..1b16cbad1 100644
--- a/ts/e2e-tests/_utils/Dockerfile.cli
+++ b/ts/e2e-tests/_utils/Dockerfile.cli
@@ -3,7 +3,7 @@
# Usage: docker build -f Dockerfile.cli --build-arg CLI_VERSION=0.1.24 -t test-name .
ARG NODE_VERSION=20.19.0
-ARG BUN_VERSION=1.3.8
+ARG BUN_VERSION=1.3.10
ARG CLI_VERSION=0.0.0
FROM oven/bun:${BUN_VERSION} AS bun
diff --git a/ts/e2e-tests/_utils/src/image-lifecycle.ts b/ts/e2e-tests/_utils/src/image-lifecycle.ts
index e479a2d9e..7199b917e 100644
--- a/ts/e2e-tests/_utils/src/image-lifecycle.ts
+++ b/ts/e2e-tests/_utils/src/image-lifecycle.ts
@@ -1,4 +1,6 @@
import { $ } from 'bun';
+import { existsSync } from 'node:fs';
+import { homedir } from 'node:os';
import { resolve } from 'node:path';
import { getRepoRoot } from './config';
@@ -133,6 +135,22 @@ function labelsToArgs(labels: Record<string, string> = {}): string[] {
return args;
}
+/**
+ * Adds a bind mount for host ~/.composio into container home.
+ * This allows E2E jobs to inject `user_data.json` once per job.
+ */
+function addHostComposioMount(dockerArgs: string[], containerComposioPath: string): void {
+ const hostComposioPath = resolve(homedir(), '.composio');
+ if (!existsSync(hostComposioPath)) {
+ return;
+ }
+
+ dockerArgs.push(
+ '--mount',
+ `type=bind,src=${hostComposioPath},dst=${containerComposioPath},readonly`
+ );
+}
+
/**
* Executes a command and captures stdout/stderr using Bun shell.
*/
@@ -267,6 +285,8 @@ export async function runNodeContainer(options: RunNodeContainerOptions): Promis
dockerArgs.push('--workdir', containerCwd);
}
+ addHostComposioMount(dockerArgs, '/root/.composio');
+
// Pass environment variables to the container for runtime configuration.
if (env) {
for (const [k, v] of Object.entries(env)) {
@@ -446,6 +466,8 @@ export async function runDenoContainer(options: RunDenoContainerOptions): Promis
dockerArgs.push('--workdir', containerCwd);
}
+ addHostComposioMount(dockerArgs, '/root/.composio');
+
// Pass environment variables to the container for runtime configuration.
if (env) {
for (const [k, v] of Object.entries(env)) {
@@ -621,6 +643,8 @@ export async function runCliContainer(options: RunCliContainerOptions): Promise<
dockerArgs.push('--workdir', containerCwd);
}
+ addHostComposioMount(dockerArgs, '/tmp/.composio');
+
if (env) {
for (const [k, v] of Object.entries(env)) {
if (v === undefined) continue;
diff --git a/ts/e2e-tests/cli/README.md b/ts/e2e-tests/cli/README.md
index 83990fe0a..19751bc2e 100644
--- a/ts/e2e-tests/cli/README.md
+++ b/ts/e2e-tests/cli/README.md
@@ -13,7 +13,7 @@ Tests use `runCmd` to execute shell commands in the container and assert on exit
| Suite | Description | Env Vars |
| --- | --- | --- |
| [version](./version/) | `composio version` output and exit code | None |
-| [whoami](./whoami/) | `composio whoami` prints the API key | `COMPOSIO_API_KEY` |
+| [whoami](./whoami/) | `composio whoami` prints the API key | `COMPOSIO_USER_API_KEY` |
## Isolation Tool
diff --git a/ts/e2e-tests/cli/toolkits/info/README.md b/ts/e2e-tests/cli/toolkits/info/README.md
index 33ea796cb..0ad94f457 100644
--- a/ts/e2e-tests/cli/toolkits/info/README.md
+++ b/ts/e2e-tests/cli/toolkits/info/README.md
@@ -13,7 +13,7 @@ Verifies that `composio toolkits info <slug>` returns detailed toolkit JSON in p
## Requirements
-- `COMPOSIO_API_KEY` (**required**) — Composio API key passed to the container
+- `COMPOSIO_USER_API_KEY` (**required**) — Composio user API key passed to the container
## Running
diff --git a/ts/e2e-tests/cli/toolkits/info/e2e.test.ts b/ts/e2e-tests/cli/toolkits/info/e2e.test.ts
index 9a510559e..66a92af01 100644
--- a/ts/e2e-tests/cli/toolkits/info/e2e.test.ts
+++ b/ts/e2e-tests/cli/toolkits/info/e2e.test.ts
@@ -16,7 +16,7 @@ import { describe, it, expect, beforeAll } from 'bun:test';
declare module 'bun' {
interface Env {
- COMPOSIO_API_KEY: string;
+ COMPOSIO_USER_API_KEY: string;
}
}
@@ -25,7 +25,7 @@ e2e(import.meta.url, {
cli: ['current'],
},
env: {
- COMPOSIO_API_KEY: Bun.env.COMPOSIO_API_KEY,
+ COMPOSIO_USER_API_KEY: Bun.env.COMPOSIO_USER_API_KEY,
},
defineTests: ({ runCmd }) => {
let validResult: E2ETestResult;
diff --git a/ts/e2e-tests/cli/toolkits/list/README.md b/ts/e2e-tests/cli/toolkits/list/README.md
index 2fcd7ebda..6c59b03b9 100644
--- a/ts/e2e-tests/cli/toolkits/list/README.md
+++ b/ts/e2e-tests/cli/toolkits/list/README.md
@@ -12,7 +12,7 @@ Verifies that `composio toolkits list` returns toolkits as JSON in piped mode wi
## Requirements
-- `COMPOSIO_API_KEY` (**required**) — Composio API key passed to the container
+- `COMPOSIO_USER_API_KEY` (**required**) — Composio user API key passed to the container
## Running
diff --git a/ts/e2e-tests/cli/toolkits/list/e2e.test.ts b/ts/e2e-tests/cli/toolkits/list/e2e.test.ts
index 2e1959e38..319253fd4 100644
--- a/ts/e2e-tests/cli/toolkits/list/e2e.test.ts
+++ b/ts/e2e-tests/cli/toolkits/list/e2e.test.ts
@@ -11,7 +11,7 @@ import { describe, it, expect, beforeAll } from 'bun:test';
declare module 'bun' {
interface Env {
- COMPOSIO_API_KEY: string;
+ COMPOSIO_USER_API_KEY: string;
}
}
@@ -20,7 +20,7 @@ e2e(import.meta.url, {
cli: ['current'],
},
env: {
- COMPOSIO_API_KEY: Bun.env.COMPOSIO_API_KEY,
+ COMPOSIO_USER_API_KEY: Bun.env.COMPOSIO_USER_API_KEY,
},
defineTests: ({ runCmd }) => {
let exactResult: E2ETestResult;
diff --git a/ts/e2e-tests/cli/toolkits/search/README.md b/ts/e2e-tests/cli/toolkits/search/README.md
index d84df3c8e..aa24351e1 100644
--- a/ts/e2e-tests/cli/toolkits/search/README.md
+++ b/ts/e2e-tests/cli/toolkits/search/README.md
@@ -13,7 +13,7 @@ Verifies that `composio toolkits search <query>` returns matching toolkits as JS
## Requirements
-- `COMPOSIO_API_KEY` (**required**) — Composio API key passed to the container
+- `COMPOSIO_USER_API_KEY` (**required**) — Composio user API key passed to the container
## Running
diff --git a/ts/e2e-tests/cli/toolkits/search/e2e.test.ts b/ts/e2e-tests/cli/toolkits/search/e2e.test.ts
index 7d728bff9..8558b28d4 100644
--- a/ts/e2e-tests/cli/toolkits/search/e2e.test.ts
+++ b/ts/e2e-tests/cli/toolkits/search/e2e.test.ts
@@ -16,7 +16,7 @@ import { describe, it, expect, beforeAll } from 'bun:test';
declare module 'bun' {
interface Env {
- COMPOSIO_API_KEY: string;
+ COMPOSIO_USER_API_KEY: string;
}
}
@@ -25,7 +25,7 @@ e2e(import.meta.url, {
cli: ['current'],
},
env: {
- COMPOSIO_API_KEY: Bun.env.COMPOSIO_API_KEY,
+ COMPOSIO_USER_API_KEY: Bun.env.COMPOSIO_USER_API_KEY,
},
defineTests: ({ runCmd }) => {
let validResult: E2ETestResult;
diff --git a/ts/e2e-tests/cli/whoami/README.md b/ts/e2e-tests/cli/whoami/README.md
index 9db079258..2f4399aa1 100644
--- a/ts/e2e-tests/cli/whoami/README.md
+++ b/ts/e2e-tests/cli/whoami/README.md
@@ -7,7 +7,7 @@ Verifies that `composio whoami` prints the authenticated API key and respects st
The CLI separates decoration (stderr) from data (stdout). This suite ensures:
- `composio whoami` exits with code 0
-- stdout contains the API key passed via `COMPOSIO_API_KEY`
+- stdout contains the API key passed via `COMPOSIO_USER_API_KEY`
- stderr is empty (no decoration leaks into piped output)
- Redirecting stdout to a file captures the clean API key
@@ -16,15 +16,15 @@ The CLI separates decoration (stderr) from data (stdout). This suite ensures:
| Test | Description |
| --- | --- |
| Exit code | `composio whoami` returns 0 |
-| stdout | Output matches `COMPOSIO_API_KEY` |
+| stdout | Output matches `COMPOSIO_USER_API_KEY` |
| stderr | Empty when piped |
| File redirect | `composio whoami > out.txt` captures the API key in the file |
## Requirements
-- `COMPOSIO_API_KEY` (**required**) — Composio API key passed to the container
+- `COMPOSIO_USER_API_KEY` (**required**) — Composio user API key consumed by CLI
-If `COMPOSIO_API_KEY` is not set, the suite fails fast at startup.
+If `COMPOSIO_USER_API_KEY` is not set, the suite fails fast at startup.
## Isolation Tool
diff --git a/ts/e2e-tests/cli/whoami/e2e.test.ts b/ts/e2e-tests/cli/whoami/e2e.test.ts
index 7cf8a77ae..26ea3ae0f 100644
--- a/ts/e2e-tests/cli/whoami/e2e.test.ts
+++ b/ts/e2e-tests/cli/whoami/e2e.test.ts
@@ -10,7 +10,7 @@ import { describe, it, expect, beforeAll } from 'bun:test';
declare module 'bun' {
interface Env {
- COMPOSIO_API_KEY: string;
+ COMPOSIO_USER_API_KEY: string;
}
}
@@ -19,10 +19,10 @@ e2e(import.meta.url, {
cli: ['current'],
},
env: {
- COMPOSIO_API_KEY: Bun.env.COMPOSIO_API_KEY,
+ COMPOSIO_USER_API_KEY: Bun.env.COMPOSIO_USER_API_KEY,
},
defineTests: ({ runCmd }) => {
- const expectedApiKey = Bun.env.COMPOSIO_API_KEY.trim();
+ const expectedApiKey = Bun.env.COMPOSIO_USER_API_KEY.trim();
let whoamiResult: E2ETestResult;
let redirectedResult: E2ETestResultWithFiles<'out.txt'>;
diff --git a/ts/e2e-tests/runtimes/node/typescript-mjs-import-nodenext/e2e.test.ts b/ts/e2e-tests/runtimes/node/typescript-mjs-import-nodenext/e2e.test.ts
index 6382aeb4a..802c0a2b0 100644
--- a/ts/e2e-tests/runtimes/node/typescript-mjs-import-nodenext/e2e.test.ts
+++ b/ts/e2e-tests/runtimes/node/typescript-mjs-import-nodenext/e2e.test.ts
@@ -13,6 +13,7 @@ import { describe, it, expect, beforeAll } from 'bun:test';
declare module 'bun' {
interface Env {
COMPOSIO_API_KEY: string;
+ COMPOSIO_USER_API_KEY: string;
}
}
@@ -20,6 +21,7 @@ e2e(import.meta.url, {
versions: { node: ['current'] },
env: {
COMPOSIO_API_KEY: Bun.env.COMPOSIO_API_KEY,
+ COMPOSIO_USER_API_KEY: Bun.env.COMPOSIO_USER_API_KEY,
},
defineTests: ({ runFixture }) => {
let result: E2ETestResult;
diff --git a/ts/packages/cli/src/commands/index.ts b/ts/packages/cli/src/commands/index.ts
index fe705ea0c..b8185223b 100644
--- a/ts/packages/cli/src/commands/index.ts
+++ b/ts/packages/cli/src/commands/index.ts
@@ -18,6 +18,7 @@ import { authConfigsCmd } from './auth-configs/auth-configs.cmd';
import { connectedAccountsCmd } from './connected-accounts/connected-accounts.cmd';
import { triggersCmd } from './triggers/triggers.cmd';
import { logsCmd } from './logs-cmd/logs.cmd';
+import { showToolsExecuteInputHelp } from './tools/commands/tools.execute.cmd';
const $cmd = $defaultCmd.pipe(
Command.withSubcommands([
@@ -41,14 +42,75 @@ const $cmd = $defaultCmd.pipe(
export const rootCommand = $cmd;
+const parseExecuteInputHelpSlug = (argv: ReadonlyArray<string>): string | undefined => {
+ const args = argv.slice(2);
+ if (args.length < 3) return undefined;
+ if (args[0] !== 'tools' || args[1] !== 'execute') return undefined;
+
+ const hasHelp = args.includes('--help') || args.includes('-h');
+ if (!hasHelp) return undefined;
+
+ const tail = args.slice(2);
+ for (let i = 0; i < tail.length; i += 1) {
+ const token = tail[i];
+ if (!token) continue;
+
+ // Stop option parsing after "--" and treat next positional as slug.
+ if (token === '--') {
+ const candidate = tail[i + 1];
+ return candidate && !candidate.startsWith('-') ? candidate : undefined;
+ }
+
+ // Ignore help flags.
+ if (token === '--help' || token === '-h') {
+ continue;
+ }
+
+ // Skip known execute option values.
+ if (token === '--data' || token === '-d' || token === '--user-id') {
+ i += 1;
+ continue;
+ }
+ if (token.startsWith('--data=') || token.startsWith('-d=') || token.startsWith('--user-id=')) {
+ continue;
+ }
+
+ // Skip unknown flags.
+ if (token.startsWith('-')) {
+ continue;
+ }
+
+ // First positional token is the slug.
+ return token;
+ }
+
+ return undefined;
+};
+
+const normalizeVersionShortFlag = (argv: ReadonlyArray<string>): ReadonlyArray<string> => {
+ const args = argv.slice(2);
+ if (args.length === 1 && args[0] === '-v') {
+ return [...argv.slice(0, 2), '--version'];
+ }
+ return argv;
+};
+
export const runWithConfig = Effect.gen(function* () {
const version = yield* getVersion;
-
- return Command.run($cmd, {
+ const run = Command.run($cmd, {
name: 'composio',
executable: 'composio',
version,
});
+
+ return (argv: ReadonlyArray<string>) => {
+ const normalizedArgv = normalizeVersionShortFlag(argv);
+ const executeHelpSlug = parseExecuteInputHelpSlug(normalizedArgv);
+ if (executeHelpSlug) {
+ return showToolsExecuteInputHelp(executeHelpSlug);
+ }
+ return run(normalizedArgv);
+ };
});
export const run = Command.run($cmd, {
diff --git a/ts/packages/cli/src/commands/tools/commands/tools.execute.cmd.ts b/ts/packages/cli/src/commands/tools/commands/tools.execute.cmd.ts
index 371b7f5f6..856f396cd 100644
--- a/ts/packages/cli/src/commands/tools/commands/tools.execute.cmd.ts
+++ b/ts/packages/cli/src/commands/tools/commands/tools.execute.cmd.ts
@@ -13,12 +13,15 @@ import {
} from 'src/services/tools-executor';
import type { ToolExecuteParams } from 'src/services/tools-executor';
import { ProjectContext } from 'src/services/project-context';
+import { ComposioToolkitsRepository } from 'src/services/composio-clients';
import {
extractApiErrorDetails,
extractMessage,
extractSlug,
} from 'src/utils/api-error-extraction';
import { bold } from 'src/ui/colors';
+import { handleHttpServerError } from 'src/effects/handle-http-error';
+import { formatToolInputParameters } from '../format';
const slug = Args.text({ name: 'slug' }).pipe(
Args.withDescription('Tool slug (e.g. "GITHUB_CREATE_ISSUE")')
@@ -169,6 +172,52 @@ const normalizeError = (error: unknown): unknown => {
return current;
};
+/**
+ * Show execute-focused help for a specific tool slug.
+ * This prints only input parameters (data payload schema).
+ */
+export const showToolsExecuteInputHelp = (toolSlug: string) =>
+ Effect.gen(function* () {
+ if (!(yield* requireAuth)) return;
+
+ const ui = yield* TerminalUI;
+ const repo = yield* ComposioToolkitsRepository;
+
+ const toolOpt = yield* ui
+ .withSpinner(`Fetching input parameters for "${toolSlug}"...`, repo.getToolDetailed(toolSlug))
+ .pipe(
+ Effect.asSome,
+ Effect.catchTag(
+ 'services/HttpServerError',
+ handleHttpServerError(ui, {
+ fallbackMessage: `Tool "${toolSlug}" not found.`,
+ hint: 'Browse available tools:\n> composio tools list',
+ fallbackValue: Option.none(),
+ searchForSuggestions: () =>
+ repo.searchTools({ search: toolSlug, limit: 3 }).pipe(
+ Effect.map(r =>
+ r.items.map(s => ({
+ label: `${s.slug} — ${s.description}`,
+ command: `> composio tools execute "${s.slug}" --help`,
+ }))
+ )
+ ),
+ })
+ )
+ );
+
+ if (Option.isNone(toolOpt)) return;
+ const tool = toolOpt.value;
+
+ yield* ui.note(formatToolInputParameters(tool), `Execute Help: ${tool.slug}`);
+ yield* ui.log.step(
+ `Run:\n> composio tools execute "${tool.slug}" --user-id "<user-id>" -d '{"key":"value"}'`
+ );
+ yield* ui.output(
+ JSON.stringify({ slug: tool.slug, input_parameters: tool.input_parameters }, null, 2)
+ );
+ });
+
/**
* Display a user-friendly error message for tool execution failures.
*
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 8fac9396c..55da46ff4 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
@@ -8,7 +8,9 @@ import { formatToolsTable } from '../format';
import type { Tool } from 'src/models/tools';
const query = Args.text({ name: 'query' }).pipe(
- Args.withDescription('Search query (e.g. "send emails")')
+ Args.withDescription(
+ 'Semantic use-case query (e.g. "onboard a new GitHub repo and notify Slack").'
+ )
);
const toolkits = Options.text('toolkits').pipe(
@@ -22,7 +24,11 @@ const limit = Options.integer('limit').pipe(
);
/**
- * Search tools by use case.
+ * Search tools semantically by use case.
+ *
+ * The query is interpreted semantically (not exact keyword matching), so you can
+ * describe an outcome or workflow. The command returns the most relevant tools
+ * for that use case and includes recommended guidance/plan steps to help execute it.
*
* @example
* ```bash
@@ -135,4 +141,8 @@ export const toolsCmd$Search = Command.make(
// For machine-readable output (e.g. piping to jq), expose the full API payload.
yield* ui.output(JSON.stringify(searchResponse, null, 2));
})
-).pipe(Command.withDescription('Search tools by use case.'));
+).pipe(
+ Command.withDescription(
+ 'Semantically search tools by use case; returns best-fit tools plus recommended usage guidance.'
+ )
+);
diff --git a/ts/packages/cli/src/commands/tools/format.ts b/ts/packages/cli/src/commands/tools/format.ts
index 380f9e631..8e212e37c 100644
--- a/ts/packages/cli/src/commands/tools/format.ts
+++ b/ts/packages/cli/src/commands/tools/format.ts
@@ -58,6 +58,39 @@ function formatSchemaProperties(schema: Record<string, unknown>): string {
.join('\n');
}
+/**
+ * Format JSON Schema properties using a detailed field layout, similar to trigger info.
+ */
+function formatSchemaPropertiesDetailed(schema: Record<string, unknown>): string {
+ const entries = extractSchemaProperties(schema);
+ if (entries.length === 0) {
+ return ' (none)';
+ }
+
+ const typeWidth = Math.max(...entries.map(e => e.type.length));
+ const labelWidth = Math.max(...entries.map(e => e.label.length));
+ const metadataLabels = ['description:', 'type:', 'required:', 'default:'] as const;
+ const metadataLabelWidth = Math.max(...metadataLabels.map(label => label.length));
+
+ return entries
+ .map(e => {
+ const lines: string[] = [];
+ lines.push(` ${bold(e.name)}`);
+ lines.push(
+ ` ${'description:'.padEnd(metadataLabelWidth)} ${e.description ? gray(truncate(e.description, 70)) : '-'}`
+ );
+ lines.push(` ${'type:'.padEnd(metadataLabelWidth)} ${e.type.padEnd(typeWidth)}`);
+ lines.push(` ${'required:'.padEnd(metadataLabelWidth)} ${e.label.padEnd(labelWidth)}`);
+ if (e.hasDefault) {
+ lines.push(
+ ` ${'default:'.padEnd(metadataLabelWidth)} ${gray(truncate(JSON.stringify(e.defaultValue), 40))}`
+ );
+ }
+ return lines.join('\n');
+ })
+ .join('\n\n');
+}
+
/**
* Format a detailed tool for interactive display.
*/
@@ -93,3 +126,23 @@ export function formatToolInfo(tool: ToolDetailedResponse): string {
return lines.join('\n');
}
+
+/**
+ * Format only tool input parameters for execute-help flows.
+ */
+export function formatToolInputParameters(tool: ToolDetailedResponse): string {
+ const lines: string[] = [];
+ lines.push(`${bold('Name:')} ${tool.name}`);
+ lines.push(`${bold('Slug:')} ${tool.slug}`);
+ lines.push(`${bold('Description:')} ${tool.description || '(none)'}`);
+
+ if (tool.toolkit.slug) {
+ lines.push(`${bold('Toolkit:')} ${tool.toolkit.name} (${tool.toolkit.slug})`);
+ }
+
+ lines.push('');
+ lines.push(gray('------------------------------'));
+ lines.push(bold('Data Parameters:'));
+ lines.push(formatSchemaPropertiesDetailed(tool.input_parameters as Record<string, unknown>));
+ return lines.join('\n');
+}
diff --git a/ts/packages/cli/src/effects/app-config.ts b/ts/packages/cli/src/effects/app-config.ts
index 080a041ca..2137dcef9 100644
--- a/ts/packages/cli/src/effects/app-config.ts
+++ b/ts/packages/cli/src/effects/app-config.ts
@@ -2,7 +2,7 @@ import { Config, LogLevel, Option } from 'effect';
import * as constants from 'src/constants';
type APP_CONFIG = Config.Config.Wrap<{
- API_KEY: Option.Option<string>;
+ USER_API_KEY: Option.Option<string>;
ENVIRONMENT: Option.Option<string>;
BASE_URL: string;
WEB_URL: string;
@@ -35,7 +35,7 @@ const environmentBasedDefault = (
*/
export const APP_CONFIG = {
// The API key for the Composio API
- API_KEY: Config.option(Config.string('API_KEY')),
+ USER_API_KEY: Config.option(Config.string('USER_API_KEY')),
// The deployment environment ("production" | "staging"). Controls URL defaults.
ENVIRONMENT: Config.option(Config.string('ENVIRONMENT')),
diff --git a/ts/packages/cli/src/services/composio-clients.ts b/ts/packages/cli/src/services/composio-clients.ts
index 04fcf0444..615848f63 100644
--- a/ts/packages/cli/src/services/composio-clients.ts
+++ b/ts/packages/cli/src/services/composio-clients.ts
@@ -1110,7 +1110,7 @@ export class ComposioClientSingleton extends Effect.Service<ComposioClientSingle
onSome: projectContext =>
projectContext.resolve.pipe(Effect.catchAll(() => Effect.succeed(Option.none()))),
});
- const defaultHeaders = Option.match(resolvedProjectContext, {
+ const projectContextHeaders = Option.match(resolvedProjectContext, {
onNone: () =>
globalOrgId && globalProjectId
? ({
@@ -1124,12 +1124,20 @@ export class ComposioClientSingleton extends Effect.Service<ComposioClientSingle
'x-project-id': keys.projectId,
}) satisfies Record<string, string>,
});
+ const defaultHeaders = {
+ ...(apiKey ? ({ 'x-user-api-key': apiKey } satisfies Record<string, string>) : {}),
+ ...(projectContextHeaders ?? {}),
+ };
+ const normalizedDefaultHeaders =
+ Object.keys(defaultHeaders).length > 0 ? defaultHeaders : undefined;
yield* Effect.logDebug('Creating raw Composio client...');
const client = new _RawComposioClient({
- apiKey,
+ // Disable @composio/client's built-in x-api-key auth header.
+ // CLI always authenticates with x-user-api-key instead.
+ apiKey: null,
baseURL,
- defaultHeaders,
+ defaultHeaders: normalizedDefaultHeaders,
});
ref = Option.some(client);
diff --git a/ts/packages/cli/src/services/config.ts b/ts/packages/cli/src/services/config.ts
index 2a893e2b9..1ded7bed2 100644
--- a/ts/packages/cli/src/services/config.ts
+++ b/ts/packages/cli/src/services/config.ts
@@ -15,10 +15,10 @@ import { APP_CONFIG } from 'src/effects/app-config';
* @example
* ```sh
* # Environment variable
- * COMPOSIO_API_KEY=your_api_key
+ * COMPOSIO_USER_API_KEY=your_user_api_key
* ```
*
- * Read via `yield* Config.string('API_KEY')`.
+ * Read via `yield* Config.string('USER_API_KEY')`.
*/
export const BaseConfigProviderLive = ConfigProvider.fromEnv();
diff --git a/ts/packages/cli/src/services/user-context.ts b/ts/packages/cli/src/services/user-context.ts
index b19ad9d3e..92dfcdd24 100644
--- a/ts/packages/cli/src/services/user-context.ts
+++ b/ts/packages/cli/src/services/user-context.ts
@@ -49,7 +49,7 @@ export const ComposioUserContextLive = Layer.effect(
ComposioUserContext,
Effect.gen(function* () {
const fs = yield* FileSystem.FileSystem;
- const apiKey = yield* APP_CONFIG['API_KEY'];
+ const apiKey = yield* APP_CONFIG['USER_API_KEY'];
const baseURL = yield* APP_CONFIG['BASE_URL'];
const webURL = yield* APP_CONFIG['WEB_URL'];
diff --git a/ts/packages/cli/test/src/commands/$default.cmd.test.ts b/ts/packages/cli/test/src/commands/$default.cmd.test.ts
index 58e0ee6af..8603c182a 100644
--- a/ts/packages/cli/test/src/commands/$default.cmd.test.ts
+++ b/ts/packages/cli/test/src/commands/$default.cmd.test.ts
@@ -46,4 +46,16 @@ describe('CLI: composio', () => {
})
);
});
+
+ layer(TestLive())(it => {
+ it.scoped("[Given] -v flag [Then] prints composio's version from package.json", () =>
+ Effect.gen(function* () {
+ const args = ['-v'];
+ yield* cli(args);
+ const lines = yield* MockConsole.getLines();
+ const output = lines.join('\n');
+ expect(output).toContain(pkg.version);
+ })
+ );
+ });
});
diff --git a/ts/packages/cli/test/src/commands/__snapshots__/$default.cmd.test.ts.snap b/ts/packages/cli/test/src/commands/__snapshots__/$default.cmd.test.ts.snap
index 00acbf65e..be48d3d2e 100644
--- a/ts/packages/cli/test/src/commands/__snapshots__/$default.cmd.test.ts.snap
+++ b/ts/packages/cli/test/src/commands/__snapshots__/$default.cmd.test.ts.snap
@@ -69,7 +69,7 @@ Environment Variables:
- tools info [<slug>] View details of a specific tool.
- - tools search [--toolkits text] [--limit integer] <query> Search tools by use case.
+ - tools search [--toolkits text] [--limit integer] <query> Semantically search tools by use case; returns best-fit tools plus recommended usage guidance.
- tools execute [(-d, --data text)] [--user-id text] <slug> Execute a tool by slug with JSON arguments.
diff --git a/ts/packages/cli/test/src/commands/auth-configs/auth-configs.create.cmd.test.ts b/ts/packages/cli/test/src/commands/auth-configs/auth-configs.create.cmd.test.ts
index c637ee3c6..dd6def446 100644
--- a/ts/packages/cli/test/src/commands/auth-configs/auth-configs.create.cmd.test.ts
+++ b/ts/packages/cli/test/src/commands/auth-configs/auth-configs.create.cmd.test.ts
@@ -5,7 +5,7 @@ import { cli, TestLive, MockConsole } from 'test/__utils__';
import type { TestLiveInput } from 'test/__utils__/services/test-layer';
const testConfigProvider = ConfigProvider.fromMap(
- new Map([['COMPOSIO_API_KEY', 'test_api_key']])
+ new Map([['COMPOSIO_USER_API_KEY', 'test_api_key']])
).pipe(extendConfigProvider);
describe('CLI: composio auth-configs create', () => {
diff --git a/ts/packages/cli/test/src/commands/auth-configs/auth-configs.delete.cmd.test.ts b/ts/packages/cli/test/src/commands/auth-configs/auth-configs.delete.cmd.test.ts
index 0492ec037..a35755316 100644
--- a/ts/packages/cli/test/src/commands/auth-configs/auth-configs.delete.cmd.test.ts
+++ b/ts/packages/cli/test/src/commands/auth-configs/auth-configs.delete.cmd.test.ts
@@ -26,7 +26,7 @@ const authConfigsData = {
} satisfies TestLiveInput['authConfigsData'];
const testConfigProvider = ConfigProvider.fromMap(
- new Map([['COMPOSIO_API_KEY', 'test_api_key']])
+ new Map([['COMPOSIO_USER_API_KEY', 'test_api_key']])
).pipe(extendConfigProvider);
describe('CLI: composio auth-configs delete', () => {
diff --git a/ts/packages/cli/test/src/commands/auth-configs/auth-configs.info.cmd.test.ts b/ts/packages/cli/test/src/commands/auth-configs/auth-configs.info.cmd.test.ts
index 3543a6ec0..6bee0c640 100644
--- a/ts/packages/cli/test/src/commands/auth-configs/auth-configs.info.cmd.test.ts
+++ b/ts/packages/cli/test/src/commands/auth-configs/auth-configs.info.cmd.test.ts
@@ -26,7 +26,7 @@ const authConfigsData = {
} satisfies TestLiveInput['authConfigsData'];
const testConfigProvider = ConfigProvider.fromMap(
- new Map([['COMPOSIO_API_KEY', 'test_api_key']])
+ new Map([['COMPOSIO_USER_API_KEY', 'test_api_key']])
).pipe(extendConfigProvider);
describe('CLI: composio auth-configs info', () => {
diff --git a/ts/packages/cli/test/src/commands/auth-configs/auth-configs.list.cmd.test.ts b/ts/packages/cli/test/src/commands/auth-configs/auth-configs.list.cmd.test.ts
index 24e01e6df..a6102c562 100644
--- a/ts/packages/cli/test/src/commands/auth-configs/auth-configs.list.cmd.test.ts
+++ b/ts/packages/cli/test/src/commands/auth-configs/auth-configs.list.cmd.test.ts
@@ -52,7 +52,7 @@ const authConfigsData = {
} satisfies TestLiveInput['authConfigsData'];
const testConfigProvider = ConfigProvider.fromMap(
- new Map([['COMPOSIO_API_KEY', 'test_api_key']])
+ new Map([['COMPOSIO_USER_API_KEY', 'test_api_key']])
).pipe(extendConfigProvider);
describe('CLI: composio auth-configs list', () => {
diff --git a/ts/packages/cli/test/src/commands/connected-accounts/connected-accounts.delete.cmd.test.ts b/ts/packages/cli/test/src/commands/connected-accounts/connected-accounts.delete.cmd.test.ts
index 55e067454..a456e16ae 100644
--- a/ts/packages/cli/test/src/commands/connected-accounts/connected-accounts.delete.cmd.test.ts
+++ b/ts/packages/cli/test/src/commands/connected-accounts/connected-accounts.delete.cmd.test.ts
@@ -30,7 +30,7 @@ const connectedAccountsData = {
} satisfies TestLiveInput['connectedAccountsData'];
const testConfigProvider = ConfigProvider.fromMap(
- new Map([['COMPOSIO_API_KEY', 'test_api_key']])
+ new Map([['COMPOSIO_USER_API_KEY', 'test_api_key']])
).pipe(extendConfigProvider);
describe('CLI: composio connected-accounts delete', () => {
diff --git a/ts/packages/cli/test/src/commands/connected-accounts/connected-accounts.info.cmd.test.ts b/ts/packages/cli/test/src/commands/connected-accounts/connected-accounts.info.cmd.test.ts
index 577eb513d..562d7ea8e 100644
--- a/ts/packages/cli/test/src/commands/connected-accounts/connected-accounts.info.cmd.test.ts
+++ b/ts/packages/cli/test/src/commands/connected-accounts/connected-accounts.info.cmd.test.ts
@@ -30,7 +30,7 @@ const connectedAccountsData = {
} satisfies TestLiveInput['connectedAccountsData'];
const testConfigProvider = ConfigProvider.fromMap(
- new Map([['COMPOSIO_API_KEY', 'test_api_key']])
+ new Map([['COMPOSIO_USER_API_KEY', 'test_api_key']])
).pipe(extendConfigProvider);
describe('CLI: composio connected-accounts info', () => {
diff --git a/ts/packages/cli/test/src/commands/connected-accounts/connected-accounts.link.cmd.test.ts b/ts/packages/cli/test/src/commands/connected-accounts/connected-accounts.link.cmd.test.ts
index bc7e4627c..c0e1815cd 100644
--- a/ts/packages/cli/test/src/commands/connected-accounts/connected-accounts.link.cmd.test.ts
+++ b/ts/packages/cli/test/src/commands/connected-accounts/connected-accounts.link.cmd.test.ts
@@ -30,7 +30,7 @@ const connectedAccountsData = {
} satisfies TestLiveInput['connectedAccountsData'];
const testConfigProvider = ConfigProvider.fromMap(
- new Map([['COMPOSIO_API_KEY', 'test_api_key']])
+ new Map([['COMPOSIO_USER_API_KEY', 'test_api_key']])
).pipe(extendConfigProvider);
describe('CLI: composio connected-accounts link', () => {
diff --git a/ts/packages/cli/test/src/commands/connected-accounts/connected-accounts.list.cmd.test.ts b/ts/packages/cli/test/src/commands/connected-accounts/connected-accounts.list.cmd.test.ts
index 1d33ff955..35ec3f98c 100644
--- a/ts/packages/cli/test/src/commands/connected-accounts/connected-accounts.list.cmd.test.ts
+++ b/ts/packages/cli/test/src/commands/connected-accounts/connected-accounts.list.cmd.test.ts
@@ -64,7 +64,7 @@ const connectedAccountsData = {
} satisfies TestLiveInput['connectedAccountsData'];
const testConfigProvider = ConfigProvider.fromMap(
- new Map([['COMPOSIO_API_KEY', 'test_api_key']])
+ new Map([['COMPOSIO_USER_API_KEY', 'test_api_key']])
).pipe(extendConfigProvider);
describe('CLI: composio connected-accounts list', () => {
diff --git a/ts/packages/cli/test/src/commands/connected-accounts/connected-accounts.whoami.cmd.test.ts b/ts/packages/cli/test/src/commands/connected-accounts/connected-accounts.whoami.cmd.test.ts
index d9f6beb74..b9e24ec82 100644
--- a/ts/packages/cli/test/src/commands/connected-accounts/connected-accounts.whoami.cmd.test.ts
+++ b/ts/packages/cli/test/src/commands/connected-accounts/connected-accounts.whoami.cmd.test.ts
@@ -47,7 +47,7 @@ const connectedAccountsData = {
} satisfies TestLiveInput['connectedAccountsData'];
const testConfigProvider = ConfigProvider.fromMap(
- new Map([['COMPOSIO_API_KEY', 'test_api_key']])
+ new Map([['COMPOSIO_USER_API_KEY', 'test_api_key']])
).pipe(extendConfigProvider);
describe('CLI: composio connected-accounts whoami', () => {
diff --git a/ts/packages/cli/test/src/commands/logout.cmd.test.ts b/ts/packages/cli/test/src/commands/logout.cmd.test.ts
index 0b1e84731..545f5c2f8 100644
--- a/ts/packages/cli/test/src/commands/logout.cmd.test.ts
+++ b/ts/packages/cli/test/src/commands/logout.cmd.test.ts
@@ -41,7 +41,7 @@ describe('CLI: composio logout', () => {
describe('[When] logged in', () => {
const testConfigProvider = ConfigProvider.fromMap(
- new Map([['COMPOSIO_API_KEY', 'api_key_already_logged_in']])
+ new Map([['COMPOSIO_USER_API_KEY', 'api_key_already_logged_in']])
).pipe(extendConfigProvider);
layer(TestLive({ baseConfigProvider: testConfigProvider }))(it => {
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 2c8f65cd8..72373e5a3 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
@@ -126,7 +126,7 @@ const toolkitsData = {
} satisfies TestLiveInput['toolkitsData'];
const testConfigProvider = ConfigProvider.fromMap(
- new Map([['COMPOSIO_API_KEY', 'test_api_key']])
+ new Map([['COMPOSIO_USER_API_KEY', 'test_api_key']])
).pipe(extendConfigProvider);
describe('CLI: composio toolkits info', () => {
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 20a821745..b4e62eaec 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
@@ -64,7 +64,7 @@ const toolkitsData = {
} satisfies TestLiveInput['toolkitsData'];
const testConfigProvider = ConfigProvider.fromMap(
- new Map([['COMPOSIO_API_KEY', 'test_api_key']])
+ new Map([['COMPOSIO_USER_API_KEY', 'test_api_key']])
).pipe(extendConfigProvider);
describe('CLI: composio toolkits list', () => {
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 b9667963d..78a91b7cb 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
@@ -64,7 +64,7 @@ const toolkitsData = {
} satisfies TestLiveInput['toolkitsData'];
const testConfigProvider = ConfigProvider.fromMap(
- new Map([['COMPOSIO_API_KEY', 'test_api_key']])
+ new Map([['COMPOSIO_USER_API_KEY', 'test_api_key']])
).pipe(extendConfigProvider);
describe('CLI: composio toolkits search', () => {
diff --git a/ts/packages/cli/test/src/commands/tools/tools.execute.cmd.test.ts b/ts/packages/cli/test/src/commands/tools/tools.execute.cmd.test.ts
index 0a364f77c..82508251b 100644
--- a/ts/packages/cli/test/src/commands/tools/tools.execute.cmd.test.ts
+++ b/ts/packages/cli/test/src/commands/tools/tools.execute.cmd.test.ts
@@ -5,9 +5,11 @@ import { extendConfigProvider } from 'src/services/config';
import { ActionExecuteConnectedAccountNotFoundError } from 'src/services/tools-executor';
import * as redactModule from 'src/ui/redact';
import { cli, TestLive, MockConsole } from 'test/__utils__';
+import type { TestLiveInput } from 'test/__utils__/services/test-layer';
+import { showToolsExecuteInputHelp } from 'src/commands/tools/commands/tools.execute.cmd';
const testConfigProvider = ConfigProvider.fromMap(
- new Map([['COMPOSIO_API_KEY', 'test_api_key']])
+ new Map([['COMPOSIO_USER_API_KEY', 'test_api_key']])
).pipe(extendConfigProvider);
const parseLastJson = (lines: ReadonlyArray<string>) => {
@@ -69,6 +71,96 @@ describe('CLI: composio tools execute', () => {
);
});
+ layer(
+ TestLive({
+ baseConfigProvider: testConfigProvider,
+ toolkitsData: {
+ tools: [
+ {
+ name: 'Send Email',
+ slug: 'GMAIL_SEND_EMAIL',
+ description: 'Send an email',
+ tags: ['email'],
+ available_versions: ['20260101_00'],
+ input_parameters: {
+ type: 'object',
+ required: ['recipient'],
+ properties: {
+ recipient: { type: 'string', description: 'Recipient email' },
+ subject: { type: 'string', description: 'Subject line' },
+ },
+ },
+ output_parameters: {
+ type: 'object',
+ properties: {
+ message_id: { type: 'string' },
+ },
+ },
+ },
+ ],
+ } satisfies TestLiveInput['toolkitsData'],
+ stdin: { isTTY: true, data: '' },
+ })
+ )('[Given] execute-help helper [Then] prints input parameters only', it => {
+ it.scoped('prints execute input schema help for the provided slug', () =>
+ Effect.gen(function* () {
+ yield* showToolsExecuteInputHelp('GMAIL_SEND_EMAIL');
+ const lines = yield* MockConsole.getLines({ stripAnsi: true });
+ const output = lines.join('\n');
+
+ expect(output).toContain('Data Parameters:');
+ expect(output).toContain('recipient');
+ expect(output).toContain('subject');
+ expect(output).not.toContain('Output Parameters:');
+ })
+ );
+ });
+
+ layer(
+ TestLive({
+ baseConfigProvider: testConfigProvider,
+ toolkitsData: {
+ tools: [
+ {
+ name: 'Send Email',
+ slug: 'GMAIL_SEND_EMAIL',
+ description: 'Send an email',
+ tags: ['email'],
+ available_versions: ['20260101_00'],
+ input_parameters: {
+ type: 'object',
+ required: ['recipient'],
+ properties: {
+ recipient: { type: 'string', description: 'Recipient email' },
+ subject: { type: 'string', description: 'Subject line' },
+ },
+ },
+ output_parameters: {
+ type: 'object',
+ properties: {
+ message_id: { type: 'string' },
+ },
+ },
+ },
+ ],
+ } satisfies TestLiveInput['toolkitsData'],
+ stdin: { isTTY: true, data: '' },
+ })
+ )('[Given] execute-help with options before slug [Then] resolves correct slug', it => {
+ it.scoped('does not treat --user-id value as slug', () =>
+ Effect.gen(function* () {
+ yield* cli(['tools', 'execute', '--user-id', 'default', 'GMAIL_SEND_EMAIL', '--help']);
+ const lines = yield* MockConsole.getLines({ stripAnsi: true });
+ const output = lines.join('\n');
+
+ expect(output).toContain('Slug: GMAIL_SEND_EMAIL');
+ expect(output).toContain('Data Parameters:');
+ expect(output).toContain('recipient');
+ expect(output).not.toContain('default');
+ })
+ );
+ });
+
layer(
TestLive({
baseConfigProvider: testConfigProvider,
diff --git a/ts/packages/cli/test/src/commands/tools/tools.info.cmd.test.ts b/ts/packages/cli/test/src/commands/tools/tools.info.cmd.test.ts
index ce39fbe12..1f3481d1c 100644
--- a/ts/packages/cli/test/src/commands/tools/tools.info.cmd.test.ts
+++ b/ts/packages/cli/test/src/commands/tools/tools.info.cmd.test.ts
@@ -46,7 +46,7 @@ const toolkitsData = {
} satisfies TestLiveInput['toolkitsData'];
const testConfigProvider = ConfigProvider.fromMap(
- new Map([['COMPOSIO_API_KEY', 'test_api_key']])
+ new Map([['COMPOSIO_USER_API_KEY', 'test_api_key']])
).pipe(extendConfigProvider);
describe('CLI: composio tools info', () => {
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 6f10c88b3..fea256a4b 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
@@ -52,7 +52,7 @@ const toolkitsData = {
} satisfies TestLiveInput['toolkitsData'];
const testConfigProvider = ConfigProvider.fromMap(
- new Map([['COMPOSIO_API_KEY', 'test_api_key']])
+ new Map([['COMPOSIO_USER_API_KEY', 'test_api_key']])
).pipe(extendConfigProvider);
describe('CLI: composio tools list', () => {
diff --git a/ts/packages/cli/test/src/commands/tools/tools.search.cmd.test.ts b/ts/packages/cli/test/src/commands/tools/tools.search.cmd.test.ts
index 9720f0530..15507eb7c 100644
--- a/ts/packages/cli/test/src/commands/tools/tools.search.cmd.test.ts
+++ b/ts/packages/cli/test/src/commands/tools/tools.search.cmd.test.ts
@@ -44,7 +44,7 @@ const toolkitsData = {
} satisfies TestLiveInput['toolkitsData'];
const testConfigProvider = ConfigProvider.fromMap(
- new Map([['COMPOSIO_API_KEY', 'test_api_key']])
+ new Map([['COMPOSIO_USER_API_KEY', 'test_api_key']])
).pipe(extendConfigProvider);
describe('CLI: composio tools search', () => {
diff --git a/ts/packages/cli/test/src/commands/triggers/triggers.info.cmd.test.ts b/ts/packages/cli/test/src/commands/triggers/triggers.info.cmd.test.ts
index 8ff3d9b7c..d38d0146f 100644
--- a/ts/packages/cli/test/src/commands/triggers/triggers.info.cmd.test.ts
+++ b/ts/packages/cli/test/src/commands/triggers/triggers.info.cmd.test.ts
@@ -51,7 +51,7 @@ const toolkitsData = {
} satisfies TestLiveInput['toolkitsData'];
const testConfigProvider = ConfigProvider.fromMap(
- new Map([['COMPOSIO_API_KEY', 'test_api_key']])
+ new Map([['COMPOSIO_USER_API_KEY', 'test_api_key']])
).pipe(extendConfigProvider);
describe('CLI: composio triggers info', () => {
diff --git a/ts/packages/cli/test/src/commands/triggers/triggers.list.cmd.test.ts b/ts/packages/cli/test/src/commands/triggers/triggers.list.cmd.test.ts
index 3a926f7e6..7d187a4ed 100644
--- a/ts/packages/cli/test/src/commands/triggers/triggers.list.cmd.test.ts
+++ b/ts/packages/cli/test/src/commands/triggers/triggers.list.cmd.test.ts
@@ -43,7 +43,7 @@ const toolkitsData = {
} satisfies TestLiveInput['toolkitsData'];
const testConfigProvider = ConfigProvider.fromMap(
- new Map([['COMPOSIO_API_KEY', 'test_api_key']])
+ new Map([['COMPOSIO_USER_API_KEY', 'test_api_key']])
).pipe(extendConfigProvider);
describe('CLI: composio triggers list', () => {
diff --git a/ts/packages/cli/test/src/commands/triggers/triggers.listen.cmd.test.ts b/ts/packages/cli/test/src/commands/triggers/triggers.listen.cmd.test.ts
index c6b982812..f02f4678c 100644
--- a/ts/packages/cli/test/src/commands/triggers/triggers.listen.cmd.test.ts
+++ b/ts/packages/cli/test/src/commands/triggers/triggers.listen.cmd.test.ts
@@ -6,7 +6,7 @@ import { createServer, type IncomingMessage } from 'node:http';
import { Composio } from '@composio/core';
const testConfigProvider = ConfigProvider.fromMap(
- new Map([['COMPOSIO_API_KEY', 'test_api_key']])
+ new Map([['COMPOSIO_USER_API_KEY', 'test_api_key']])
).pipe(extendConfigProvider);
const mockV3TriggerEvent = {
diff --git a/ts/packages/cli/test/src/commands/triggers/triggers.mutations.cmd.test.ts b/ts/packages/cli/test/src/commands/triggers/triggers.mutations.cmd.test.ts
index 3e181203f..91deec13a 100644
--- a/ts/packages/cli/test/src/commands/triggers/triggers.mutations.cmd.test.ts
+++ b/ts/packages/cli/test/src/commands/triggers/triggers.mutations.cmd.test.ts
@@ -4,7 +4,7 @@ import { extendConfigProvider } from 'src/services/config';
import { cli, MockConsole, TestLive } from 'test/__utils__';
const testConfigProvider = ConfigProvider.fromMap(
- new Map([['COMPOSIO_API_KEY', 'test_api_key']])
+ new Map([['COMPOSIO_USER_API_KEY', 'test_api_key']])
).pipe(extendConfigProvider);
describe('CLI: composio triggers mutations', () => {
diff --git a/ts/packages/cli/test/src/commands/triggers/triggers.status.cmd.test.ts b/ts/packages/cli/test/src/commands/triggers/triggers.status.cmd.test.ts
index 3cbac4de6..1fdc007fb 100644
--- a/ts/packages/cli/test/src/commands/triggers/triggers.status.cmd.test.ts
+++ b/ts/packages/cli/test/src/commands/triggers/triggers.status.cmd.test.ts
@@ -52,7 +52,7 @@ const triggersData = {
} satisfies TestLiveInput['triggersData'];
const testConfigProvider = ConfigProvider.fromMap(
- new Map([['COMPOSIO_API_KEY', 'test_api_key']])
+ new Map([['COMPOSIO_USER_API_KEY', 'test_api_key']])
).pipe(extendConfigProvider);
describe('CLI: composio triggers status', () => {
diff --git a/ts/packages/cli/test/src/commands/whoami.cmd.test.ts b/ts/packages/cli/test/src/commands/whoami.cmd.test.ts
index b5e91a699..a0519ac61 100644
--- a/ts/packages/cli/test/src/commands/whoami.cmd.test.ts
+++ b/ts/packages/cli/test/src/commands/whoami.cmd.test.ts
@@ -5,11 +5,11 @@ import { cli, TestLive, MockConsole } from 'test/__utils__';
describe('CLI: composio whoami', () => {
const testConfigProvider = ConfigProvider.fromMap(
- new Map([['COMPOSIO_API_KEY', 'api_key_from_test_config_provider']])
+ new Map([['COMPOSIO_USER_API_KEY', 'api_key_from_test_config_provider']])
).pipe(extendConfigProvider);
layer(TestLive({ baseConfigProvider: testConfigProvider }))('with config override', it => {
- it.scoped('[Given] `COMPOSIO_API_KEY` [Then] prints it to stdout', () =>
+ it.scoped('[Given] `COMPOSIO_USER_API_KEY` [Then] prints it to stdout', () =>
Effect.gen(function* () {
const args = ['whoami'];
yield* cli(args);
diff --git a/ts/packages/cli/test/src/services/composio-client-singleton.test.ts b/ts/packages/cli/test/src/services/composio-client-singleton.test.ts
new file mode 100644
index 000000000..85a2c83a0
--- /dev/null
+++ b/ts/packages/cli/test/src/services/composio-client-singleton.test.ts
@@ -0,0 +1,91 @@
+import { afterEach, describe, expect, it, vi } from 'vitest';
+import { BunFileSystem } from '@effect/platform-bun';
+import { ConfigProvider, Effect, Layer } from 'effect';
+import * as tempy from 'tempy';
+import { ComposioClientSingleton } from 'src/services/composio-clients';
+import { defaultNodeOs, NodeOs } from 'src/services/node-os';
+import { extendConfigProvider } from 'src/services/config';
+
+const withConfigLayer = (map: Map<string, string>, homedir: string) =>
+ Layer.mergeAll(
+ BunFileSystem.layer,
+ Layer.succeed(NodeOs, defaultNodeOs({ homedir })),
+ Layer.setConfigProvider(extendConfigProvider(ConfigProvider.fromMap(map)))
+ );
+
+const okResponse = () =>
+ new Response(JSON.stringify({ data: [] }), {
+ status: 200,
+ headers: { 'Content-Type': 'application/json' },
+ });
+
+describe('ComposioClientSingleton headers', () => {
+ afterEach(() => {
+ vi.restoreAllMocks();
+ });
+
+ it('uses x-user-api-key and never x-api-key', async () => {
+ const fetchSpy = vi.spyOn(globalThis, 'fetch').mockResolvedValue(okResponse());
+ const homedir = tempy.temporaryDirectory();
+ const configMap = new Map([
+ ['COMPOSIO_USER_API_KEY', 'uak_from_user_env'],
+ ['COMPOSIO_API_KEY', 'ak_should_be_ignored'],
+ ['COMPOSIO_BASE_URL', 'https://backend.composio.dev'],
+ ]);
+
+ const program = Effect.gen(function* () {
+ const client = yield* ComposioClientSingleton.get();
+ yield* Effect.promise(() =>
+ client.tools
+ .list({ limit: 1, toolkit_versions: 'latest' })
+ .then(() => undefined)
+ .catch(() => undefined)
+ );
+ }).pipe(
+ Effect.provide(
+ Layer.provide(ComposioClientSingleton.Default, withConfigLayer(configMap, homedir))
+ )
+ );
+
+ await Effect.runPromise(program);
+
+ expect(fetchSpy).toHaveBeenCalledOnce();
+ const [, init] = fetchSpy.mock.calls[0]!;
+ const headers = new Headers((init as RequestInit).headers);
+
+ expect(headers.get('x-user-api-key')).toBe('uak_from_user_env');
+ expect(headers.has('x-api-key')).toBe(false);
+ });
+
+ it('does not read COMPOSIO_API_KEY for user auth', async () => {
+ const fetchSpy = vi.spyOn(globalThis, 'fetch').mockResolvedValue(okResponse());
+ const homedir = tempy.temporaryDirectory();
+ const configMap = new Map([
+ ['COMPOSIO_API_KEY', 'ak_only'],
+ ['COMPOSIO_BASE_URL', 'https://backend.composio.dev'],
+ ]);
+
+ const program = Effect.gen(function* () {
+ const client = yield* ComposioClientSingleton.get();
+ yield* Effect.promise(() =>
+ client.tools
+ .list({ limit: 1, toolkit_versions: 'latest' })
+ .then(() => undefined)
+ .catch(() => undefined)
+ );
+ }).pipe(
+ Effect.provide(
+ Layer.provide(ComposioClientSingleton.Default, withConfigLayer(configMap, homedir))
+ )
+ );
+
+ await Effect.runPromise(program);
+
+ expect(fetchSpy).toHaveBeenCalledOnce();
+ const [, init] = fetchSpy.mock.calls[0]!;
+ const headers = new Headers((init as RequestInit).headers);
+
+ expect(headers.get('x-user-api-key')).toBeNull();
+ expect(headers.has('x-api-key')).toBe(false);
+ });
+});
diff --git a/ts/packages/cli/test/src/services/config.test.ts b/ts/packages/cli/test/src/services/config.test.ts
index 271d2cd93..5575ee968 100644
--- a/ts/packages/cli/test/src/services/config.test.ts
+++ b/ts/packages/cli/test/src/services/config.test.ts
@@ -23,7 +23,7 @@ describe('Config', () => {
assertEquals(
actual,
Data.struct({
- API_KEY: Option.none(),
+ USER_API_KEY: Option.none(),
ENVIRONMENT: Option.none(),
BASE_URL: 'https://backend.composio.dev',
CACHE_DIR: Option.none(),
@@ -37,7 +37,7 @@ describe('Config', () => {
it('[When] map entries are set without `COMPOSIO_` prefix', () => {
const map = new Map([
- ['API_KEY', 'api_key'],
+ ['USER_API_KEY', 'api_key'],
['BASE_URL', 'https://test.localhost'],
['CACHE_DIR', '~/.composio'],
['LOG_LEVEL', 'info'],
@@ -50,7 +50,7 @@ describe('Config', () => {
assertEquals(
actual,
Data.struct({
- API_KEY: Option.none(),
+ USER_API_KEY: Option.none(),
ENVIRONMENT: Option.none(),
BASE_URL: 'https://backend.composio.dev',
CACHE_DIR: Option.none(),
@@ -64,7 +64,7 @@ describe('Config', () => {
it('[When] env variables are set with `COMPOSIO_` prefix', () => {
const map = new Map([
- ['COMPOSIO_API_KEY', 'api_key'],
+ ['COMPOSIO_USER_API_KEY', 'api_key'],
['COMPOSIO_BASE_URL', 'https://test.localhost'],
['COMPOSIO_WEB_URL', 'https://test.localhost'],
['COMPOSIO_CACHE_DIR', '~/.composio'],
@@ -78,7 +78,7 @@ describe('Config', () => {
assertEquals(
actual,
Data.struct({
- API_KEY: Option.some('api_key'),
+ USER_API_KEY: Option.some('api_key'),
ENVIRONMENT: Option.none(),
BASE_URL: 'https://test.localhost',
WEB_URL: 'https://test.localhost',
@@ -100,7 +100,7 @@ describe('Config', () => {
assertEquals(
actual,
Data.struct({
- API_KEY: Option.none(),
+ USER_API_KEY: Option.none(),
ENVIRONMENT: Option.some('production'),
BASE_URL: constants.DEFAULT_BASE_URL,
WEB_URL: constants.DEFAULT_WEB_URL,
@@ -122,7 +122,7 @@ describe('Config', () => {
assertEquals(
actual,
Data.struct({
- API_KEY: Option.none(),
+ USER_API_KEY: Option.none(),
ENVIRONMENT: Option.some('staging'),
BASE_URL: constants.STAGING_BASE_URL,
WEB_URL: constants.STAGING_WEB_URL,
@@ -147,7 +147,7 @@ describe('Config', () => {
assertEquals(
actual,
Data.struct({
- API_KEY: Option.none(),
+ USER_API_KEY: Option.none(),
ENVIRONMENT: Option.some('staging'),
BASE_URL: 'https://custom-backend.localhost',
WEB_URL: constants.STAGING_WEB_URL,
@@ -172,7 +172,7 @@ describe('Config', () => {
assertEquals(
actual,
Data.struct({
- API_KEY: Option.none(),
+ USER_API_KEY: Option.none(),
ENVIRONMENT: Option.some('staging'),
BASE_URL: constants.STAGING_BASE_URL,
WEB_URL: 'https://custom-web.localhost',
@@ -194,7 +194,7 @@ describe('Config', () => {
assertEquals(
actual,
Data.struct({
- API_KEY: Option.none(),
+ USER_API_KEY: Option.none(),
ENVIRONMENT: Option.some('unknown'),
BASE_URL: constants.DEFAULT_BASE_URL,
WEB_URL: constants.DEFAULT_WEB_URL,
@@ -304,7 +304,7 @@ describe('Config', () => {
assertEquals(
actual,
Data.struct({
- API_KEY: Option.none(),
+ USER_API_KEY: Option.none(),
ENVIRONMENT: Option.none(),
BASE_URL: 'https://backend.composio.dev',
WEB_URL: 'https://platform.composio.dev',
@@ -317,7 +317,7 @@ describe('Config', () => {
});
it('[When] env variables are set without `COMPOSIO_` prefix', () => {
- vi.stubEnv('API_KEY', 'api_key');
+ vi.stubEnv('USER_API_KEY', 'api_key');
vi.stubEnv('BASE_URL', 'https://test.localhost');
vi.stubEnv('CACHE_DIR', '~/.composio');
vi.stubEnv('LOG_LEVEL', 'info');
@@ -329,7 +329,7 @@ describe('Config', () => {
assertEquals(
actual,
Data.struct({
- API_KEY: Option.none(),
+ USER_API_KEY: Option.none(),
ENVIRONMENT: Option.none(),
BASE_URL: 'https://backend.composio.dev',
WEB_URL: 'https://platform.composio.dev',
@@ -342,7 +342,7 @@ describe('Config', () => {
});
it('[When] env variables are set with `COMPOSIO_` prefix', () => {
- vi.stubEnv('COMPOSIO_API_KEY', 'api_key');
+ vi.stubEnv('COMPOSIO_USER_API_KEY', 'api_key');
vi.stubEnv('COMPOSIO_BASE_URL', 'https://test.localhost');
vi.stubEnv('COMPOSIO_WEB_URL', 'https://test.localhost');
vi.stubEnv('COMPOSIO_CACHE_DIR', '~/.composio');
@@ -355,7 +355,7 @@ describe('Config', () => {
assertEquals(
actual,
Data.struct({
- API_KEY: Option.some('api_key'),
+ USER_API_KEY: Option.some('api_key'),
ENVIRONMENT: Option.none(),
BASE_URL: 'https://test.localhost',
WEB_URL: 'https://test.localhost',
@@ -377,7 +377,7 @@ describe('Config', () => {
assertEquals(
actual,
Data.struct({
- API_KEY: Option.none(),
+ USER_API_KEY: Option.none(),
ENVIRONMENT: Option.some('staging'),
BASE_URL: constants.STAGING_BASE_URL,
WEB_URL: constants.STAGING_WEB_URL,
@@ -401,7 +401,7 @@ describe('Config', () => {
assertEquals(
actual,
Data.struct({
- API_KEY: Option.none(),
+ USER_API_KEY: Option.none(),
ENVIRONMENT: Option.some('staging'),
BASE_URL: 'https://custom.localhost',
WEB_URL: 'https://custom-web.localhost',
diff --git a/ts/packages/cli/test/src/services/user-context.test.ts b/ts/packages/cli/test/src/services/user-context.test.ts
index fda15e08f..15cbb82c1 100644
--- a/ts/packages/cli/test/src/services/user-context.test.ts
+++ b/ts/packages/cli/test/src/services/user-context.test.ts
@@ -47,7 +47,7 @@ describe('ComposioUserContext', () => {
it.scoped('[Then] is logged in', () => {
const cwd = tempy.temporaryDirectory();
const map = new Map([
- ['COMPOSIO_API_KEY', 'api_key'],
+ ['COMPOSIO_USER_API_KEY', 'api_key'],
['COMPOSIO_BASE_URL', 'https://test.composio.localhost'],
]) satisfies Map<string, string>;
@@ -72,6 +72,23 @@ describe('ComposioUserContext', () => {
assertEquals(ctx.isLoggedIn(), true);
}).pipe(Effect.provide(ComposioUserContextTest));
});
+
+ it.scoped('[Then] COMPOSIO_API_KEY alone does not authenticate user context', () => {
+ const cwd = tempy.temporaryDirectory();
+ const map = new Map([['COMPOSIO_API_KEY', 'legacy_api_key']]) satisfies Map<string, string>;
+
+ const NodeOsTest = Layer.succeed(NodeOs, defaultNodeOs({ homedir: cwd }));
+ const ComposioUserContextTest = Layer.provideMerge(
+ ComposioUserContextLive,
+ Layer.mergeAll(BunFileSystem.layer, NodeOsTest, withMapConfigProvider(map))
+ );
+
+ return Effect.gen(function* () {
+ const ctx = yield* ComposioUserContext;
+ assertEquals(ctx.isLoggedIn(), false);
+ assertEquals(Option.getOrUndefined(ctx.data.apiKey), undefined);
+ }).pipe(Effect.provide(ComposioUserContextTest));
+ });
});
});
@@ -120,7 +137,7 @@ describe('ComposioUserContext', () => {
describe('[When] dynamic `APP_CONFIG` is set', () => {
it.scoped('[Then] it overrides the config file', () => {
const cwd = tempy.temporaryDirectory();
- const map = new Map([['COMPOSIO_API_KEY', 'api_key']]) satisfies Map<string, string>;
+ const map = new Map([['COMPOSIO_USER_API_KEY', 'api_key']]) satisfies Map<string, string>;
const NodeOsTest = Layer.succeed(NodeOs, defaultNodeOs({ homedir: cwd }));
const ComposioUserContextTest = Layer.provideMerge(
@@ -274,10 +291,13 @@ describe('ComposioUserContext', () => {
});
});
- describe('[When] the file is corrupted but env API_KEY is set', () => {
- it('[Then] it falls back to defaults but preserves env API_KEY', () => {
+ describe('[When] the file is corrupted but env USER_API_KEY is set', () => {
+ it('[Then] it falls back to defaults but preserves env USER_API_KEY', () => {
const cwd = tempy.temporaryDirectory();
- const map = new Map([['COMPOSIO_API_KEY', 'env_api_key']]) satisfies Map<string, string>;
+ const map = new Map([
+ ['COMPOSIO_USER_API_KEY', 'env_api_key'],
+ ['COMPOSIO_API_KEY', 'legacy_api_key_should_be_ignored'],
+ ]) satisfies Map<string, string>;
const NodeOsTest = Layer.succeed(NodeOs, defaultNodeOs({ homedir: cwd }));
const ComposioUserContextTest = Layer.provideMerge(
@@ -292,7 +312,7 @@ describe('ComposioUserContext', () => {
const ctx = yield* ComposioUserContext;
- // Despite corrupted file, env API_KEY should still work
+ // Despite corrupted file, env USER_API_KEY should still work
assertEquals(ctx.isLoggedIn(), true);
assertEquals(Option.getOrUndefined(ctx.data.apiKey), 'env_api_key');
}).pipe(Effect.provide(ComposioUserContextTest));
diff --git a/turbo.jsonc b/turbo.jsonc
index 63851a6f7..08850b356 100644
--- a/turbo.jsonc
+++ b/turbo.jsonc
@@ -19,27 +19,27 @@
},
"test:e2e": {
"dependsOn": ["^build"],
- "env": ["COMPOSIO_API_KEY", "OPENAI_API_KEY"],
+ "env": ["COMPOSIO_API_KEY", "COMPOSIO_USER_API_KEY", "OPENAI_API_KEY"],
"cache": false
},
"test:e2e:node": {
"dependsOn": ["^build"],
- "env": ["COMPOSIO_API_KEY", "COMPOSIO_E2E_NODE_VERSION", "OPENAI_API_KEY"],
+ "env": ["COMPOSIO_API_KEY", "COMPOSIO_USER_API_KEY", "COMPOSIO_E2E_NODE_VERSION", "OPENAI_API_KEY"],
"cache": false
},
"test:e2e:deno": {
"dependsOn": ["^build"],
- "env": ["COMPOSIO_API_KEY", "COMPOSIO_E2E_DENO_VERSION", "OPENAI_API_KEY"],
+ "env": ["COMPOSIO_API_KEY", "COMPOSIO_USER_API_KEY", "COMPOSIO_E2E_DENO_VERSION", "OPENAI_API_KEY"],
"cache": false
},
"test:e2e:cli": {
"dependsOn": ["^build"],
- "env": ["COMPOSIO_API_KEY", "COMPOSIO_E2E_CLI_VERSION", "OPENAI_API_KEY"],
+ "env": ["COMPOSIO_API_KEY", "COMPOSIO_USER_API_KEY", "COMPOSIO_E2E_CLI_VERSION", "OPENAI_API_KEY"],
"cache": false
},
"test:e2e:cloudflare": {
"dependsOn": ["^build"],
- "env": ["COMPOSIO_API_KEY", "OPENAI_API_KEY"],
+ "env": ["COMPOSIO_API_KEY", "COMPOSIO_USER_API_KEY", "OPENAI_API_KEY"],
"cache": false
},
"install:binary": {