bdsh: A dsh-alike for me 01 Feb 2026

I finally put enough of a bow-tie on bdsh that I can use it as a daily tool. WOO HOO! I have long wanted a dsh which did a few additional things, and now I have them. In honor of dsh's backronym ambiguity, I am not sure if bdsh is "better (distributed|dancer's) shell", "Brian's (distributed|dancer's) shell", or "BreakDancer's Shell". Regardless, I am super happy with this little tool :-) So, what does it do differently?

First, it has the idea of a consensus view for the outputs frmo each host. When running it builds and displays a consensus view of the most common line-by-line output, with drill down into where it differs. This is probably best illustrated with a demo:

cowsay demo

This demo shows running cowsay across three hosts, rendering the unified output view, and drilling down into a difference.

Second, notice it is running in tmux. This lets you switch over to the windows and see them, and critically if something there requires interaction, you can interacta common thing I use it for is bdsh :bsd -- sudo "sh -c 'freebsd-update fetch && freebsd-update install; pkg update && pkg upgrade'" which wants input on updates. You can circumvent this, but FreeBSD makes you feel guilty when you do.. If you are doing this across hundreds of hosts, not so great, but I am ususally doing it across a reasonable number, so is actually useful. I also added a heuristic to detect if it thinks a given host is waiting on input, and changing the status indactor to a little blinking keyboard:

input demo

Window 0 in tmux is the unified output rendering process. When it thinks input is desired it does the little kwyboard icon and tells you the window number, so you can jump to it quickly. That window 0 process will exit on q but the actual invocations will continue in their windows, exiting their window when they finish, and cleaning up tmux.

Finally, in these examples I list the hosts to execute on, but it can pull from a hosts file at ~/.config/bdsh/hosts, from a shell command, or script, etc. You can read about it. The format of output here is just line delimited hostnames with optional tags, in the form:

hati.brianm.dev         :bsd    :cloud
h0001.brianm.dev        :arch   :cloud
h0002.brianm.dev        :arch   :cloud

pancake.home            :bsd    :home
freki.home              :bsd    :home
badb.home               :bsd    :home
v0003.home              :arch   :home
v0004.home              :arch   :home

m0001.home              :bsd    :home
m0002.home              :bsd    :home

m0003.barn              :bsd    :barn
m0004.barn              :bsd    :barn

Where you can filter on tags, like: bdsh :bsd:home -- do_stuff which ANDs or bdsh :barn,:cloud -- do_stuff which ORs. Of course, you can combine them as well, with AND binding tighter. With no filter, everything is selected.

Currently bdsh is packaged for homebrew (brew install brianm/tools/bdsh) and arch (bdsh in AUR), but I'll probably publish a deb soon, and once I think it is stable, and if there is evidence of anyone besides myself using it, see if I can get a port/pkg merged for FreeBSD. Source, basic docs, and more docs all on github, Apache-2.0 licensed.