google / google/wireit

tmux mode

Open
#163 0 comments 7 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
6.4k
Forks
128
Avg merge
4d 10h
Merged PRs (30d)
4

Description

An output mode that looks for [tmux](https://github.com/tmux/tmux) on the system, and uses it to generate tmux layouts where different script's output are displayed in different tmux windows within the terminal, automatically.

Example use cases:

- I'm running `npm test watch`. Sometimes I'm getting compiler errors, sometimes test failures, sometimes both. If the output from each of those predictably goes to a separate tmux window, it makes it much easier to focus on one or the other.

- I have a server that runs in parallel with a build pipeline in watch mode. I want to see the server logs in one window, and the build logs in another window.

- I have a really complex build pipeline with parallelism, and I want to understand what it's doing, in real time. Interleaving the stdout of parallel processes is confusing. Locking access to stdout to one process at a time means I lose some perception over exactly when a given message was sent to stdout. Using different tmux windows gives the best of both worlds.

There are some details to work out on exactly when we create a new window, and when we re-use. Naively giving each script its own window will not work for a build of any large size, because there are too many scripts. A combination of some heuristic that tries to minimize the number of windows needed to prevent multiple processes output being displayed the same time, and some hints/configuration that the user can provide, could work.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.