cli-e2e

Write and debug Docker-based end-to-end tests for the Composio CLI binary.

30.0k|4.8k|Updated Feb 23, 2024
One-click install
npx skills add https://github.com/ComposioHQ/composio --skill cli-e2e
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: cli-e2e
Source: https://github.com/ComposioHQ/composio/tree/main/.agents/skills/cli-e2e
Command: npx skills add https://github.com/ComposioHQ/composio --skill cli-e2e

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

It guides developers in writing, modifying, and debugging Docker-based end-to-end test suites for the Composio CLI, ensuring binary invocation, fixture isolation, and output assertions follow the repository's established conventions.

Core Features & Use Cases

  • Docker Test Architecture Guidance: Explains how CLI E2E suites run the compiled standalone composio binary inside scratch Debian containers with a fresh container per command call.
  • Suite Structure Conventions: Provides the required layout for suites under ts/e2e-tests/cli/, including e2e.test.ts files and package.json manifests with the correct scripts and workspace dependencies.
  • Environment Constraints: Documents POSIX sh runtime, HOME=/tmp isolation, env-var-based auth, and non-TTY piped output rules that affect assertions.
  • Use Case: When adding a new CLI command, use this Skill to scaffold a matching E2E suite that invokes the binary in Docker and asserts its piped-mode output.

Quick Start

Read the Docker CLI E2E reference and create a new test suite under ts/e2e-tests/cli for my new CLI command.

Frequently Asked Questions about cli-e2e

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I write end-to-end tests for the Composio CLI?

Create a suite directory under ts/e2e-tests/cli/ containing e2e.test.ts and package.json, then run tests with bun test. Each command invocation executes the compiled composio binary inside a fresh scratch Debian Docker container.

How do I run the Composio CLI E2E test suites?

Run pnpm test:e2e:cli from the repository root to execute all CLI E2E suites. When iterating on a single suite, use focused Turbo filters to limit the run to that package.

Why does CLI output differ in Docker E2E tests?

Stdout inside the test containers is not a TTY, so the CLI applies piped-mode output rules instead of interactive formatting. Assertions must match the non-TTY output format rather than terminal-rendered output.

How is authentication handled in CLI Docker E2E tests?

Containers run with HOME=/tmp and no persisted state, so authentication and API credentials must come from environment variables or explicit command setup within each test. Each command call starts in a fresh container.

When should I use cli-e2e versus cli-command skills?

Use cli-e2e only for end-to-end test suites under ts/e2e-tests/cli that invoke the compiled binary in Docker. Use the cli-command skill when implementing or modifying the CLI source code itself.