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.
- MacOS (may work on Linux)
- Ruby
- Tmux (
which tmux || brew install tmux)
gem install muxify$ muxify help
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
muxify version # Print current version# Add a new project (do this once)
muxify add path/to/myproject
# Load the project
mux myprojectDepending on its type, this will create the following tmux windows for a project:
- Standard (applies to all projects)
- shell (performs
git fetchwhen.gitis present) - editor (invokes terminal editor, defaulting to
vimwhen$EDITORis unset) - logs (when present, truncates then tails
log/*.log)
- shell (performs
- Rails (identified by presence of
bin/rails)- db (
rails db) - console (
rails console) - server (configures puma-dev then
rails server; see code)
- db (
- NodeJS (identified by presence of
package.jsonwhen non-Rails)- console (
node)
- console (
- Elixir (identified by presence of
mix.exswhen non-Phoenix)- console (
iex -S mix) - server (
mix)
- console (
- Elixir/Phoenix (identified by presence of
deps/phoenix)- console (
iex -S mix phoenix.server) - server (
mix phoenix.server)
- console (
- Django (identified by
requirements.txtcontainingdjango)- db (
python manage.py dbshell) - console (
python manage.py shell) - server (
python manage.py runserver)
- db (
For custom configuration, add a .muxify.yml file to the top level of the project directory.
For example, to start Docker in a project, the following could be added to its .muxify.yml:
windows:
docker: docker compose upBug reports and pull requests are welcome on GitHub at https://github.com/zubin/muxify.