support pipes in cli tool.

closes #5