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.

chore(ts/e2e-tests): mention CLI e2e tests in READMEs

jkomynod855ba1ac46d
diff --git a/ts/e2e-tests/README.md b/ts/e2e-tests/README.md
index 2c837a6f6..359c901de 100644
--- a/ts/e2e-tests/README.md
+++ b/ts/e2e-tests/README.md
@@ -41,7 +41,8 @@ ts/e2e-tests/
├── cf-workers-files/ # Cloudflare Workers file handling tests
└── cf-workers-tool-router-ai/ # Cloudflare Workers AI SDK tool router tests
└── cli/ # CLI runtime tests (scratch)
- └── version/ # composio version command tests
+ ├── version/ # composio version command tests
+ └── whoami/ # composio whoami command tests
```
## Running Tests
diff --git a/ts/e2e-tests/cli/README.md b/ts/e2e-tests/cli/README.md
new file mode 100644
index 000000000..83990fe0a
--- /dev/null
+++ b/ts/e2e-tests/cli/README.md
@@ -0,0 +1,31 @@
+# CLI E2E Tests
+
+End-to-end tests for the compiled `composio` CLI binary.
+
+## How It Works
+
+Each test suite runs the `composio` binary inside a scratch Debian Docker container built from `Dockerfile.cli`. The binary is compiled via `bun build --compile` during the Docker image build, producing a self-contained executable with no runtime dependencies.
+
+Tests use `runCmd` to execute shell commands in the container and assert on exit code, stdout, and stderr. When stdout is piped (e.g., `composio version > out.txt`), the CLI suppresses all decoration and writes only machine-readable data — these tests verify that contract.
+
+## Test Suites
+
+| Suite | Description | Env Vars |
+| --- | --- | --- |
+| [version](./version/) | `composio version` output and exit code | None |
+| [whoami](./whoami/) | `composio whoami` prints the API key | `COMPOSIO_API_KEY` |
+
+## Isolation Tool
+
+**Docker** with the CLI version resolved from the current monorepo build (`cli: ['current']`).
+
+## Running
+
+```bash
+# All CLI e2e tests
+pnpm test:e2e:cli
+
+# A specific suite
+cd ts/e2e-tests/cli/version && pnpm test:e2e:cli
+cd ts/e2e-tests/cli/whoami && pnpm test:e2e:cli
+```
diff --git a/ts/e2e-tests/cli/version/README.md b/ts/e2e-tests/cli/version/README.md
new file mode 100644
index 000000000..0ef8b6323
--- /dev/null
+++ b/ts/e2e-tests/cli/version/README.md
@@ -0,0 +1,35 @@
+# CLI `composio version` Test
+
+Verifies that `composio version` prints the correct version string and respects stdout piping.
+
+## Why This Exists
+
+The CLI separates decoration (stderr) from data (stdout). This suite ensures:
+
+- `composio version` exits with code 0
+- stdout contains the version from `packages/cli/package.json`
+- stderr is empty (no decoration leaks into piped output)
+- Redirecting stdout to a file captures the clean version string
+
+## What It Tests
+
+| Test | Description |
+| --- | --- |
+| Exit code | `composio version` returns 0 |
+| stdout | Output matches `package.json` version |
+| stderr | Empty when piped |
+| File redirect | `composio version > out.txt` captures the version in the file |
+
+## Requirements
+
+None. This suite does not require any environment variables.
+
+## Isolation Tool
+
+**Docker** with the CLI built from the current monorepo source.
+
+## Running
+
+```bash
+pnpm test:e2e:cli
+```
diff --git a/ts/e2e-tests/cli/whoami/README.md b/ts/e2e-tests/cli/whoami/README.md
new file mode 100644
index 000000000..9db079258
--- /dev/null
+++ b/ts/e2e-tests/cli/whoami/README.md
@@ -0,0 +1,37 @@
+# CLI `composio whoami` Test
+
+Verifies that `composio whoami` prints the authenticated API key and respects stdout piping.
+
+## Why This Exists
+
+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`
+- stderr is empty (no decoration leaks into piped output)
+- Redirecting stdout to a file captures the clean API key
+
+## What It Tests
+
+| Test | Description |
+| --- | --- |
+| Exit code | `composio whoami` returns 0 |
+| stdout | Output matches `COMPOSIO_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
+
+If `COMPOSIO_API_KEY` is not set, the suite fails fast at startup.
+
+## Isolation Tool
+
+**Docker** with the CLI built from the current monorepo source.
+
+## Running
+
+```bash
+pnpm test:e2e:cli
+```