opencode-setup 0.1.0
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.
- package/LICENSE +21 -0
- package/README.md +242 -0
- package/dist/chunk-PKHQD5QT.js +1106 -0
- package/dist/cli.js +339 -0
- package/dist/index.js +170 -0
- package/dist/templates/agents/planner.md +10 -0
- package/dist/templates/agents/reviewer.md +12 -0
- package/dist/templates/agents/tester.md +5 -0
- package/dist/templates/agents-md/backend-go.md +28 -0
- package/dist/templates/agents-md/backend-python.md +27 -0
- package/dist/templates/agents-md/base.md +29 -0
- package/dist/templates/agents-md/frontend-ts.md +39 -0
- package/dist/templates/agents-md/fullstack.md +25 -0
- package/dist/templates/commands/lint.md +2 -0
- package/dist/templates/commands/plan.md +10 -0
- package/dist/templates/commands/review.md +6 -0
- package/dist/templates/commands/test.md +2 -0
- package/dist/templates/configs/balanced.json +10 -0
- package/dist/templates/configs/budget.json +10 -0
- package/dist/templates/configs/google-only.json +10 -0
- package/dist/templates/configs/minimax.json +10 -0
- package/dist/templates/configs/power.json +10 -0
- package/dist/templates/skills/code-review/SKILL.md +27 -0
- package/dist/templates/skills/frontend-design/SKILL.md +20 -0
- package/dist/templates/skills/testing/SKILL.md +19 -0
- package/package.json +83 -0
- package/templates/agents/planner.md +10 -0
- package/templates/agents/reviewer.md +12 -0
- package/templates/agents/tester.md +5 -0
- package/templates/agents-md/backend-go.md +28 -0
- package/templates/agents-md/backend-python.md +27 -0
- package/templates/agents-md/base.md +29 -0
- package/templates/agents-md/frontend-ts.md +39 -0
- package/templates/agents-md/fullstack.md +25 -0
- package/templates/commands/lint.md +2 -0
- package/templates/commands/plan.md +10 -0
- package/templates/commands/review.md +6 -0
- package/templates/commands/test.md +2 -0
- package/templates/configs/balanced.json +10 -0
- package/templates/configs/budget.json +10 -0
- package/templates/configs/google-only.json +10 -0
- package/templates/configs/minimax.json +10 -0
- package/templates/configs/power.json +10 -0
- package/templates/skills/code-review/SKILL.md +27 -0
- package/templates/skills/frontend-design/SKILL.md +20 -0
- package/templates/skills/testing/SKILL.md +19 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,242 @@
|
|
|
1
|
+
# opencode-setup
|
|
2
|
+
|
|
3
|
+
[](https://www.npmjs.com/package/opencode-setup)
|
|
4
|
+
[](https://opensource.org/licenses/MIT)
|
|
5
|
+
|
|
6
|
+
> **OpenCode 환경 세팅, 한 번의 실행으로.**
|
|
7
|
+
|
|
8
|
+
`opencode-setup`은 OpenCode의 초기 환경 세팅을 대화형으로 도와주는 **플러그인 겸 CLI 도구**입니다. 모델 선택, 프로젝트 규칙, 커스텀 에이전트, 플러그인, Skill, 권한 설정까지 — 문서를 읽고 직접 JSON을 작성하는 과정을 한 번의 실행으로 대체합니다.
|
|
9
|
+
|
|
10
|
+
[설치](#설치) • [사용법](#사용법) • [CLI 레퍼런스](#cli-레퍼런스) • [설계 문서](./DESIGN.md)
|
|
11
|
+
|
|
12
|
+
---
|
|
13
|
+
|
|
14
|
+
## 왜 필요한가
|
|
15
|
+
|
|
16
|
+
OpenCode는 75개 이상의 Provider와 수십 개의 설정 옵션을 지원합니다. 자유도가 높은 만큼, 처음 시작할 때 이런 질문들이 생깁니다:
|
|
17
|
+
|
|
18
|
+
- 어떤 모델을 써야 하지? build와 plan에 다른 모델을 넣어야 하나?
|
|
19
|
+
- opencode.json은 어떻게 작성하지?
|
|
20
|
+
- AGENTS.md에 뭘 써야 하지?
|
|
21
|
+
- oh-my-opencode는 어떻게 설정하지?
|
|
22
|
+
- Claude Code에서 쓰던 CLAUDE.md, skill, MCP 설정은 어떻게 옮기지?
|
|
23
|
+
|
|
24
|
+
`opencode-setup`은 이 모든 질문에 대해 대화형으로 답을 수집하고, 최적의 설정 파일을 자동 생성합니다.
|
|
25
|
+
|
|
26
|
+
## 빠른 시작
|
|
27
|
+
|
|
28
|
+
### Step 1: 설치
|
|
29
|
+
|
|
30
|
+
```bash
|
|
31
|
+
# OpenCode 플러그인 (추천)
|
|
32
|
+
npm install opencode-setup
|
|
33
|
+
|
|
34
|
+
# 또는 npx로 직접 실행
|
|
35
|
+
npx opencode-setup init
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
### Step 2: 초기화
|
|
39
|
+
|
|
40
|
+
```bash
|
|
41
|
+
# 대화형 위자드 실행
|
|
42
|
+
npx opencode-setup init
|
|
43
|
+
|
|
44
|
+
# 또는 프리셋만 적용
|
|
45
|
+
npx opencode-setup preset list
|
|
46
|
+
npx opencode-setup preset apply frontend-ts
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
### Step 3: 시작
|
|
50
|
+
|
|
51
|
+
OpenCode를 재시작하면 바로 작업을 시작할 수 있습니다!
|
|
52
|
+
|
|
53
|
+
## 설치
|
|
54
|
+
|
|
55
|
+
### 방법 1: OpenCode 플러그인 (추천)
|
|
56
|
+
|
|
57
|
+
`opencode.json`에 추가:
|
|
58
|
+
```json
|
|
59
|
+
{
|
|
60
|
+
"plugin ["opencode-setup"]"]
|
|
61
|
+
}
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
OpenCode를 재시작하면 자동 로드됩니다. OpenCode 안에서 AI에게 "내 환경을 세팅해줘"라고 말하면 `setup_init` tool이 실행됩니다.
|
|
65
|
+
|
|
66
|
+
### 방법 2: 독립 CLI
|
|
67
|
+
|
|
68
|
+
```bash
|
|
69
|
+
npm install -g opencode-setup
|
|
70
|
+
opencode-setup init
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
OpenCode 설정이 아직 없는 신규 사용자도 이 방법으로 바로 시작할 수 있습니다.
|
|
74
|
+
|
|
75
|
+
## 사용법
|
|
76
|
+
|
|
77
|
+
### 시나리오 1 — AI 코딩 도구가 처음인 경우
|
|
78
|
+
|
|
79
|
+
```bash
|
|
80
|
+
npx opencode-setup init
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
대화형 위자드가 실행됩니다:
|
|
84
|
+
- AI 서비스 선택 (OpenCode Go, Anthropic, Google, OpenAI 등)
|
|
85
|
+
- 월 예산 선택 (무료 ~ $50+)
|
|
86
|
+
- 프로젝트 언어/프레임워크
|
|
87
|
+
- 플러그인 선택
|
|
88
|
+
- 자동화 수준 (안전/균형/자동)
|
|
89
|
+
|
|
90
|
+
결과로 생성되는 파일:
|
|
91
|
+
```
|
|
92
|
+
~/.config/opencode/opencode.json 글로벌 설정
|
|
93
|
+
./opencode.json 프로젝트 설정
|
|
94
|
+
./AGENTS.md 프로젝트 규칙
|
|
95
|
+
./.opencode/agents/ 커스텀 에이전트
|
|
96
|
+
./.opencode/commands/ 커스텀 커맨드
|
|
97
|
+
./.opencode/skills/ Skill
|
|
98
|
+
./.env.example 환경변수 템플릿
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
### 시나리오 2 — 프리셋으로 빠르게 세팅
|
|
102
|
+
|
|
103
|
+
```bash
|
|
104
|
+
# 프리셋 목록 확인
|
|
105
|
+
npx opencode-setup preset list
|
|
106
|
+
|
|
107
|
+
# 프리셋 적용
|
|
108
|
+
npx opencode-setup preset apply frontend-ts
|
|
109
|
+
npx opencode-setup preset apply backend-go
|
|
110
|
+
npx opencode-setup preset apply balanced
|
|
111
|
+
```
|
|
112
|
+
|
|
113
|
+
**모델 프리셋:**
|
|
114
|
+
| 프리셋 | 설명 | 월 비용 |
|
|
115
|
+
|--------|------|---------|
|
|
116
|
+
| `budget` | Big Pickle 무료 조합 | 무료 ~ $10 |
|
|
117
|
+
| `balanced` | Sonnet + Flash (추천) | $20 ~ $40 |
|
|
118
|
+
| `power` | Sonnet + Opus | $50+ |
|
|
119
|
+
| `minimax` | M2.5 + Big Pickle | $5 ~ $15 |
|
|
120
|
+
| `google-only` | Gemini Pro + Flash | $15 ~ $30 |
|
|
121
|
+
|
|
122
|
+
**스택 프리셋:**
|
|
123
|
+
| 프리셋 | 설명 |
|
|
124
|
+
|--------|------|
|
|
125
|
+
| `frontend-ts` | TypeScript/React/Next.js 최적화 |
|
|
126
|
+
| `backend-go` | Go 백엔드 최적화 |
|
|
127
|
+
| `backend-python` | Python/FastAPI 최적화 |
|
|
128
|
+
| `fullstack` | 풀스택 프로젝트 최적화 |
|
|
129
|
+
|
|
130
|
+
### 시나리오 3 — 환경 진단
|
|
131
|
+
|
|
132
|
+
```bash
|
|
133
|
+
npx opencode-setup doctor
|
|
134
|
+
```
|
|
135
|
+
|
|
136
|
+
OpenCode, Bun, API 키, 설정 파일, LSP 서버, 플러그인 상태를 점검합니다.
|
|
137
|
+
|
|
138
|
+
### 시나리오 4 — 설정 검증
|
|
139
|
+
|
|
140
|
+
```bash
|
|
141
|
+
npx opencode-setup validate
|
|
142
|
+
```
|
|
143
|
+
|
|
144
|
+
opencode.json과 AGENTS.md의 구조와 유효성을 검증합니다.
|
|
145
|
+
|
|
146
|
+
## CLI 레퍼런스
|
|
147
|
+
|
|
148
|
+
| CLI | 플러그인 Tool | 설명 |
|
|
149
|
+
|-----|--------------|------|
|
|
150
|
+
| `opencode-setup init` | `setup_init` | 대화형 초기 세팅 |
|
|
151
|
+
| `opencode-setup preset list` | `setup_preset_list` | 프리셋 목록 |
|
|
152
|
+
| `opencode-setup preset apply <name>` | `setup_preset_apply` | 프리셋 적용 |
|
|
153
|
+
| `opencode-setup migrate <tool>` | `setup_migrate` | 설정 마이그레이션 (준비 중) |
|
|
154
|
+
| `opencode-setup validate` | `setup_validate` | 설정 검증 |
|
|
155
|
+
| `opencode-setup doctor` | `setup_doctor` | 환경 진단 |
|
|
156
|
+
|
|
157
|
+
## 생성되는 파일
|
|
158
|
+
|
|
159
|
+
```
|
|
160
|
+
~/.config/opencode/
|
|
161
|
+
├── opencode.json 글로벌 (Provider, 모델, 테마, 플러그인)
|
|
162
|
+
└── tui.json TUI 설정
|
|
163
|
+
|
|
164
|
+
{project}/
|
|
165
|
+
├── opencode.json 프로젝트 (권한, MCP, LSP, 에이전트 오버라이드)
|
|
166
|
+
├── AGENTS.md 프로젝트 규칙, 코딩 표준
|
|
167
|
+
├── .env.example 환경변수 템플릿
|
|
168
|
+
└── .opencode/
|
|
169
|
+
├── agents/ 커스텀 에이전트 (reviewer, tester, planner)
|
|
170
|
+
├── commands/ 커스텀 커맨드 (/test, /lint, /review, /plan)
|
|
171
|
+
└── skills/ Skill (code-review, testing, frontend-design)
|
|
172
|
+
```
|
|
173
|
+
|
|
174
|
+
## Claude Code 매핑 가이드
|
|
175
|
+
|
|
176
|
+
| Claude Code | OpenCode | 비고 |
|
|
177
|
+
|-------------|----------|------|
|
|
178
|
+
| CLAUDE.md | AGENTS.md | 파일명만 변경 |
|
|
179
|
+
| skill (SKILL.md) | skill (.opencode/skills/) | 경로 복사 (네이티브 호환) |
|
|
180
|
+
| hook | plugin hook + command | 자동→plugin, 수동→command |
|
|
181
|
+
| rule | AGENTS.md Rules 섹션 | 규칙 병합 |
|
|
182
|
+
| oh-my-claude-code | oh-my-opencode | 플러그인 설치 + 에이전트 매핑 |
|
|
183
|
+
| MCP 서버 | opencode.json mcp | 설정 구조 변환 |
|
|
184
|
+
| extended thinking | reasoningEffort | high / medium / low |
|
|
185
|
+
|
|
186
|
+
## 기능
|
|
187
|
+
|
|
188
|
+
### 대화형 위자드
|
|
189
|
+
- 경험 수준 자동 감지
|
|
190
|
+
- 마이그레이션 옵션 제공
|
|
191
|
+
- Provider & 예산 기반 모델 추천
|
|
192
|
+
- 플러그인 & MCP 서버 선택
|
|
193
|
+
- 자동화 수준 설정
|
|
194
|
+
|
|
195
|
+
### 프리셋 시스템
|
|
196
|
+
- 5개 모델 프리셋 (budget, balanced, power, minimax, google-only)
|
|
197
|
+
- 4개 스택 프리셋 (frontend-ts, backend-go, backend-python, fullstack)
|
|
198
|
+
- 템플릿 기반 파일 생성
|
|
199
|
+
|
|
200
|
+
### 환경 진단
|
|
201
|
+
- OpenCode & Bun 설치 상태
|
|
202
|
+
- API 키 존재 여부
|
|
203
|
+
- 설정 파일 유효성
|
|
204
|
+
- LSP 서버 가용성
|
|
205
|
+
- 플러그인 상태
|
|
206
|
+
|
|
207
|
+
### 설정 검증
|
|
208
|
+
- opencode.json 스키마 검증
|
|
209
|
+
- AGENTS.md 구조 검증
|
|
210
|
+
- 권한 설정 유효성
|
|
211
|
+
|
|
212
|
+
## 개발
|
|
213
|
+
|
|
214
|
+
```bash
|
|
215
|
+
#克隆
|
|
216
|
+
git clone https://github.com/mercuryPark/oc-setup.git
|
|
217
|
+
cd opencode-setup
|
|
218
|
+
|
|
219
|
+
# 의존성 설치
|
|
220
|
+
bun install
|
|
221
|
+
|
|
222
|
+
# 빌드
|
|
223
|
+
bun run build
|
|
224
|
+
|
|
225
|
+
# 테스트
|
|
226
|
+
bun test
|
|
227
|
+
|
|
228
|
+
# 개발 모드
|
|
229
|
+
bun run dev
|
|
230
|
+
```
|
|
231
|
+
|
|
232
|
+
## 라이선스
|
|
233
|
+
|
|
234
|
+
MIT
|
|
235
|
+
|
|
236
|
+
---
|
|
237
|
+
|
|
238
|
+
<div align="center">
|
|
239
|
+
|
|
240
|
+
**Zero learning curve. Maximum power.**
|
|
241
|
+
|
|
242
|
+
</div>
|