Query

jQuery for the command-line. Written with node, jQuery of course, and jsdom, currently supporting a small subset of jquery functionality due to some jsdom/htmlparser issues, but still plenty useful and fun :).

Installation

$ npm install query

Examples

Twitter logo alt text:

$ curl http://twitter.com | query 'a#logo img' attr alt
Twitter

Alternately, since the output is simply more html, we can achieve this same result via pipes: