Skip to content
This repository has been archived by the owner on Sep 6, 2021. It is now read-only.
/ snail-runner Public archive

[Not maintained] Snail Runner runs many commands in parallel and finally shows output for each of them

License

Notifications You must be signed in to change notification settings

karuppiah7890/snail-runner

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

48 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Snail Runner

$ npm i -g snail-runner
$ snail-runner

or

$ npx snail-runner

Snail Runner is meant to run many shell commands in parallel and then give output for each of them. A demo :

asciicast

Given a set of commands, by default it runs 5 commands in parallel at once and then moves on to the next set of commands to run in parallel. You can also set the number of commands to run in parallel using the environment variable NUMBER_OF_PARALLEL_COMMANDS 🎉

NUMBER_OF_PARALLEL_COMMANDS=10 snail-runner 'sleep 1' 'sleep 2' 'sleep 3' 'sleep 4' 'sleep 5' 'sleep 1' 'sleep 2' 'sleep 3' 'sleep 4' 'sleep 5' 'sleep 1' 'sleep 2' 'sleep 4'

And to debug many long running commands running in parallel, you can set the SNAIL_DEBUG environment variable to enable debug mode 😁

SNAIL_DEBUG=true snail-runner 'sleep 1; echo "ok"; sleep 5'

Snail runner will show the outputs of the commands in an interleaved manner with the command ID prefixed to know which command gave that output. The command ID and command mapping is also shown in debug mode in a table format. In this mode, the consolidated output is also shown at the end, for all the commands, when all of them finish running.

See the asciinema to see snail-runner in action and try it out yourself! It's just a command away 😄

About

[Not maintained] Snail Runner runs many commands in parallel and finally shows output for each of them

Resources

License

Stars

Watchers

Forks

Packages

No packages published