Project

muxify

0.0
The project is in a healthy, maintained state
Simple tmux project config
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
 Dependencies

Development

>= 0
>= 0

Runtime

 Project Readme

Muxify

Sets up consistent tmux development environment for projects.

Why?

  • Saves time and effort switching projects.
  • Ensures consistent layout which is faster to navigate via muscle memory.
  • Avoids visual and mental overhead of maintaining numerous tabs.

Dependencies

  • MacOS (may work on Linux)
  • Ruby
  • Tmux (which tmux || brew install tmux)

Installation

$ gem install muxify

Usage

$ muxify -h

Commands:
  muxify add             # Adds tmuxinator config for current (or supplied) path
  muxify debug           # Prints tmuxinator config of current (or supplied) path to stdout
  muxify help [COMMAND]  # Describe available commands or one specific command
  muxify stop            # Kills tmux session

For example, add a project like so:

$ muxify add /path/to/my_app
$ mux my_app

Depending on its type, this will create the following tmux windows for a project:

  • Standard (applies to all projects)
    • shell (performs git fetch when .git is present)
    • editor (invokes terminal editor, defaulting to vim when $EDITOR is unset)
    • logs (when present, truncates then tails log/*.log)
  • Rails (identified by presence of bin/rails)
    • db (rails db)
    • console (rails console)
    • server (configures puma-dev then rails server; see code)
  • NodeJS (identified by presence of package.json when non-Rails)
    • console (node)
  • Elixir (identified by presence of mix.exs when non-Phoenix)
    • console (iex -S mix)
    • server (mix)
  • Elixir/Phoenix (identified by presence of deps/phoenix)
    • console (iex -S mix phoenix.server)
    • server (mix phoenix.server)
  • Django (identified by requirements.txt containing django)
    • db (python manage.py dbshell)
    • console (python manage.py shell)
    • server (python manage.py runserver)

Customising projects

To add a custom tmux window for a project:

  1. Create a file called ~/.muxifyrc.
  2. Edit it in YAML format; eg to add a tmux window to my_app project which is named server and invokes yarn dev:
my_app:
  windows:
    server: yarn dev

Thanks

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/zubin/muxify.