Weave is a TUI for running multiple long-running commands at once and "weaving together" their output.
For example, have you ever wanted to run two different dev commands at once? Like:
bun run dev # start dev server
bun run client:dev # start client bundle watcherBut you have to run them in separate terminals, tmux windows, or something? Or use & to spin them into background processes, which doesn't have great UX?
Well, now you can just do:
weave --- bun run dev --- bun run client:devThree options for installation:
- Download the binary for your platform from the latest release.
- Use
bunornpmto install it:
bun add -g @luketurner/weave- If you are using
weavein your package.json scripts, I recommend installing it as a local dependency of the package instead:
bun add --dev @luketurner/weaveIf you want to test it out without installing, use bunx/npx, e.g.
bunx @luketurner/weave --help- Runs multiple commands at once in separate processes, and interleave their output together in a TUI window.
- Outputs in the log are prefixed with a colorized number like
[0]to indicate which command they come from. - Unlimited scrollback buffer (well, until you run out of memory!)
- Scroll through logs with arrow keys or your mouse wheel.
- Filter log output to individual processes.
- Restart one or all processes.
- Save output to a file.
- Works with both keyboard-driven and mouse-driven workflow -- all buttons are clickable as well as having a keybind.
Warning
Mouse support doesn't work on Windows.
# help
weave --help
# run a single command
weave --- python -m http.server
# run multiple commands simultaneously
weave --- bun run watch --- bun run client:watch --- python -m http.serverYou don't need weave to solve this problem, it just makes things a bit friendlier and adds some extra features.
An alternative approach with tmux:
tmux \
new-session 'bun run dev' \; \
split-window -h 'bun run client:dev' \;Credit to this StackOverflow answer
See https://github.com/luketurner/weave/issues
Clone this repository, then run:
bun installCommon commands:
# run script
bun run dev
# or:
bin/weave
# compile/format
bun run compile
bun run format
# release a new version
bun run bakery version [VERSION]