CLI Mock Stdin
SkillDev toolsCreate mock stdin utilities for interactive CLI testing.
Instructions available. Your AI can read the instructions. Execution depends on the setup they require.
Account requirements not reviewed. Check the skill instructions before use; ahel provides instructions and does not run this skill.
Add ahel to your AI once: Claude, ChatGPT, Cursor, Claude Code or Codex. Then ask it to use this.
Then ask your AI: use the CLI Mock Stdin skill
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
- 112
- Last commit
- Sep 2026
Advanced
- Item type
- skill
- Key
cli-mock-stdin- Source
- github.com/a5c-ai/babysitter
Related picks
setup-ts-deep-modules
Skill · mattpocock
The pick for TypeScripttypescript-pro
Skill · jeffallan
The pick for TypeScripthandsontable-playwright-e2e
Skill · handsontable
The pick for End-to-end testingmstar-e2e
Skill · btspoony
The pick for End-to-end testingteach
Skill · mattpocock
More in Dev toolsponytail
Skill · dietrichgebert
More in Dev tools
Skill · mattpocock
The pick for TypeScripttypescript-pro
Skill · jeffallan
The pick for TypeScripthandsontable-playwright-e2e
Skill · handsontable
The pick for End-to-end testingmstar-e2e
Skill · btspoony
The pick for End-to-end testingteach
Skill · mattpocock
More in Dev toolsponytail
Skill · dietrichgebert
More in Dev tools