stdin-line-open

Read line from stdin and trigger open job if line is matched

Usage no npm install needed!

<script type="module">
  import stdinLineOpen from 'https://cdn.skypack.dev/stdin-line-open';
</script>

README

stdin-line-open

npm Build Status Coverage Status Dependency Status npm GitHub license

Read line from stdin and trigger open job if line is matched

Install

npm i -D stdin-line-open

Usage

import createStdinLineOpen from 'stdin-line-open';

// create a stdin listener
const stdinLineOpen = createStdinLineOpen({
  match: 'open',
  open: 'http://google.com'
});

// starts to listen stdin.
// input "open" and enter on CLI, then it'll
// open "http://google.com" in browser for you.
stdinLineOpen();

License

MIT © Archie Lee