Skip to content
This repository has been archived by the owner on Apr 7, 2023. It is now read-only.
/ mx Public archive

Workspace/project-oriented tmux/git personal assistant.

License

Notifications You must be signed in to change notification settings

rafi/mx

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

mx

Workspace/project-oriented tmux/git personal assistant.

Features

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

Dependencies

Install

via pip:

pip install --user rafi.mx

Usage

  mx [-h] [-c CONFIG] [-v]
          [{attach,start,stop,ls,init,clone,fetch,status}] [session]
  1. In a project, create a .mx.yml file, see config-examples for reference
  2. 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

Commands

  • start - Create a new Tmux session with pre-configured windows & panes.
  • stop - Kill the entire Tmux session of a project
  • attach - Attach to project
  • ls - List a session's windows and panes
  • init - Create a new .mx.yml project, discovering Git repos as sub-dirs
  • clone - Clones all Git repositories in project's root directory
  • fetch - Run git fetch --all --prune --tags on all git repositories
  • stats - Display git repositories' index and dir stats

Configuration

In each project you want mx's powers, create a .mx.yml file with your configuration relating to the project. For example

Config Examples

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

License

The MIT License (MIT)

Copyright (c) 2015 Rafael Bodill

About

Workspace/project-oriented tmux/git personal assistant.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published