Skip to content

Commit ca445f4

Browse files
bitjaruclaude
andcommitted
feat: Add monorepo support (v2.4.0)
- Auto-detect monorepo tools: Turborepo, pnpm, Nx, Lerna, Rush, npm/yarn workspaces - Scan packages in workspace patterns (packages/*, apps/*, libs/*) - Add monorepo-specific setup guide templates (ko/en) - Update init command with monorepo mode - Update scanner with detectMonorepo() and scanMonorepoPackages() - Prevent monorepos from being detected as single repos - Update README documentation (ko/en) - Add CHANGELOG.md 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
1 parent 55f9410 commit ca445f4

File tree

11 files changed

+1301
-31
lines changed

11 files changed

+1301
-31
lines changed

CHANGELOG.md

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
# Changelog
2+
3+
All notable changes to CodeSyncer will be documented in this file.
4+
5+
## [2.4.0] - 2025-12-11
6+
7+
### Added
8+
9+
#### Monorepo Support (Major Feature)
10+
- **Auto-detection** of monorepo configurations:
11+
- Turborepo (`turbo.json`)
12+
- pnpm (`pnpm-workspace.yaml`)
13+
- Nx (`nx.json`)
14+
- Lerna (`lerna.json`)
15+
- Rush (`rush.json`)
16+
- npm/Yarn workspaces (`package.json` with `workspaces` field)
17+
18+
- **Package scanning**: Automatically discovers all packages within workspace patterns (e.g., `packages/*`, `apps/*`, `libs/*`)
19+
20+
- **Monorepo-specific templates**: New `setup_guide_monorepo.md` template in English and Korean with:
21+
- Package dependency documentation
22+
- Inter-package import patterns
23+
- Build order documentation
24+
- Cross-package workflow examples
25+
26+
#### Technical Improvements
27+
- New types: `WorkspaceMode`, `MonorepoTool`, `MonorepoInfo`
28+
- New scanner functions: `detectMonorepo()`, `scanMonorepoPackages()`
29+
- Updated `isCurrentDirRepository()` to properly distinguish monorepos from single repos
30+
- Added `js-yaml` dependency for parsing `pnpm-workspace.yaml`
31+
32+
### Changed
33+
- `codesyncer init` now has three modes: Single Repo, Monorepo, Multi-Repo
34+
- `codesyncer update` properly scans monorepo packages
35+
- README.md and README.ko.md updated with monorepo documentation
36+
37+
### Fixed
38+
- Monorepos with root `package.json` are no longer incorrectly detected as single repos
39+
40+
---
41+
42+
## [2.3.1] - 2024-12-XX
43+
44+
### Added
45+
- Single repository mode support
46+
- Improved update command UX with English messages
47+
48+
### Fixed
49+
- Hard update mode now performs deep scan and content review
50+
51+
---
52+
53+
## [2.3.0] - 2024-XX-XX
54+
55+
### Added
56+
- Initial multi-repository support
57+
- Comment tag system (`@codesyncer-*` tags)
58+
- Auto-discussion system for critical keywords
59+
- Korean and English language support
60+
61+
---
62+
63+
*For full history, see [GitHub Releases](https://github.com/bitjaru/codesyncer/releases)*

README.ko.md

Lines changed: 51 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,7 @@ CodeSyncer는 문서가 **어디에, 어떻게** 만들어져야 하는지 정
6969

7070
- 🤖 **AI 도구 독립적**: Claude Code, Cursor, GitHub Copilot 등 모두 지원
7171
- 📁 **단일 & 멀티 레포 지원**: 개별 레포지토리 또는 전체 워크스페이스 모두 지원
72+
- 📦 **모노레포 지원**: Turborepo, pnpm, Nx, Lerna, npm/yarn workspaces 자동 감지
7273
- 🏷️ **주석 태그 시스템**: `@codesyncer-*` 태그로 결정과 추론을 영구 기록
7374
- 🤝 **자동 의논 시스템**: 중요한 결정(결제, 보안 등)에서 자동으로 일시 정지
7475
- 🌐 **다국어 지원**: 한글/영문 완벽 지원
@@ -196,7 +197,7 @@ AI 코딩 어시스턴트를 실행하세요:
196197
cd /path/to/your/project
197198
```
198199

199-
CodeSyncer는 **단일 레포지토리** **멀티 레포 워크스페이스** 모두 지원합니다:
200+
CodeSyncer는 **단일 레포지토리**, **멀티 레포 워크스페이스**, **모노레포** 모두 지원합니다:
200201

201202
**단일 레포지토리** (자동 감지):
202203
```
@@ -214,6 +215,19 @@ workspace/
214215
└── mobile/
215216
```
216217

218+
**모노레포** (Turborepo, pnpm, Nx, Lerna, npm/yarn workspaces 자동 감지):
219+
```
220+
monorepo/
221+
├── package.json # workspaces: ["packages/*", "apps/*"]
222+
├── turbo.json # 또는 pnpm-workspace.yaml, nx.json, lerna.json
223+
├── packages/
224+
│ ├── shared/
225+
│ └── ui/
226+
└── apps/
227+
├── web/
228+
└── api/
229+
```
230+
217231
### 4단계: CodeSyncer 초기화
218232

219233
```bash
@@ -230,7 +244,8 @@ codesyncer init
230244
| 모드 | 감지 조건 | 생성 결과 |
231245
|------|-----------|-----------|
232246
| **단일 레포** | 현재 폴더에 `package.json`, `.git` 등 존재 | `.claude/SETUP_GUIDE.md` 생성 |
233-
| **멀티 레포** | 하위 폴더에 레포지토리들 존재 | `.codesyncer/SETUP_GUIDE.md` 생성 |
247+
| **모노레포** | `turbo.json`, `pnpm-workspace.yaml`, `nx.json`, `lerna.json` 또는 `package.json``workspaces` 존재 | `.codesyncer/SETUP_GUIDE.md` 생성 (패키지별 설정) |
248+
| **멀티 레포** | 하위 폴더에 별도 레포지토리들 존재 | `.codesyncer/SETUP_GUIDE.md` 생성 |
234249

235250
**CodeSyncer는 여기까지만 합니다!** 프레임워크와 규칙만 제공하고, 이제 AI가 직접 설정합니다.
236251

@@ -496,6 +511,37 @@ workspace/
496511
└── (동일한 파일들)
497512
```
498513

514+
### 모노레포 모드 (v2.4.0 신규)
515+
516+
```
517+
monorepo/
518+
├── CLAUDE.md # Claude가 먼저 읽는 파일
519+
├── .codesyncer/
520+
│ └── MASTER_CODESYNCER.md # 패키지 네비게이션 가이드
521+
├── packages/
522+
│ ├── shared/
523+
│ │ └── .claude/
524+
│ │ └── (동일한 파일들)
525+
│ └── ui/
526+
│ └── .claude/
527+
│ └── (동일한 파일들)
528+
└── apps/
529+
├── web/
530+
│ └── .claude/
531+
│ └── (동일한 파일들)
532+
└── api/
533+
└── .claude/
534+
└── (동일한 파일들)
535+
```
536+
537+
**지원하는 모노레포 도구:**
538+
- ✅ Turborepo (`turbo.json`)
539+
- ✅ pnpm (`pnpm-workspace.yaml`)
540+
- ✅ Nx (`nx.json`)
541+
- ✅ Lerna (`lerna.json`)
542+
- ✅ npm/Yarn workspaces (`package.json``workspaces` 필드)
543+
- ✅ Rush (`rush.json`)
544+
499545
---
500546

501547
## 🛠️ 고급 사용법
@@ -595,6 +641,9 @@ A: 현재는 그렇습니다. 하지만 Cursor, GitHub Copilot 등 다른 도구
595641
**Q: 단일 레포에서도 사용할 수 있나요?**
596642
A: 네! CodeSyncer는 자동으로 단일 레포인지 감지합니다 (`package.json`, `.git` 등 존재 여부 확인). 단일 레포에서는 `.claude/SETUP_GUIDE.md`가 생성되고, 멀티 레포 구조 대신 간단한 구조로 설정됩니다.
597643

644+
**Q: 모노레포(Turborepo, pnpm, Nx, Lerna)에서 작동하나요?**
645+
A: 네! v2.4.0부터 CodeSyncer는 모노레포 설정(`turbo.json`, `pnpm-workspace.yaml`, `nx.json`, `lerna.json` 또는 `package.json`의 workspaces)을 자동으로 감지하고 워크스페이스 패턴의 모든 패키지를 스캔합니다.
646+
598647
**Q: AI 응답 속도가 느려지나요?**
599648
A: 아니요. CodeSyncer는 AI가 세션당 한 번만 읽는 문서 파일만 추가합니다. 오히려 사전에 컨텍스트를 제공하여 AI를 더 효율적으로 만듭니다.
600649

README.md

Lines changed: 51 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,7 @@ CodeSyncer defines **WHERE** and **HOW** documentation should be created. Your A
6969

7070
- 🤖 **AI-Agnostic**: Works with Claude Code, Cursor, GitHub Copilot, and more
7171
- 📁 **Single & Multi-Repository Support**: Works with individual repos or entire workspaces
72+
- 📦 **Monorepo Support**: Auto-detects Turborepo, pnpm, Nx, Lerna, Yarn/npm workspaces
7273
- 🏷️ **Comment Tag System**: `@codesyncer-*` tags to record decisions and inferences
7374
- 🤝 **Discussion Auto-Pause**: Automatically stops for critical decisions (payment, security, etc.)
7475
- 🌐 **Multi-Language**: Full Korean and English support
@@ -196,7 +197,7 @@ Make sure it's **active and running**.
196197
cd /path/to/your/project
197198
```
198199

199-
CodeSyncer works with both **single repositories** and **multi-repo workspaces**:
200+
CodeSyncer works with **single repositories**, **multi-repo workspaces**, and **monorepos**:
200201

201202
**Single Repository** (auto-detected):
202203
```
@@ -214,6 +215,19 @@ workspace/
214215
└── mobile/
215216
```
216217

218+
**Monorepo** (auto-detected via Turborepo, pnpm, Nx, Lerna, npm/yarn workspaces):
219+
```
220+
monorepo/
221+
├── package.json # workspaces: ["packages/*", "apps/*"]
222+
├── turbo.json # or pnpm-workspace.yaml, nx.json, lerna.json
223+
├── packages/
224+
│ ├── shared/
225+
│ └── ui/
226+
└── apps/
227+
├── web/
228+
└── api/
229+
```
230+
217231
### Step 4: Initialize CodeSyncer
218232

219233
```bash
@@ -230,7 +244,8 @@ You'll be asked:
230244
| Mode | Detection | Output |
231245
|------|-----------|--------|
232246
| **Single Repo** | Current folder has `package.json`, `.git`, etc. | Creates `.claude/SETUP_GUIDE.md` |
233-
| **Multi-Repo** | Subfolders contain repositories | Creates `.codesyncer/SETUP_GUIDE.md` |
247+
| **Monorepo** | Has `turbo.json`, `pnpm-workspace.yaml`, `nx.json`, `lerna.json`, or `workspaces` in package.json | Creates `.codesyncer/SETUP_GUIDE.md` with package-aware setup |
248+
| **Multi-Repo** | Subfolders contain separate repositories | Creates `.codesyncer/SETUP_GUIDE.md` |
234249

235250
**That's all CodeSyncer does!** It provides the framework and rules. Now your AI takes over.
236251

@@ -496,6 +511,37 @@ workspace/
496511
└── (same files)
497512
```
498513

514+
### Monorepo Mode (NEW in v2.4.0)
515+
516+
```
517+
monorepo/
518+
├── CLAUDE.md # Claude reads this first
519+
├── .codesyncer/
520+
│ └── MASTER_CODESYNCER.md # Package navigation guide
521+
├── packages/
522+
│ ├── shared/
523+
│ │ └── .claude/
524+
│ │ └── (same files)
525+
│ └── ui/
526+
│ └── .claude/
527+
│ └── (same files)
528+
└── apps/
529+
├── web/
530+
│ └── .claude/
531+
│ └── (same files)
532+
└── api/
533+
└── .claude/
534+
└── (same files)
535+
```
536+
537+
**Supported Monorepo Tools:**
538+
- ✅ Turborepo (`turbo.json`)
539+
- ✅ pnpm (`pnpm-workspace.yaml`)
540+
- ✅ Nx (`nx.json`)
541+
- ✅ Lerna (`lerna.json`)
542+
- ✅ npm/Yarn workspaces (`package.json` with `workspaces` field)
543+
- ✅ Rush (`rush.json`)
544+
499545
---
500546

501547
## 🛠️ Advanced Usage
@@ -595,6 +641,9 @@ A: Currently, yes. But we're building support for Cursor, GitHub Copilot, and ot
595641
**Q: Can I use this on a single repository?**
596642
A: Yes! CodeSyncer automatically detects if you're in a single repo (has `package.json`, `.git`, etc.) and creates `.claude/SETUP_GUIDE.md` instead of the multi-repo structure.
597643

644+
**Q: Does this work with monorepos (Turborepo, pnpm, Nx, Lerna)?**
645+
A: Yes! As of v2.4.0, CodeSyncer automatically detects monorepo configurations (`turbo.json`, `pnpm-workspace.yaml`, `nx.json`, `lerna.json`, or `package.json` with workspaces) and scans all packages in your workspace patterns.
646+
598647
**Q: Will this slow down AI responses?**
599648
A: No. CodeSyncer only adds documentation files that AI reads once per session. It actually makes AI more efficient by providing context upfront.
600649

package-lock.json

Lines changed: 16 additions & 8 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 16 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,18 @@
11
{
22
"name": "codesyncer",
3-
"version": "2.3.1",
3+
"version": "2.4.0",
44
"description": "AI-powered multi-repository collaboration system - Works with Claude Code, Cursor, GitHub Copilot, and more",
55
"keywords": [
66
"ai-collaboration",
77
"claude-code",
88
"cursor",
99
"github-copilot",
1010
"multi-repo",
11+
"monorepo",
12+
"turborepo",
13+
"pnpm",
14+
"nx",
15+
"lerna",
1116
"developer-tools",
1217
"cli",
1318
"ai-assistant",
@@ -51,21 +56,23 @@
5156
"dependencies": {
5257
"chalk": "^4.1.2",
5358
"commander": "^11.1.0",
59+
"fs-extra": "^11.2.0",
5460
"inquirer": "^8.2.6",
55-
"ora": "^5.4.1",
56-
"fs-extra": "^11.2.0"
61+
"js-yaml": "^4.1.1",
62+
"ora": "^5.4.1"
5763
},
5864
"devDependencies": {
59-
"@types/inquirer": "^9.0.7",
60-
"@types/node": "^20.10.0",
6165
"@types/fs-extra": "^11.0.4",
62-
"typescript": "^5.3.2",
66+
"@types/inquirer": "^9.0.7",
6367
"@types/jest": "^29.5.11",
68+
"@types/js-yaml": "^4.0.9",
69+
"@types/node": "^20.10.0",
70+
"@typescript-eslint/eslint-plugin": "^6.15.0",
71+
"@typescript-eslint/parser": "^6.15.0",
72+
"eslint": "^8.56.0",
6473
"jest": "^29.7.0",
6574
"ts-jest": "^29.1.1",
66-
"eslint": "^8.56.0",
67-
"@typescript-eslint/eslint-plugin": "^6.15.0",
68-
"@typescript-eslint/parser": "^6.15.0"
75+
"typescript": "^5.3.2"
6976
},
7077
"engines": {
7178
"node": ">=14.0.0"

0 commit comments

Comments
 (0)