Logocob

cob create

Mason 브릭으로 새 프로젝트 생성

cob create#

Mason 브릭으로 새 모노레포 프로젝트를 생성합니다. 모든 옵션을 프롬프트로 입력받는 Interactive 모드와 플래그로 전달하는 Non-interactive 모드를 지원합니다.

cob create --type monorepo [options]

--type app은 아직 구현되지 않았습니다 (App creation is not yet implemented).

실행 모드#

Interactive 모드 (권장)#

옵션을 생략하면 항목별 프롬프트로 값을 입력받습니다. 기본값이 제시되므로 Enter만 눌러 진행할 수 있습니다.

cob create --type monorepo
  • 미지정 옵션은 모두 프롬프트로 수집 (프로젝트명, 조직, 도메인, GitHub, 인증서 등)
  • Feature 모듈은 항목별 포함 여부를 개별 확인
  • 생성 완료 후 GitHub 레포 생성 여부와 make start 실행 여부를 추가로 확인

Non-interactive 모드#

--no-interactive 지정 시 프롬프트 없이 플래그 값과 기본값만 사용합니다. --name은 필수입니다.

cob create --type monorepo --no-interactive --name my_app

옵션#

프로젝트 옵션#

옵션축약설명기본값
--type -t 프로젝트 타입 (monorepo, app) monorepo
--name -n 프로젝트명 (snake_case, non-interactive 필수) -
--description -d 프로젝트 설명 A new monorepo project
--output-dir-o출력 디렉토리.
--organization조직/회사명프로젝트명 Title Case
--backend 백엔드 타입 ( openapi , serverpod , graphql , supabase , firebase ) serverpod
--features포함할 feature 모듈 (쉼표 구분)기본 세트
--enable-admin 관리자 콘솔 활성화 (true/false 값 필요) true
--console-skeleton admin=true일 때 도메인 console 기능 제외, 빈 어드민 셸만 생성. 도너 풀 콘솔은 --no-console-skeleton true
--no-interactive비대화형 모드interactive가 기본
--auto-start 생성 후 make start 자동 실행 false
--save-config 설정을 projects/에 JSON으로 저장 false

--console-skeleton은 --enable-admin false이면 무시됩니다(강제 false). Interactive 모드에서는 admin 활성화 시 프롬프트로 확인합니다.

GitHub 옵션#

옵션설명기본값
--github-orgGitHub 조직명coco-de
--github-repoGitHub 레포명프로젝트명 (kebab-case)
--github-visibility 레포 공개 범위 (private, public) private
--create-repo프로젝트 생성 후 GitHub 레포 자동 생성false

도메인/인증서 옵션#

옵션설명기본값
--tld 도메인 TLD suffix (예: studio → cocode.studio) im
--subdomain 서브도메인 prefix (예: cocode → cocode.studio) 프로젝트명 (kebab-case)
--org-tld조직 TLDcom
--admin-email관리자 이메일dev@{프로젝트명}.{tld}
--cert-cn인증서 Common Name조직명
--cert-ou인증서 Organizational UnitProduction
--cert-o인증서 Organization조직명
--cert-l인증서 Locality/CitySeoul
--cert-st인증서 State/ProvinceSeoul
--cert-c인증서 국가 코드 (2자리)KR

Apple 옵션#

옵션설명기본값
--apple-developer-idApple Developer ID (이메일)-
--itc-team-idApp Store Connect Team ID-
--team-idDeveloper Portal Team ID-

AWS 옵션#

옵션설명기본값
--aws-access-key-idAWS Access Key ID (S3, SNS, SQS)-
--aws-secret-access-keyAWS Secret Access Key-

random_project_id는 옵션 없이 자동 생성됩니다 (영문 소문자+숫자 4자리).

Feature 선택#

기본 Feature 세트#

--features 미지정 시 현재 코어와 호환되는 기본 포함(#699/#715):

app_router

dashboard, home, mypage, onboarding, notification은 이전 세대 feature 브릭으로 현재 코어와 호환되지 않아 기본에서 빠집니다. 단독 Mason 브릭의 카탈로그 기본값과 다르게, cob create는 호환 가능한 셸만 명시해서 생성합니다.

전체 Feature 목록#

app_router, attendance, classroom, community, dashboard, home,
homework, league, level_test, management, mypage, notice_board,
notification, onboarding, payment, report, review, schedule,
store, study_material, users

Feature 의존성#

의존 feature가 선택되지 않으면 경고 후 자동 추가됩니다.

Feature의존 Feature
payment, report, management, league users
homework, attendanceclassroom
reviewstore

예시#

# Interactive 모드 (권장)
cob create --type monorepo

# Non-interactive 모드 (전체 옵션)
cob create --type monorepo --no-interactive \
  --name example_shop \
  --description "Example Shop App" \
  --organization acme \
  --tld im --org-tld im \
  --github-org coco-de --github-repo example-shop \
  --github-visibility private \
  --backend serverpod \
  --enable-admin true --admin-email dev@example.com \
  --apple-developer-id dev@example.com \
  --itc-team-id <ITC_TEAM_ID> --team-id <APPLE_TEAM_ID> \
  --cert-cn Acme --cert-ou Production --cert-o "Acme Inc." \
  --cert-l Seoul --cert-st Seoul --cert-c KR

# Feature 목록 지정 + GitHub 레포 자동 생성
cob create --type monorepo --no-interactive \
  --name my_app \
  --features home,community,notification,payment \
  --create-repo

# 설정 저장 (이후 create-from-config로 재사용)
cob create --type monorepo --no-interactive \
  --name blueprint --organization Cocode \
  --save-config

GitHub 레포 자동 생성#

--create-repo 플래그를 추가하면 프로젝트 생성 후 GitHub 레포를 자동 생성합니다. Interactive 모드에서는 플래그가 없어도 생성 여부를 프롬프트로 확인합니다.

실행 순서:

  1. gh CLI 설치 및 인증 상태 확인
  2. git init → git add . → git commit -m "Initial commit"
  3. gh repo create {org}/{repo} --{visibility} 후 push

gh CLI가 없거나 인증되지 않은 경우 경고만 출력하고 건너뛰며, 프로젝트 생성 자체는 실패하지 않습니다. 레포 생성 실패 시에도 수동 실행 가능한 명령어를 안내합니다.

설정 저장 (--save-config)#

--save-config 지정 시 수집된 모든 변수(프로젝트/GitHub/인증서/feature 등)를 projects/{프로젝트명}.json으로 저장합니다. 저장된 설정은 cob create-from-config로 재사용할 수 있습니다.