raine / ramda-cli

:ram: A CLI tool for processing data with functional pipelines
ISC License
573 stars 12 forks source link

Interactive mode - develop and run pipelines in browser #12

Closed raine closed 5 years ago

raine commented 5 years ago

screen shot 2019-01-01 at 19 02 48

Having recently done html-table-cli, which basically creates a react app from JSON, implementing an interactive mode for ramda-cli started to seem like more than just a cool idea. I've also had feedback that it would be nice if developing pipelines was easier.

The key point in creating interactive mode was to complement the command line, not to replace it. The interactive mode allows incrementally building pipelines with shorter feedback cycle. Input still comes from stdin, and output goes to stdout once you close the tab.

It works quite well.

Give it a go, (and let me know if it doesn't work 😄)

Copy pasteable example

curl -Ls http://bit.ly/gist-people-json | npx ramda-cli \
  'filter (p) -> p.city is /Port/ or p.name is /^Dr\./' \
  'filter (p) -> p.email?.includes ".info"' \
  'project <[ name city mac email ]>' \
  'take 100' \
  --interactive \
  -o table --compact

or npm install -g ramda-cli@alpha and go wild with --interactive