GithubHelp home page GithubHelp logo

rafi / mx Goto Github PK

View Code? Open in Web Editor NEW
3.0 3.0 1.0 33 KB

Workspace/project-oriented tmux/git personal assistant.

License: MIT License

Python 98.98% Makefile 1.02%

mx's Introduction

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

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.