{"id":25554042,"url":"https://github.com/jnatten/mrt","last_synced_at":"2026-02-19T21:30:16.052Z","repository":{"id":41137324,"uuid":"202190184","full_name":"jnatten/mrt","owner":"jnatten","description":"Multi repo tool","archived":false,"fork":false,"pushed_at":"2022-08-04T11:13:41.000Z","size":132,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2023-08-22T16:39:10.797Z","etag":null,"topics":["cli","microservices","rayon","repository-management","rust"],"latest_commit_sha":null,"homepage":null,"language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jnatten.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-08-13T17:10:39.000Z","updated_at":"2023-08-22T16:39:10.798Z","dependencies_parsed_at":"2022-09-08T00:52:12.269Z","dependency_job_id":null,"html_url":"https://github.com/jnatten/mrt","commit_stats":null,"previous_names":[],"tags_count":0,"template":null,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jnatten%2Fmrt","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jnatten%2Fmrt/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jnatten%2Fmrt/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jnatten%2Fmrt/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jnatten","download_url":"https://codeload.github.com/jnatten/mrt/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239841722,"owners_count":19705981,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cli","microservices","rayon","repository-management","rust"],"created_at":"2025-02-20T12:57:00.870Z","updated_at":"2026-02-19T21:30:15.982Z","avatar_url":"https://github.com/jnatten.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# mrt - Multi Repo Tool\n[![CI](https://github.com/jnatten/mrt/actions/workflows/ci.yaml/badge.svg)](https://github.com/jnatten/mrt/actions/workflows/ci.yaml)\n\nA tool to interact with multiple repositories, by executing the specified commands in each context with the specified tag (See EXAMPLES in [usage section](#usage)).\n\nThis is not a finished product and there is a chance you will encounter bugs or problems. \n\nReports of [issues](https://github.com/jnatten/mrt/issues/new) are really appreciated, along with pull-requests and suggestions for new features and how to improve the code (Rust is still very new to me).\n\n![Example](./mrt-demo.svg)\n\n### Installation\n\nRight now there aren't any releases, but you can compile the code yourself with these few steps:\n\n1. Install rust (I like [rustup](https://www.rust-lang.org/tools/install) for this)\n2. Clone this repository:\n\n    `$ git clone https://github.com/jnatten/mrt.git`\n3. Compile the source code with cargo from within the repository:\n\n    `$ cd mrt \u0026\u0026 cargo build --release`\n4. Move `mrt` executable to somewhere on PATH, On linux this can be something like /usr/bin/mrt\n\n    `$ mv target/release/mrt /usr/bin/mrt`\n    \n5. Done! See [usage](#usage):\n\n### Usage\n```\nMulti Repo Tool 0.0.3\n\nUSAGE:\n    mrt [FLAGS] [+tag ..] [--] [command]\n\nFLAGS:\n    -c, --continuous-output    Will make output from commands executed in parallel with --parallel argument print to\n                               terminal before every command has been executed.\n    -h, --help                 Prints help information\n    -l, --list-tags            List all specified +tag's and paths that are tagged...\n    -m, --modified-only        Only execute command in modified repos (Modification detected by git-status).\n    -P, --panic-on-nonzero     Makes mrt quit if it encounters a non-zero exit code.\n    -p, --parallel             Execute at each tagged path in parallel\n                               This stores output until all executions are finished and then prints them in sequence,\n                               unless --continuous-output specified.\n    -L, --previous-paths       Execute command in paths from previous execution of mrt.\n    -s, --shell                Will make command be executed in the context of a shell.\n                               IE: `bash -c '\u003ccommand\u003e'`\n                               `powershell /C '\u003ccommand\u003e' on windows.\n    -V, --version              Prints version information\n\nSUBCOMMANDS:\n    config    Subcommand to add and remove tags, generally configure mrt itself\n    help      Prints this message or the help of the given subcommand(s)\n    status    Status of directories with specified tags\n    tmux      Launch a tmux session, with panes opened in directories of the specified tags\n\nEXAMPLES:\n    # Tag current directory with tag `backend`\n    $ mrt config -a backend\n\n    # Remove tag `backend` from current directory\n    $ mrt config -d backend\n\n    # List tagged directories\n    $ mrt -l\n\n    # Execute command in all directories tagged with `backend`\n    $ mrt +backend sed -i 's/someversion = \"1.0.0\"/someversion = \"1.2.0\"/g' build.sbt\n\n    # Execute command in all directories tagged with `backend` in parallel\n    $ mrt -p +backend git pull\n\n    # Execute command in all directories tagged with `backend` and `frontend` in parallel\n    $ mrt -p +backend +frontend git pull\n\n    # List status of all directories tagged with `backend`\n    $ mrt +backend status\n\n    # Removes the `backend` tag entirely, leaving the directories intact\n    $ mrt config -D backend\n\n    # Removes all tags from current directory\n    $ mrt config -r\n\n    # Execute command in specified directory\n    $ mrt +/opt/somedir ls -l\n\n    # Execute command in dirty repositories\n    $ mrt -m git diff\n\n    # Launch a tmux session with a pane for each of the directories tagged with `backend`\n    $ mrt +backend tmux\n\n```\n\n### Configuration\nConfiguring tags are mostly done with the `mrt config` command.\nSee examples at `mrt -h` or `mrt config -h` for more help.\n\n##### Config file\nThe config file is by default located at `\u003cHOME\u003e/.mrtconfig.json` and is a json file.\nThe fastest way to add multiple directories under multiple tags and such is probably editing this file by hand.\nThe format is like this:\n```\n{\n  \"version\": \"0.0.1\",\n  \"tags\": {\n    \"tag1\": {\n      \"paths\": [\n        \"/home/user/dir1\",\n        \"/home/user/dir2\",\n        ...\n      ]\n    },\n    \"tag2\": {\n      \"paths\": [\n        \"/home/user/dir2\",\n        \"/home/user/dir3\",\n        ...\n      ]\n    },\n    ...\n  }\n}\n```\n\n##### Environment variables\nSome environment variables can be used to modify `mrt`'s behavior. Here's a list of them:\n\n- `MRT_DEFAULT_TAGS` - A comma separated list of tags that should be used when no tags are specified on the command line.\n    - Example: `MRT_DEFAULT_TAGS=backend,frontend`\n- `MRT_CONFIG_PATH` - Where the mrt config path is located.\n\n### Why?\n\nI work on many repositories with similar code in some sort of a microservice environment. \nI felt the need to reduce the overhead of maintaining several repositories with similarities.\n\nAlso I think rust is an interesting language which I want to learn more about.\n\n### Development\n##### Useful commands\n- **Compile**: `cargo build` \n- **Compile + Run**: `cargo run -- -h` \n- **Run tests**: `cargo test`\n##### Subcommands\nSubcommands _should_ be relatively easy to implement. See the subcommands [README](src/subcommands/README.md) for more info.\n\n### Alternatives\n\nThis is not a new idea and similar projects exist.\nThis list is probably not complete, but here are a few alternatives and a short summary of why I still felt compelled to make this.\n\n- https://github.com/mixu/gr - Not actively maintained, no parallelization.\n- https://github.com/tobru/myrepos - Not actively maintained, seems to be only for version control.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjnatten%2Fmrt","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjnatten%2Fmrt","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjnatten%2Fmrt/lists"}