Files
calctext/_bmad-output/implementation-artifacts/11-2-pipe-stdin-mode.md
2026-03-16 19:54:53 -04:00

1.1 KiB

epic, story, title, status
epic story title status
11 11.2 Pipe / Stdin Mode draft

Epic 11 — CLI Tool

Goal: Command-line tool for scripting and automation, same Rust engine.

Story 11.2: Pipe / Stdin Mode

As a developer, I want to pipe input into CalcPad from other commands, So that I can integrate calculations into shell scripts and pipelines.

Acceptance Criteria:

Given the user pipes a single expression to calcpad When they run echo "100 USD in EUR" | calcpad Then the converted value is printed to stdout And the process exits with code 0

Given the user pipes multi-line input to calcpad When they run cat mysheet.cp | calcpad or pipe multiple lines via heredoc Then each line is evaluated as part of a sheet (variables carry forward between lines) And each line's result is printed on a corresponding output line

Given stdin contains a mix of expressions, comments, and blank lines When calcpad processes the input Then comments and blank lines produce empty output lines And expressions produce their computed results on the corresponding lines