馃嵃 Personal Multi-Git Remote Manager
go
git
1# 馃嵃 Mugi
2
3> Personal **Mu**lti-**Gi**t (or Tsu**mugi** Kotobuki, if you will) Remote Manager
4
5Mugi keeps your repositories in sync across multiple Git remotes (GitHub, Codeberg, SourceHut, etc.)
6with a single command.
7
8Mugi is written in [Go](https://go.dev) and uses [Bubble Tea](https://github.com/charmbracelet/bubbletea)
9for its terminal interface.
10
11## Usage
12
13```bash
14mugi pull # Pull all repos from all remotes
15mugi pull windmark # Pull Windmark from all remotes
16mugi push windmark gh cb # Push Windmark to GitHub and Codeberg
17mugi fetch gemrest/september # Fetch specific repository
18```
19
20<br>
21<p align="center"><img src="./assets/example_output.png" alt="Example Output Screenshot" width="50%"></p>
22
23### Installation
24
25```bash
26go install github.com/Fuwn/mugi/cmd/mugi@main
27```
28
29or
30
31```bash
32git clone https://github.com/Fuwn/mugi.git
33cd mugi
34go build -o mugi ./cmd/mugi
35mv mugi ~/.local/bin/ # or anywhere in your PATH
36```
37
38### Configuration
39
40Mugi uses a YAML config file at `~/.config/mugi/config.yaml`:
41
42```yaml
43remotes:
44 github:
45 aliases: [gh]
46 url: git@github.com:${user}/${repo}.git
47 codeberg:
48 aliases: [cb]
49 url: git@codeberg.org:${user}/${repo}.git
50 sourcehut:
51 aliases: [sh]
52 url: git@git.sr.ht:~fuwn/${repo}
53
54defaults:
55 remotes: [github, codeberg, sourcehut]
56 path_prefix: ~/Developer
57
58repos:
59 gemrest/windmark:
60 gemrest/september:
61```
62
63### `--help`
64
65```
66Mugi - Personal Multi-Git Remote Manager
67
68Usage:
69 mugi [flags] <command> [repo] [remotes...]
70
71Commands:
72 pull Pull from remote(s)
73 push Push to remote(s)
74 fetch Fetch from remote(s)
75 add <path> Add repository to config
76 rm <name> Remove repository from config
77 list List tracked repositories
78 help Show this help
79 version Show version
80
81Flags:
82 -c, --config <path> Override config file path
83 -V, --verbose Show detailed output
84 -f, --force Force push (use with caution)
85 -l, --linear Run operations sequentially
86
87Examples:
88 mugi pull Pull all repositories from all remotes
89 mugi push windmark gh cb Push to GitHub and Codeberg
90 mugi add . Add current directory to config
91 mugi add ~/Developer/mugi Add repository at path
92 mugi rm mugi Remove repository from config
93 mugi list List all tracked repositories
94```
95
96## Licence
97
98Licensed under either of [Apache License, Version 2.0](LICENSE-APACHE) or
99[MIT license](LICENSE-MIT) at your option.
100
101Unless you explicitly state otherwise, any contribution intentionally submitted
102for inclusion in this crate by you, as defined in the Apache-2.0 license, shall
103be dual licensed as above, without any additional terms or conditions.