Giter Site home page Giter Site logo

afajl / mob Goto Github PK

View Code? Open in Web Editor NEW
14.0 1.0 3.0 28.73 MB

Console tool for remote mob programming

License: GNU General Public License v3.0

Makefile 0.74% Rust 96.03% Shell 0.44% Nix 2.79%
cli mob timer rust mob-programming-timer mob-programming

mob's Introduction

mob

Mob is a console tool to work in a remote mob (or pair) with git.

  • Handover code fast between drivers
  • Remembers order of drivers
  • Keeps track of state (working, waiting for next, stopped) to eliminate risk of conflicts and lost work
  • Use any branch as base

mob screen

Installing

Cargo

Install rust and run:

cargo install remotemob

Manually

Download the latest release and unpack it to somewhere in your PATH.

Usage

Note: It's safe to try mob! It prints all git commands it runs and if you decide that it's not for you can remove all traces.

  • mob start creates a new feature branch or syncs the branch from the previous driver.
  • mob next commits all changes to the feature branch and hands over to the next driver.
  • mob done stages all changes on the feature branch for commit on the base branch (normally main).

mob graph

Run mob for help on more commands.

FAQ

How do I remove all traces of mob from a repo?

  1. Run mob done to remove the mob branch. Either commit the changes or run git reset HEAD --hard to discard changes.
  2. Run mob clean to remove the mob-meta branch.
  3. Delete ~/.mob if you don't want to use mob anymore

Where is the configuration stored?

Configuration local to you is stored in ~/.mob. Configuration for a repository is stored in an orphan branch named mob-meta.
mob start creates all configuration needed to run. It is always safe to run mob clean to remove the repository config and start fresh.

How do I show current status?

Run mob status

Work duration is set to 15 but we must stop for a meeting in 7 minutes

Run mob start 7

Hooks

You can add hooks to your configuration in ~/.mob to notify you when your turn is over or to take over screen sharing when you start.

...
[hooks]
after_start="take_screen.sh"
after_timer="say 'mob next NEXT_DRIVER'"

Hooks are executed by a sh and can contain two variables:

  • CURRENT_DRIVER: Always the name you configured in ~/.mob
  • NEXT_DRIVER: Next driver or anyone if you are the first in a session. It is empty on all before_* hooks.

The available hooks are:

  • before_start: Run as soon as possible when you run mob start, before checking that it's your turn or that your working directory is clean.
  • after_start: Right after you've started a session with mob start but before the timer started. This is a good hook for taking over the screen.
  • after_timer: Run when your turn ended. The first time you run mob start it tries to find commands to play a sound and show a desktop notification to populate this hook.
  • before_next: Before running mob next, NEXT_DRIVER is not available.
  • after_next: Before running mob next, NEXT_DRIVER is either a name or anyone.
  • before_done: Before the squashing and deleting branches.
  • after_done: After done has been run, NEXT_DRIVER is not available.

How it works

mob uses an orphan branch called mob-meta to save session state and settings. You can view the session content with mob status [-r] and delete it with mob clean.

Session {
    drivers: Drivers(
        [
            "Paul",
            "Leo",
            "Ella",
        ],
    ),
    branches: Branches {
        branch: "mob-session",
        base_branch: "main",
    },
    settings: Some(
        Settings {
            commit_message: "mob sync [skip ci]",
            work_duration: 10,
        },
    ),
    state: Working {
        driver: "Ella",
    },
}

The session can be in 3 different states:

mob states

Inspiration and other tools

Inspiration for this tool comes from Remote mob programming and their tool mob written in Go.

I did this rewrite to:

  • remember the order of drivers
  • use any branch as base branch, not only master or main
  • know about the state so we get nice warnings instead of git conflicts and lost refs.
  • and of course... rust ;)

To find other tools look at the mob programming timer tag on github

mob's People

Contributors

afajl avatar byron avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Forkers

byron wusty szabgab

mob's Issues

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.