pvolok / mprocs Goto Github PK
View Code? Open in Web Editor NEWRun multiple commands in parallel
License: MIT License
Run multiple commands in parallel
License: MIT License
When I try to run a bash alias it just can't find it. Is there a way to configure it or it has to be implemented? Could be an interesting feature.
I don't really know why but installing mprocs from Arch's repository(I'm using yay to do it) it says the version is 0.6.2-1 and when I run mprocs -V
it shows me mprocs 0.5.0
.
Hi, I just tried installing mprocs
via cargo
and got this error:
$ cargo install mprocs
Updating crates.io index
Downloaded mprocs v0.2.2
Downloaded 1 crate (22.5 KB) in 0.42s
Installing mprocs v0.2.2
Downloaded anyhow v1.0.57
Downloaded indexmap v1.8.1
Downloaded filedescriptor v0.8.2
Downloaded autocfg v1.1.0
Downloaded futures-sink v0.3.21
Downloaded arrayvec v0.5.2
Downloaded futures-executor v0.3.21
Downloaded futures-channel v0.3.21
Downloaded aho-corasick v0.7.18
Downloaded regex-syntax v0.6.26
Downloaded thiserror v1.0.31
Downloaded serial-unix v0.4.0
Downloaded socket2 v0.4.4
Downloaded serial-core v0.4.0
Downloaded time v0.3.9
Downloaded bytes v1.1.0
Downloaded itoa v1.0.2
Downloaded cfg-if v1.0.0
Downloaded clap v3.1.18
Downloaded memchr v2.5.0
Downloaded ioctl-rs v0.1.6
Downloaded triggered v0.1.2
Downloaded pin-project-lite v0.2.9
Downloaded mio v0.8.3
Downloaded serde_derive v1.0.137
Downloaded serde_json v1.0.81
Downloaded vt100 v0.15.1
Downloaded termios v0.2.2
Downloaded portable-pty v0.7.0
Downloaded rustversion v1.0.6
Downloaded smallvec v1.8.0
Downloaded lazy_static v1.4.0
Downloaded flexi_logger v0.22.3
Downloaded crossterm v0.23.2
Downloaded tui v0.18.0
Downloaded serial v0.4.0
Downloaded unicode-ident v1.0.0
Downloaded shell-words v1.1.0
Downloaded strsim v0.10.0
Downloaded unicode-width v0.1.9
Downloaded textwrap v0.15.0
Downloaded thiserror-impl v1.0.31
Downloaded serde v1.0.137
Downloaded num_cpus v1.13.1
Downloaded clap_lex v0.2.0
Downloaded signal-hook v0.3.14
Downloaded pin-utils v0.1.0
Downloaded syn v1.0.95
Downloaded scopeguard v1.1.0
Downloaded log v0.4.17
Downloaded libc v0.2.126
Downloaded termcolor v1.1.3
Downloaded vte_generate_state_changes v0.1.1
Downloaded parking_lot v0.12.0
Downloaded utf8parse v0.2.0
Downloaded unicode-segmentation v1.9.0
Downloaded slab v0.4.6
Downloaded vte v0.10.1
Downloaded tokio v1.18.2
Downloaded signal-hook-registry v1.4.0
Downloaded signal-hook-mio v0.2.3
Downloaded time-macros v0.2.4
Downloaded tokio-macros v1.7.0
Downloaded quote v1.0.18
Downloaded futures-core v0.3.21
Downloaded regex v1.5.6
Downloaded proc-macro2 v1.0.39
Downloaded once_cell v1.12.0
Downloaded lock_api v0.4.7
Downloaded futures-io v0.3.21
Downloaded hashbrown v0.11.2
Downloaded parking_lot_core v0.9.3
Downloaded cassowary v0.3.0
Downloaded atty v0.2.14
Downloaded ryu v1.0.10
Downloaded futures v0.3.21
Downloaded futures-task v0.3.21
Downloaded futures-macro v0.3.21
Downloaded os_str_bytes v6.0.1
Downloaded bitflags v1.3.2
Downloaded ansi_term v0.12.1
Downloaded num_threads v0.1.6
Downloaded glob v0.3.0
Downloaded assert_matches v1.5.0
Downloaded futures-util v0.3.21
Downloaded 85 crates (4.9 MB) in 0.29s
Compiling libc v0.2.126
Compiling proc-macro2 v1.0.39
Compiling unicode-ident v1.0.0
Compiling syn v1.0.95
Compiling autocfg v1.1.0
Compiling cfg-if v1.0.0
Compiling log v0.4.17
Compiling memchr v2.5.0
Compiling futures-core v0.3.21
Compiling serde_derive v1.0.137
error: linker `cc` not found
|
= note: No such file or directory (os error 2)
error: could not compile `log` due to previous error
warning: build failed, waiting for other jobs to finish...
error: could not compile `memchr` due to previous error
error: could not compile `syn` due to previous error
error: could not compile `libc` due to previous error
error: could not compile `futures-core` due to previous error
error: could not compile `proc-macro2` due to previous error
error: could not compile `serde_derive` due to previous error
error: failed to compile `mprocs v0.2.2`, intermediate artifacts can be found at `/tmp/cargo-installNr39Ny`
I am on Ubuntu 22.04 with Cargo 1.61.0 (a028ae4 2022-04-29)
. I just installed Rust/Cargo for this first time to install mprocs
.I have no other crates installed.
OS: Arch Linux
Version: 0.6.1 (the mprocs-bin package from the AUR)
Whenever I try to launch mprocs, I am met with an error stating:
Error: [global settings] Is a directory (os error 21)
I have confirmed that the ~/.config/mprocs/mprocs.yaml
file is indeed not mistakenly a directory nor is the file malformed in any way as in the previous release (0.6.0
) does not have an issue starting up in any way. This error also persists even when specifying the config manually with the -c
/--config
flag as well.
My config file looks like this:
procs:
lf: "lf"
newsboat: "newsboat"
htop: "htop"
nvitop: "nvitop -m compact"
proc_list_width: 2
As an aside when using 0.6.0
, the proc_list_width
key does not cause errors. If that is by design then good, but if it could help with identifying the bug that would be helpful.
Also as an aside I'd like to thank you for reading this issue in advance and for any assistance that you may give me. This application has been useful to me, thanks to the main developers and the community contributors for making such an amazing piece of software.
I see you published 0.6.4. That's great! Can you create a git tag so that downstream package managers can point at it? ๐
Thanks for adding the scroll wheel to the interface! It definitely makes it much more usable for me.
Now it would be very nice to know when an process I'm not looking at, has printed something to the terminal.
Initially I thought it should jump to that process, but that is not always what you want, perhaps better if the process name became bold, if you have not clicked into it since something was printed into that terminal.
In our development team, we use mprocs as a great lightweight alternative to docker-compose which brings its own set of problems and complexity. So thanks for mprocs, awesome tool! :)
However, we stumbled over the issue that mprocs is executing everything within sh
instead of using the current users default shell (e.g. zsh, bash). While this results in reproducibility, it also makes it more complex to set up the environment. To be very concrete, we use direnv to "configure" our development environment. direnv hooks into zsh/bash/fish by having e.g. .zshrc
executing an init hook. Because mprocs is using sh, .zshrc
, .bashrc
and the likes are never executed.
Our wish would be that mprocs would either
a) use the users standard shell (e.g. by evaluating $SHELL, not sure if that's portable enough), or
b) would have the shell configurable within mprocs.json
Hey, I have been using mprocs with my tmux workflows, and its been great. It fills out this big gap in my tmux workflow of running multiple project tasks. I would love to suggest some features based on my experience. mprocs just blends in with tmux workflows really smoothly
Flow would look like:
tmux sessions
where we can specify the target instance of mprocs
, in case if there are multiple instances running on this machine/servermprocs add "cmd" -t|--target <id, name or some identifier>
To implement above feature:
name
to an instance, so its easier to specify target instance to which we want to add/remove cmd/processA key binding to open the logs in $EDITOR would be great. This will help easily navigate, select and copy logs.
Helllo,
brew install pvolok/mprocs/mprocs
is working fine in MacOS, but on Linux, it seems that the downloaded binary is missing the x
permission:
ls -l /home/linuxbrew/.linuxbrew/Cellar/mprocs/0.3.0/bin
.r--r--r-- 492k farzadmf 29 May 17:16 ๏ mprocs
And, if I manually make it executable, I think it's somehow the MacOS executable because I get this error:
zsh: exec format error: mprocs
I see that installing on Linux through brew
is not mentioned in the README
, but usually there isn't a difference between Mac and Linux when they support installation through brew
error: failed to parse manifest at `/home/sayanarijit/Documents/GitHub/mprocs/Cargo.toml`
Caused by:
feature `strip` is required
The package requires the Cargo feature called `strip`, but that feature is not stabilized in this version of Cargo (1.58.0-nightly (40dc28175 2021-12-06)).
Consider adding `cargo-features = ["strip"]` to the top of Cargo.toml (above the [package] table) to tell Cargo you are opting in to use this unstable feature.
See https://doc.rust-lang.org/nightly/cargo/reference/unstable.html#profile-strip-option for more information about the status of this feature.
As per in the title, it would be nice if the processes did not run automatically on mprocs
's startup, but had to be run manually.
I have the following mprocs.yaml
where I try to override the keymap:
keymap_procs:
<j> : { "C-n": next-proc }
procs:
docker compose:
cmd: ["docker-compose", "up"]
autostart: false
compose down:
cmd: ["docker-compose", "down", "-v"]
autostart: false
When I invoke mprocs
, I get the following error:
โฏ mprocs
Error: [local config] missing field `c`
concurrently
has:
-n, --names List of custom names to be used in prefix template.
Example names: "main,browser,server" [string]
Allowing us to have compact names that represent our commands, very convenient when dealing with long or similar looking commands.
Can we get something like this into mprocs
?
This is a show stopper unfortunately, as I need to be able to scroll up and see previous logs.
Could we get this implemented?
Many thanks!
I discovered this program today and I love it! It's just absolutely perfect at what it tries to do.
I did notice though that mprocs seems to struggle a bit when there is a lot of output from a process. I don't notice it stuttering but I definitely see it creep up the list in top
, reaching above 80% usage (up to 100% and more in fact).
Here is one way to reproduce it.
mprocs "find /"
Another clarification. The CPU usage is only high, when I view a process with a lot of output. If I have another one selected that doesn't spit out a lot of information, then everything seems fine. Try the following and see how CPU usage changes when you select either process.
mprocs "watch date" "find /"
If I run find /
directly in my terminal (I tried alacritty
and xfce4-terminal
) then CPU usage seems to hover between 20% to 30%. Not sure if this is something that can be fixed, but I'm putting it out here just in case!
Random ramble ahead
Before you ask why am I running such useless commands: I am actually working on a latex document on Overleaf and I compile it locally by git pulling it. However, compiling latex is very verbose and spits out a ton of information rather quickly. If I didn't have to collaborate, I wouldn't use overleaf, and then I would fall back to vim with vimtex which hides all of the compilation output from me.
The nice thing with overleaf is collaboration. But when there are people working on the document, I cannot pull and push it using git because the push will be rejected (since people are modifying the document as I push it). I still prefer to compile the document locally however, so I git pull
in one terminal, and have latexmk -pvc
run continuously in another terminal. This will have latexmk automatically recompile when it detects any changes.
In other words, when I want to recompile, I simply pull the changes, and it will trigger recompilation. With mprocs
I set up a config file, so now I can very quickly get this setup up and running in a really tidy manner ๐ Essentially one process is running latexmk, the other is running git pull
which I restart when I want the new changes from overleaf.
First of all, due to the crate rename, all references to vt100
need to be replaced with mprocs_vt100
.
But even after I fixed that by adding use mprocs_vt100 as vt100;
where necessary, quite a few tests are still failing. See log.
I have multiple task, and one task should be running in another working dir.
I've been using mprocs for about 30 seconds and it's great ;)
I am using mprocs --npm
.
I think it would be nice to show what command would be run if you start a "process".
Maybe in the "terminal" pane or in a new one.
Let me know what you think.
I'd like to request a resizing of the Processes tab. Sometimes it takes much more of my terminal size than I'd like to.
Not proficient in Rust, but if you give me a guideline I could try to do that too.
Hey!
Sorry for requesting so many features, but I'm loving mprocs
๐
I would like to not have the "Help" bar showing at the bottom, so maybe an option in the global config could be introduced to not show it by default. Additionally, a keymap (such as ?
) could be set up to toggle the bar, or even better, a popup showing your keymaps.
There are two key reasons why I think this change would be helpful:
mprocs
on a split tmux
pane, the screen real state mprocs
gets is quite small, so having an additional bar for keymaps you know by heart is not good.mprocs
. This could be material for another issue, but I don't think it's an important problem: if you have made the effort to modify the default keymaps you probably remember the custom ones you configured.Thanks once again! ๐
Thanks a lot for developing such a great utility ๐
mprocs
using mprocs cmd1 cmdnN
mprocs cmd1 cmd2 cmdN
, then I will have to quit mprocs
and start it again with the new list (i.e. mproc cmd1 cmd2 cmdN
)a
and i
could be used for this, and their behaviour could be just like that seen in vim
Hello!
I'm trying to globally customise mprocs
through ~/.config/mprocs/mprocs.yaml
. I started by using the example config you have in the README:
keymap_procs: # keymap when process list is focused
<C-q>: { c: toggle-focus }
<C-a>: null # unbind key
keymap_term: # keymap when terminal is focused
reset: true
<C-q>: { c: toggle-focus }
However, this yields the following error when trying to run mprocs
:
Error: [global settings] invalid type: unit value, expected internally tagged enum AppEvent
I haven't worked with rust
before, but I think it's coming from the serde_yaml
library, triggered at src/main.rs:68
<- src/settings.rs:40
<- src/settings.rs:86
.
I try to just run mprocs "ls"
to try something. I run it on kitty, it never runs anything and it breaks the kitty instalation. I do it in alacritty... same thing.
Has this happened to anyone else?
Running on MacOs
Thanks for creating an alternative to tmux for Windows! This helps a lot when working over SSH with Windows (especially for older versions without WSL).
Sometimes SSH-connection and access to terminals get lost. In order to have access to the output from the terminal, I have to constantly search and kill these processes, and then restart them.
I would like to offer a feature for creating new sessions and connecting to them.
I suggest adding the following commands, as it is done in tmux:
# Create new session with name "test"
tmux new -s test
# List of sessions
tmux ls
# Connect to last session
tmux attach
# Connect to session with name "test"
tmux attach -t test
# Kill all sessions
tmux kill-server
I think restart should also start program if its stopped, I can't see any benefits it not doing so but it makes using mprocs bit slower if you accidentally hit wrong key
$ date
Thu May 26 00:46:39 -03 2022
$ cat /etc/redhat-release
CentOS Linux release 7.9.2009 (Core)
$ uname -r
5.14.0-70.13.1.el9_0.x86_64
$ screen --version
Screen version 4.01.00devel (GNU) 2-May-06
$ ./mprocs --version
mprocs 0.2.2
$ echo $TERM
screen
print (running: './mcprocs top' inside a GNU screen session):
https://i.imgur.com/HIoGsiR.png
Any clue?
Thank you in advance.
Hi,
It seems mprocs
uses unstable features, so it needs to be installed via cargo +nightly install mprocs
, instead of cargo install mprocs
(as mentioned in the README).
Thanks for creating mprocs
!
Hello !
I would just like to inform you that I initiated a PR to get this as a NixOS package :)
If I try to quit mprocs while processes are still running, mprocs shows no warning and just quits. I think it would be wise to show a warning though in case one of the running processes is doing something important.
Would it be possible to add custom key bindings? I'd love a modifier+left/right arrow to navigate back and forth between the list and the process if not.
This could be soundfile or terminal bell or maybe notification (not sure how that would work with WSL)
mprocs
as a minimal or lightweight multiplexerI have created the following package for Arch Linux with AUR.
If the program termusic is running in mprocs, then mprocs will panic after exit zoom mode. It seems that other programs will not make mprocs panic.
(Not sure if mprocs works well with other terminal music player or not. Termusic is the only terminal music player that can run in my Windows Ternimal.)
(zoom mode and exit zoom mode works ok while termusic is down)
(panic after exit zoom mode, while termusic is up)
Windows 11 21H2 22000.856
Windows Terminal 1.1422.82.0
0.6.3
0.7.3
Hi! I've recently added mprocs to the MPR, which is an AUR-like platform for Debian and Ubuntu based systems. It's a platform I've created, but it's seen quite a bit of adoption and growth in popularity, and I think it could be beneficial to potential users of mprocs who are on Debian/Ubuntu systems.
Would there be any interest to get it listed in the README as an installation option?
I'm trying to run a program called entangled inside my neovim directory. When I specify $XDG_CONFIG_HOME
, the entangled daemon doesn't work and isn't able to find its config file.
procs:
neovim_literate:
cwd: "$XDG_CONFIG_HOME/nvim"
env:
XDG_CONFIG_HOME: "/home/username/.config"
shell: "entangled daemon"
However, if I specify an absolute path to the neovim config directory, the entangled daemon starts without issues.
procs:
neovim_literate:
cwd: "/home/username/.config/nvim"
shell: "entangled daemon"
I'm not sure if what I'm trying to do is intended or not but I think mprocs should inherit the environment variables defined inside the terminal where it runs and YAML config keys like cwd
, shell
etc should be able to use these environment variables.
I just started experimenting with this app, and as I'm getting it setup for one of my environments, I've often wished that it were possible to make edits to the config file and reload it in an already running mprocs instance without killing any of the currently running processes.
I want to update mprocs-bin
on AUR, but the new release (v0.6.4) lacks the pre-built binaries.
Mprocs can not send "Ctrl+h" signal to the programs running in it:
("Ctrl+h" should open Help in termusic, but it does not work while termusic is running in mprocs)
(However, other signals like "Alt+h" are ok.)
And cursors in nvim does not show in correct ways:
first picture: nvim INSERT mode cursor while nvim is not running in mprocs(correct):
second picture: nvim INSERT mode cursor while nvim is running in mprocs(incorrect, the cursor at line 21):
my guicursor config:
vim.o.guicursor="n-v-c-sm:block-nCursor-blinkwait100-blinkon200-blinkoff300,i-ci-ve:ver25-iCursor,r-cr-o:hor20"
Windows 11 21H2 22000.856
Windows Terminal 1.1422.82.0
0.6.3
0.7.3
0.7.2
Right now if I have a mprocs.yaml
file and do mprocs
, it starts all the process - which is fine for most the cases.
For some of the use case, I would not like it to start any process. I would like the TUI to get open in possible a "NOT STARTED" state and I want to manually start them using the existing key bindings.
Possibly an option like --no-run
implementing such feature would be nice to have.
Also, thanks for creating mprocs
!
When running mprocs it will load the set of programs in your config file, what I'd love to see is being able to define multiple environments.
So I could do something such as
mprocs x
- which would load one set of programs
mprocs y
- which would load another set
Etc until you've created all you need
Obviously this can be done when launching mprocs by listing out mprocs with programs to launch but having this in the config would streamline the process. It can also be done by changing you current directory and just having mprocs configs floating around your file system but that seems like a bizarre way to handle it.
Hey,
so happy to report that we've now started using mprocs, after the scroll wheel update which is great. thank you!
Links are clickable which is great, but would it be possible to be able to select and copy text from the terminal, like you can otherwise? (Also change the pointer to the text icon)
When I run cargo test
I get the following error. I am happy to fix it. Is this a PR you would accept? Would you prefer I delete the examples or add portable_pty as a devDependency to vendor/Cargo.toml
?
error[E0432]: unresolved import `portable_pty`
--> vendor/pty/examples/whoami.rs:5:5
|
5 | use portable_pty::{CommandBuilder, NativePtySystem, PtySize, PtySystem};
| ^^^^^^^^^^^^ use of undeclared crate or module `portable_pty`
error[E0432]: unresolved import `portable_pty`
--> vendor/pty/examples/whoami_async.rs:3:5
|
3 | use portable_pty::{native_pty_system, CommandBuilder, PtySize};
| ^^^^^^^^^^^^ use of undeclared crate or module `portable_pty`
For more information about this error, try `rustc --explain E0432`.
error: could not compile `mprocs-pty` due to previous error
warning: build failed, waiting for other jobs to finish...
error: could not compile `mprocs-pty` due to previous error
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.