--- name: env-setup label: 프로젝트 환경 설정 description: .gitignore, requirements.txt, .editorconfig 등 프로젝트 환경 설정 파일을 자동 생성합니다. icon: \uE835 tabs: code allowed-tools: - folder_map - file_read - file_write - process --- 프로젝트 유형에 맞는 환경 설정 파일을 자동으로 생성하세요. ## 작업 절차 1. **프로젝트 분석**: folder_map으로 프로젝트 구조를 파악하고 유형 판별 - `.py` 파일 → Python 프로젝트 - `package.json` 또는 `.js/.ts` 파일 → Node.js 프로젝트 - `.csproj` 또는 `.sln` 파일 → .NET 프로젝트 - `pom.xml` 또는 `.java` 파일 → Java 프로젝트 - 복합 프로젝트인 경우 모든 유형을 병합 2. **기존 설정 확인**: 이미 존재하는 설정 파일이 있는지 확인 - 있으면: 내용을 분석하여 누락된 항목만 추가 제안 - 없으면: 새로 생성 3. **생성할 파일 목록 제안**: 사용자에게 생성할 파일 목록을 보여주고 확인 4. **파일 생성**: file_write로 각 설정 파일 생성 5. **결과 안내**: 생성된 파일 목록과 주요 설정 내용 요약 ## 프로젝트별 템플릿 ### Python 프로젝트 생성 파일: `.gitignore`, `requirements.txt`, `.editorconfig`, `setup.cfg`, `.flake8` **.gitignore (Python)**: ``` __pycache__/ *.py[cod] *$py.class *.so .Python env/ venv/ .venv/ *.egg-info/ dist/ build/ .eggs/ *.egg .mypy_cache/ .pytest_cache/ .coverage htmlcov/ .env .idea/ .vscode/ *.log ``` **requirements.txt**: 프로젝트에서 import 문을 스캔하여 자동 생성 ### Node.js 프로젝트 생성 파일: `.gitignore`, `.editorconfig`, `.nvmrc`, `.prettierrc` **.gitignore (Node)**: ``` node_modules/ dist/ build/ .env .env.local *.log npm-debug.log* .DS_Store coverage/ .nyc_output/ .idea/ .vscode/ *.tgz ``` ### .NET 프로젝트 생성 파일: `.gitignore`, `.editorconfig`, `Directory.Build.props` **.gitignore (.NET)**: ``` bin/ obj/ .vs/ *.user *.suo *.cache packages/ *.nupkg TestResults/ .idea/ *.DotSettings.user ``` ### Java 프로젝트 생성 파일: `.gitignore`, `.editorconfig` **.gitignore (Java)**: ``` *.class *.jar *.war *.ear target/ .gradle/ build/ .idea/ *.iml .settings/ .classpath .project out/ ``` ## 공통 .editorconfig ```ini root = true [*] indent_style = space indent_size = 4 end_of_line = lf charset = utf-8 trim_trailing_whitespace = true insert_final_newline = true [*.md] trim_trailing_whitespace = false [*.{yml,yaml}] indent_size = 2 [*.{json,js,ts,jsx,tsx}] indent_size = 2 [Makefile] indent_style = tab ``` ## 규칙 - 기존 설정 파일이 있으면 덮어쓰지 않고, 누락 항목만 제안 - .env 파일은 생성하지 않음 (보안 — 사용자가 직접 생성) - 생성 전 파일 목록을 반드시 사용자에게 확인 - 프로젝트 루트에 생성 (하위 폴더에 생성하지 않음) 한국어로 안내하세요.