tmpin

3.0.0 • Public • Published

tmpin

Add stdin support to any CLI app that accepts file input

It pipes stdin to a temp file and spawns the chosen app with the temp file path as the first argument.

Similar to process substitution in ZSH/Bash, but cross-platform and without its limitation.

Install

$ npm install --global tmpin

Usage

$ tmpin --help

  Usage
    echo <string> | tmpin <app> [<args>]

  Example
    git diff | tmpin atom

  Note that the first argument to <app> will be set to the temp file

Tip

Create an alias in your .zshrc/.bashrc:

alias atom='tmpin atom'

# Or more specific
alias gda='git diff | tmpin atom'

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 3.0.0
    5
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 3.0.0
    5
  • 2.0.0
    2
  • 1.0.1
    2
  • 1.0.0
    2
  • 0.1.0
    1

Package Sidebar

Install

npm i tmpin

Weekly Downloads

10

Version

3.0.0

License

MIT

Unpacked Size

3.31 kB

Total Files

4

Last publish

Collaborators

  • sindresorhus