CLI Mock Stdin

SkillDev tools

Create mock stdin utilities for interactive CLI testing.

Use CLI Mock Stdin in Claude, ChatGPT or Ahel Desktop

Free. Sign in, add CLI Mock Stdin and connect your AI. About a minute.

Also: Claude Code · Cursor · Codex

Then ask your AI: use the CLI Mock Stdin skill

Details

Instructions available. Your AI can read the instructions. Execution depends on the setup they require.

Add Ahel to your AI once: Claude, ChatGPT, Cursor, Claude Code or Codex. Then ask it to use this.

CLI Mock StdinStart free

What this skill tells your AI

The instructions your AI receives, as published by a5c-ai/babysitter in library/specializations/cli-mcp-development/skills/cli-mock-stdin/SKILL.md and read by Ahel’s review.

Create mock stdin utilities for testing.

Generated Patterns

import { Readable } from 'stream';

export function mockStdin(inputs: string[]): Readable {
  let index = 0;
  return new Readable({
    read() {
      if (index < inputs.length) {
        setTimeout(() => {
          this.push(inputs[index++] + '\n');
        }, 10);
      } else {
        this.push(null);
      }
    },
  });
}

export async function runWithStdin(
  cmd: () => Promise<void>,
  inputs: string[]
): Promise<void> {
  const originalStdin = process.stdin;
  Object.defineProperty(process, 'stdin', { value: mockStdin(inputs) });
  try {
    await cmd();
  } finally {
    Object.defineProperty(process, 'stdin', { value: originalStdin });
  }
}

Target Processes

  • cli-unit-integration-testing
  • interactive-prompt-system

Signals

GitHub stars
2k
Forks
113
Last commit
Sep 2026
Advanced
Item type
skill
Key
cli-mock-stdin
Source
github.com/a5c-ai/babysitter