Skip to content

uteja1/mani

 
 

Repository files navigation

Build Status Release License Go Report Card

Mani

mani is a CLI tool that helps you manage multiple repositories. It's useful when you are working with microservices, multi-project systems, many libraries or just a bunch of repositories and want a central place for pulling all repositories and running commands over them.

You specify repository and commands in a config file and then run the commands over all or a subset of the repositories.

demo

Features

  • Clone multiple repositories in one command
  • Declarative configuration
  • Run custom or ad-hoc commands over multiple repositories
  • Flexible filtering
  • Portable, no dependencies
  • Supports auto-completion

Table of Contents

Installation

mani is available on Linux and Mac, with partial support for Windows.

  • Binaries are available on the release page

  • via cURL (Linux & macOS)

    curl -sfL https://raw.githubusercontent.com/alajmo/mani/main/install.sh | sh
  • via Homebrew

    brew tap alajmo/mani
    brew install mani
  • via Go

    go get -u github.com/alajmo/mani

Auto-completion is available via mani completion bash|zsh|fish|powershell.

Building From Source

  1. Clone the repo
  2. Build and run the executable
    make build && ./dist/mani

Usage

Create a New Mani Repository

Run the following command inside a directory containing your git repositories:

$ mani init

This will generate two files:

  • mani.yaml: contains projects and custom tasks. Any sub-directory that has a .git inside it will be included (add the flag --auto-discovery=false to turn off this feature)
  • .gitignore: includes the projects specified in mani.yaml file

It can be helpful to initialize the mani repository as a git repository so that anyone can easily download the mani repository and run mani sync to clone all repositories and get the same project setup as you.

Common Commands

# Run arbitrary command (list all files for instance)
mani exec --all-projects 'ls -alh'

# List all repositories
mani list projects

# List repositories in a tree-like format
mani tree projects

# Describe available tasks
mani describe tasks

# Run task for projects that have the frontend tag
mani run list-files --tags frontend

# Run task for projects under a specific directory
mani run list-files --paths work

# Run task for specific project
mani run list-files --project project-a

# Open up mani.yaml in your preferred editor
mani edit

Documentation

Checkout the following to learn more about mani:

The MIT License (MIT)

Copyright (c) 2020-2021 Samir Alajmovic

About

CLI tool to help you manage multiple repositories

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Go 62.1%
  • Shell 33.0%
  • JavaScript 2.9%
  • Other 2.0%