https://github.com/otiai10/tie
Mix multiple commands stream, keep all foreground and kill all in one Ctrl+C
https://github.com/otiai10/tie
ctrl-c kill multiple-processes sigint stderr stdout
Last synced: 2 months ago
JSON representation
Mix multiple commands stream, keep all foreground and kill all in one Ctrl+C
- Host: GitHub
- URL: https://github.com/otiai10/tie
- Owner: otiai10
- License: mit
- Created: 2017-07-31T08:02:38.000Z (almost 8 years ago)
- Default Branch: main
- Last Pushed: 2024-10-10T07:41:58.000Z (8 months ago)
- Last Synced: 2025-03-24T22:48:52.201Z (2 months ago)
- Topics: ctrl-c, kill, multiple-processes, sigint, stderr, stdout
- Language: Go
- Homepage:
- Size: 35.2 KB
- Stars: 14
- Watchers: 2
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# tie
[](https://github.com/otiai10/tie/actions/workflows/go.yml)
[](https://codecov.io/gh/otiai10/tie)
[](https://goreportcard.com/report/github.com/otiai10/tie)The opposite of `tee`, merges multiple command io stream and controls like 1 command.
```
-> command 1 stream ─┐
-> command 2 stream ─┤
└─ stdout/stderr/SIGINT to kill both
```# install
```sh
% go get -u github.com/otiai10/tie
# then just hit `tie`
```# why?
When you need to start 2 file watchers, and kill them at the same time, like this
```sh
% nohup rails server &
% nohup npm start-webpack &
# then
% pkill rails
% pkill start-webpack
# <- annoying :(
```# usage
```sh
% tie
> rails server # return key
> npm start-webpack # return key
> # return key again[0] ... # Rails log here
[1] ... # npm log here# To kill both, just Ctrl+C once!
```# examples
by interactive mode

by one-line mode

in both ways, you can kill all the commands by just 1 Ctrl+C