MARS is a lightweight CLI helper for teams working with many git-based microservices. It keeps a local inventory of projects, lets you open or inspect any service quickly, and runs common git chores (fetch/pull, branch switching) across repos from one place.
- Register a microservices project (auto-detects all git repos in a root folder)
- Language support: English and Indonesian (
-lang en|id) - Inventory view of all registered projects
- List repo status (branch + clean/modified) across a project or a specific repo
- Open a project or a specific repo in your file explorer
- Batch git fetch/pull for all repos in the active project
- Batch branch switching across repos (or a single repo)
- macOS, Linux, or Windows
gitavailable in your shell- Bash (macOS/Linux ship with it; on Windows use Git Bash or WSL)
Follow the steps for your platform. Replace <path-to-project> with the directory where you cloned this repo.
- Clone the repository:
git clone https://github.com/taufanAli65/microservices-manager.git microservices_manager cd microservices_manager - Make the script executable:
chmod +x manager.sh
- (Optional) Add to PATH for convenience:
# example: symlink to /usr/local/bin ln -s "$(pwd)/manager.sh" /usr/local/bin/mars
- Run the tool:
./manager.sh -h # or, if symlinked mars -h
- Use Git Bash or WSL for best compatibility.
- Clone the repo, then run the script via:
bash manager.sh -h
- To make it easier to call, add an alias/function in your shell profile (e.g.,
.bashrc/.bash_profile/.bash_aliases).
Configuration is stored at ~/.mars_config with entries like:
LANG=en
PROJECT|MyProject|/absolute/path/to/root|repoA repoB repoC
All commands are executed from Bash. Examples assume the script is available as mars (symlink/alias) but ./manager.sh works the same.
From the project root containing multiple git repos:
mars initThe tool scans subfolders containing .git, saves them to ~/.mars_config, and prompts for a project name (defaults to the current folder name).
mars -iShows all registered projects and their root paths.
mars -l # auto-detect project from current path
mars -l -i Apollo # check a specific project from anywhere
mars -l -i Apollo -r apollo-kit # only a specific repoOutputs current branch and whether the repo is clean or modified.
mars -o Apollo # open project root in Finder/Explorer
mars -o Apollo -r api-gateway # open a specific repomars -aRun inside a registered project (auto-detected) to fetch & pull all repos. Use -r <repo> with -a if you extend the script similarly to other commands.
mars -s -b dev # switch all repos to branch 'dev'
mars -s -b main -r ui # switch only the 'ui' repomars -d ApolloRemoves the project entry from ~/.mars_config (does not delete files).
mars -lang en
mars -lang idmars -hShows the command summary and examples.
- Keep repo names unique within a project to avoid ambiguity.
- Run
mars -lregularly to ensure working directories are clean before batch operations. - The
-acommand pulls fromorigin main; adjust as needed if your default branch differs.
- Fork the repository and create a feature branch:
git checkout -b feature/my-change - Make changes and add tests/docs where helpful.
- Ensure the script remains POSIX-friendly for macOS/Linux and works in Git Bash/WSL on Windows.
- Commit with clear messages and open a pull request describing the change and testing done.
This project is licensed under the MIT License. See LICENSE for details.