effect-cli-testing

Simulate terminal input and capture console output for @effect/cli tests.

Updated Aug 23, 2026
One-click install
npx skills add https://github.com/lucas-barake/dotai --skill effect-cli-testing
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: effect-cli-testing
Source: https://github.com/lucas-barake/dotai/tree/main/canonical/skills/effect-cli-testing
Command: npx skills add https://github.com/lucas-barake/dotai --skill effect-cli-testing

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Streamlines and validates interactive CLI testing for @effect/cli by providing reusable patterns and utilities that simulate user input and verify terminal output, reducing flaky tests and manual effort.

Core Features & Use Cases

  • MockTerminal and MockConsole utilities to simulate user interactions and capture console output in tests.
  • Coverage for interactive prompts including Prompt.select, Prompt.confirm, Prompt.text, and multi-step wizard flows.
  • Clear guidance and patterns for fork-join prompt testing, input simulation, and assertion of results across CLI tests.

Quick Start

Run the test suite with bun run test to verify interactive CLI testing patterns.

Frequently Asked Questions about effect-cli-testing

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

FAQPage Schema
How do I test interactive CLI prompts with Effect?

You test interactive CLI prompts by simulating terminal input and capturing console output using MockTerminal and MockConsole utilities. This approach validates Prompt.select, Prompt.confirm, and Prompt.text interactions deterministically without manual input.

What is the best way to simulate user input in Effect CLI tests?

Simulating user input in Effect CLI tests involves providing a MockTerminal, MockConsole, and test layer setup. You drive keyboard interactions and simulate prompt responses to exercise multi-step wizard flows end-to-end.

How do I prevent flaky tests when testing multi-step CLI wizard flows?

To prevent flaky tests in multi-step CLI wizard flows, use MockTerminal and MockConsole to drive inputs and validate results. This ensures safe, deterministic test runs by replacing manual terminal interactions with automated patterns.

Can I test Prompt.confirm and Prompt.select interactions end-to-end?

Yes, you can test Prompt.confirm and Prompt.select interactions end-to-end. The testing patterns apply fork-join prompt testing to simulate user inputs and assert console outputs across various interactive CLI components.

Do I need to manually set up test layers to test Effect CLI interactions?

Yes, providing a MockTerminal, MockConsole, and test layer setup is required. These dependencies exercise prompts, simulate keyboard interactions, and capture console assertions to ensure deterministic test runs.