unirepo-cli 0.2.0 → 0.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/README.md +90 -73
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -4,63 +4,102 @@
4
4
  [![CI](https://github.com/Poko18/unirepo/actions/workflows/ci.yml/badge.svg)](https://github.com/Poko18/unirepo/actions/workflows/ci.yml)
5
5
  [![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](LICENSE)
6
6
 
7
- **The workspace for cross-repo coding.**
7
+ ### One workspace to refactor your whole stack in one go
8
8
 
9
- unirepo turns a set of GitHub repos into a single unified workspace. Edit code across any of them, commit once, and push updates back to their original repos all in one branch.
9
+ Work across multiple repos like they’re one. Unirepo turns multiple GitHub repositories into a single unified workspace. Edit backend, frontend, and shared code in one tree, commit from one place, and push changes back to each repo using the same branch.
10
10
 
11
- Built for the era of AI coding agents: give your agent one place to work, and let it refactor, ship features, and update shared APIs across your entire stack.
11
+ ### Built for AI coding agents
12
12
 
13
+ AI agents need full context to make correct changes—not one repo at a time. Unirepo gives them a single workspace to refactor your entire stack, keep changes consistent, and push updates back to each repo.
13
14
 
14
- ## Why unirepo?
15
+ ### Example task
15
16
 
16
- **Before unirepo:**
17
+ You need to update:
17
18
 
18
- ```
19
- ~/work/api ← clone, checkout branch, edit
20
- ~/work/web ← clone, checkout same branch, edit
21
- ~/work/shared ← clone, checkout same branch, edit
22
- # remember to push all three, open three PRs
23
- ```
24
-
25
- **With unirepo:**
26
-
27
- ```
28
- ~/work/my-workspace/
29
- ├── api/ ← edit
30
- ├── web/ ← edit
31
- └── shared/ ← edit
32
- # one commit, one push — all three repos updated
33
- ```
19
+ - `api/` for a new endpoint
20
+ - `web/` for the UI
21
+ - `shared/` for shared types
34
22
 
23
+ <table>
24
+ <tr>
25
+ <td width="50%" valign="top">
35
26
 
36
- ## Quick Start
27
+ **Without `unirepo`**
37
28
 
38
29
  ```bash
39
- npx unirepo-cli init my-workspace \
40
- https://github.com/org/api.git \
41
- https://github.com/org/web.git
42
- ```
30
+ # clone and branch in each repo
31
+ git clone git@github.com:org/api.git
32
+ git clone git@github.com:org/web.git
33
+ git clone git@github.com:org/shared.git
34
+
35
+ cd api
36
+ git checkout -b feature-auth
37
+ cd ../web
38
+ git checkout -b feature-auth
39
+ cd ../shared
40
+ git checkout -b feature-auth
41
+
42
+ # edit in 3 separate checkouts
43
+
44
+ # commit in each repo
45
+ cd ../api
46
+ git add .
47
+ git commit -m "feat: add auth"
48
+ cd ../web
49
+ git add .
50
+ git commit -m "feat: add auth UI"
51
+ cd ../shared
52
+ git add .
53
+ git commit -m "feat: add auth types"
54
+
55
+ # push from each repo
56
+ cd ../api
57
+ git push -u origin feature-auth
58
+ cd ../web
59
+ git push -u origin feature-auth
60
+ cd ../shared
61
+ git push -u origin feature-auth
62
+ ```
63
+
64
+ </td>
65
+ <td width="50%" valign="top">
66
+
67
+ **With `unirepo`**
43
68
 
44
- This creates:
69
+ ```bash
70
+ # create one workspace and one branch
71
+ unirepo init my-workspace <repo...>
72
+ cd my-workspace
73
+ unirepo branch feature-auth
45
74
 
46
- ```
47
- my-workspace/
48
- ├── api/ ← from github.com/org/api
49
- ├── web/ ← from github.com/org/web
50
- ├── AGENTS.md ← workflow guide for humans and agents
51
- └── .gitignore
52
- ```
75
+ # edit api/, web/, and shared/ together
53
76
 
54
- Then work across repos as if they were one:
77
+ # commit once from the workspace
78
+ git add .
79
+ git commit -m "feat: add auth flow"
55
80
 
56
- ```bash
57
- cd my-workspace
58
- # edit files in api/ and web/
59
- git add . && git commit -m "feat: update shared types"
81
+ # push changed subtrees
60
82
  unirepo push
61
83
  ```
62
84
 
63
- That's it. Each subtree gets pushed to its upstream repo automatically.
85
+ </td>
86
+ </tr>
87
+ </table>
88
+
89
+ ## Same workflow, fewer commands
90
+
91
+ `unirepo` keeps your upstream repos separate while removing:
92
+
93
+ - Repo and branch juggling
94
+ - Repeated setup and commands
95
+ - Context switching
96
+ - Inconsistent cross-repo changes
97
+
98
+ It enables:
99
+
100
+ - One place to see the full change
101
+ - Safe cross-repo refactors
102
+ - A single workspace for humans and AI
64
103
 
65
104
 
66
105
  ## Install
@@ -82,6 +121,17 @@ npx unirepo-cli <command>
82
121
  ```
83
122
 
84
123
 
124
+ ## Why it works well for agents
125
+
126
+ AI coding agents work best when they can see the full change at once.
127
+
128
+ - Update backend, frontend, and shared contracts in one pass
129
+ - Commit coordinated changes from one repo
130
+ - Check affected subtrees with `unirepo status`
131
+ - Push only changed subtrees with `unirepo push`
132
+ - Reuse the generated `AGENTS.md` workflow guide
133
+
134
+
85
135
  ## Commands
86
136
 
87
137
  | Command | Description |
@@ -92,40 +142,7 @@ npx unirepo-cli <command>
92
142
  | `status` | Show subtrees, branches, and what changed |
93
143
  | `branch [name]` | Create or show the current push branch |
94
144
  | `push [subtree...]` | Push changed subtrees upstream |
95
- | `version` | Show CLI version |
96
-
97
-
98
- ## Workflow
99
-
100
- A typical session looks like this:
101
-
102
- ```bash
103
- # 1. Create a branch for your work
104
- unirepo branch feature-auth
105
-
106
- # 2. Pull latest upstream changes
107
- unirepo pull
108
-
109
- # 3. Edit files across repos
110
- vim api/src/auth.js web/src/login.tsx
111
-
112
- # 4. Commit in the monorepo
113
- git add . && git commit -m "feat: add OAuth flow"
114
-
115
- # 5. Check what will be pushed
116
- unirepo status
117
- unirepo push --dry-run
118
-
119
- # 6. Push to upstream repos
120
- unirepo push
121
-
122
- # 7. Open one PR per upstream repo
123
- ```
124
-
125
- The branch name you create in the workspace is reused when pushing to each upstream repo.
126
-
127
145
 
128
- ## Command Reference
129
146
 
130
147
  ### init
131
148
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "unirepo-cli",
3
- "version": "0.2.0",
3
+ "version": "0.2.1",
4
4
  "description": "CLI tool for creating and managing git-subtree monorepos — run your agents across repos",
5
5
  "type": "module",
6
6
  "bin": {