Workspace/project-oriented tmux/git personal assistant.
Working on multiple git repositories and juggling tmux sessions can be tedious.
mx
tries to help with that:
- Custom config per project
- Recurse repos to show stats and fetch git index
- Manage pre-configure tmux sessions
via pip:
pip install --user rafi.mx
mx [-h] [-c CONFIG] [-v]
[{attach,start,stop,ls,init,clone,fetch,status}] [session]
- In a project, create a
.mx.yml
file, see config-examples for reference - Run
mx
in the same directory, with one of its commands
mx
will remember yours projects, so you could reference it anywhere later.
For example:
- Display the status of all git repositories in a directory
containing
.mx.yml
:
mx status
- Start working on a project, regardless of your current dir:
mx start funyard
- See a colorful summary of git repository stats:
mx stats
start
- Create a new Tmux session with pre-configured windows & panes.stop
- Kill the entire Tmux session of a projectattach
- Attach to projectls
- List a session's windows and panesinit
- Create a new.mx.yml
project, discovering Git repos as sub-dirsclone
- Clones all Git repositories in project's root directoryfetch
- Rungit fetch --all --prune --tags
on all git repositoriesstats
- Display git repositories' index and dir stats
In each project you want mx
's powers, create a .mx.yml
file with your
configuration relating to the project. For example
name: funyard
root: /srv/code/
venv: /srv/venvs/funyard
repos:
- torvalds/linux
- vim/vim
- tmux/tmux
- facebook/react
- twbs/bootstrap
windows:
- dev: ls
- commit:
post_cmd: git status -sb && git log -1 --color=always --oneline --decorate
panes:
- cd linux
- cd vim
- cd tmux
- cd react
- cd bootstrap
- db:
layout: even-horizontal
panes:
- ipython
- pgcli:
- pgcli -U postgres -h localhost -d funyard
- box:
panes:
- eval "$(docker-machine env fun)" && docker-compose up
The MIT License (MIT)
Copyright (c) 2015 Rafael Bodill