Socket
Book a DemoInstallSign in
Socket

scrippy

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

scrippy

Run arbitrary scripts in parallel alongside pretty output from their log files

0.1.8
latest
Source
npmnpm
Version published
Maintainers
1
Created
Source

scrippy 🌈

npm version Node CI

Run arbitrary scripts in parallel alongside pretty output from their log files

$ npx scrippy slow_script 'node dummy_script' logging_script:logging_script.log
⠴ tests/fixtures/slow_script  (7.282s)
  › doing something slow....
    almost done...
✔ node tests/fixtures/dummy_script
✔ tests/fixtures/logging_script  (0.203s)

All commands succeeded.

Features

  • Run any number of arbitrary shell scripts in parallel via child processes
  • Stream live logs from each process
  • Optionally provide a separate log file to tail

Installation

You can install scrippy globally via:

npm install -g scrippy
# or
yarn global add scrippy

or locally without including -g or global.

You can also run without manual installation, via npx:

npx scrippy

Usage

Provide commands as positional arguments to run them in parallel. For example:

$ scrippy 'git gc' 'echo hi'
✔ git gc (0.804s)
✔ echo hi

All commands succeeded.

This would run the git gc and echo hi commands in parallel subprocesses and stream any stdout/stderr to the console while they run.

If we have a script that logs to a known file, we can substitute the command output for that:

$ scrippy logging_script:logging_script.log --persistent-output
✔ tests/fixtures/logging_script  (0.201s)
  › Output from tests/fixtures/logging_script.log:
    My log line, i = 5
    My log line, i = 6
    My log line, i = 7
    My log line, i = 8
    My log line, i = 9

All commands succeeded.

Options

$ scrippy --help
Options:
  --help               Show help                                       [boolean]
  --version            Show version number                             [boolean]
  --verbose            Run with verbose logging       [boolean] [default: false]
  --log-lines          Number of log lines to show at once per command
                                                           [number] [default: 5]
  --color              Whether to show colors in the terminal
                                                       [boolean] [default: true]
  --timers             Whether to show execution times for scripts
                                                       [boolean] [default: true]
  --persistent-output  Whether to persist output of log lines after command
                       success                        [boolean] [default: false]

Advanced

There's a js API exported which can be called from a wrapper script if desired, and aims to mimic the cli as closely as possible. Check the code to learn more (no documentation for this currently).

FAQs

Package last updated on 19 Jan 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.