0.0.10 • Published 9 years ago

hashpipe v0.0.10

Weekly downloads
31
License
-
Repository
github
Last release
9 years ago

hashpipe

Hashpipe is an experimental JSON-based shell. Imagine that Bash was designed for manipulating web APIs instead of a filesystem.

Featuring:

  • JSON-typed input & output (strings, numbers, objects, and arrays)
  • Alternative piping constructs (like the parallel pipe || and sequential pipe |=)
  • Modular design (useing modules and aliasing commands)

Getting started

Installation

$ npm install -g hashpipe
$ hashpipe
#|

At a glance

Bash-like command pipelines

#| cat names.txt | split '\n' | match John | sort
[ 'John Adams',
  'John King',
  'John Lee',
  'John Mitchell' ]

Parallel and series pipes to map commands over arrays

#| [1, 3, 4, 12] || * 5
[ 5, 15, 20, 60 ]

#|  echo john jacob jingleheimer | split ' ' || upper
[ 'JOHN', 'JACOB', 'JINGLEHEIMER' ]

Special @ syntax for traversing JSON objects and arrays

#| ['a', 'b', 'c'] @ 0
'a'

#| {name: "George", age: 55} @ name
'George'

#| [{name: "Fred"}, {name: "Jerry"}, {name: "Tim"}] @ :name
[ 'Fred', 'Jerry', 'Tim' ]

Designed for easy interaction with JSON APIs

#| get freegeoip.net/json
{ country: 'United States',
  region: 'California',
  city: 'Mountain View',
  postal_code: '94043' }

#| {encoded: 'SGV5IHRoZXJl'} | post http://spro.webscript.io/base64
{ decoded: 'Hey there' }

Learning more

Try one of the Hashpipe walkthroughs to see it in action:

0.0.10

9 years ago

0.0.9

10 years ago

0.0.8

10 years ago

0.0.7

11 years ago

0.0.6

11 years ago

0.0.5

11 years ago

0.0.4

11 years ago

0.0.3

12 years ago

0.0.2

12 years ago

0.0.1

12 years ago