Logocob

CLI 사용법

cob CLI 명령어 상세 가이드

CLI 사용법#

명령어 목록#

명령어설명
create새 프로젝트 생성 (GitHub 레포 자동 생성 지원)
create-from-config저장된 설정으로 프로젝트 생성
apply기존 프로젝트에 feature 브릭 적용
sync템플릿 프로젝트를 브릭으로 동기화
diffFeature 비교 분석
update레거시 프로젝트 업데이트

create#

cob create --type monorepo [options]

프로젝트 옵션#

옵션설명기본값
--type프로젝트 타입monorepo
--name프로젝트명 (snake_case)-
--description프로젝트 설명A new monorepo project
--output-dir출력 디렉토리.
--organization조직/회사명프로젝트명 기반
--backend백엔드 타입serverpod
--featuresFeature 목록 (쉼표 구분)기본 세트
--no-interactive비대화형 모드false
--save-config설정 저장false
--auto-start생성 후 make start 자동 실행false
--primary-entity주요 entity명 (PascalCase)brick 기본값
--secondary-entity보조 entity명 (PascalCase)brick 기본값

GitHub 옵션#

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

도메인/인증서 옵션#

옵션설명기본값
--tld도메인 TLDim
--subdomain서브도메인프로젝트명
--org-tld조직 TLDcom
--admin-email관리자 이메일자동 생성
--enable-admin관리자 콘솔 활성화true
--apple-developer-idApple Developer ID-
--itc-team-idApp Store Connect Team ID-
--team-idDeveloper Portal Team ID-

기본 Feature 세트#

--features 미지정 시 기본 포함:

  • app_router, dashboard, home, mypage, notification, onboarding

예시#

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

# Non-interactive 모드
cob create --type monorepo --no-interactive \
  --name good_teacher \
  --description "Good Teacher App" \
  --organization laputa \
  --github-org coco-de \
  --github-repo good-teacher \
  --backend serverpod \
  --features home,community,notification,payment

# GitHub 레포 자동 생성
cob create --type monorepo --no-interactive \
  --name my_app \
  --create-repo

# Feature 목록 지정 + entity 커스터마이징
cob create --type monorepo --no-interactive \
  --name my_app \
  --features home,community,notification,payment \
  --backend serverpod \
  --primary-entity Article

GitHub 레포 자동 생성#

--create-repo 플래그를 추가하면 프로젝트 생성 후 GitHub 레포를 자동 생성합니다.

실행 순서:

  1. gh CLI 설치 및 인증 상태 확인
  2. git init, git add, git commit
  3. gh repo create coco-de/repo-name --private --source=. --push

gh CLI가 없거나 인증되지 않은 경우 경고만 출력하고 건너뜁니다. 프로젝트 생성은 실패하지 않습니다.

Interactive 모드에서는 GitHub 레포 생성 여부를 프롬프트로 확인합니다.

create-from-config#

저장된 설정 파일(projects/*.json)을 사용하여 프로젝트를 생성합니다.

cob create-from-config --config <name> [options]

옵션#

옵션설명기본값
--config설정 파일명 (확장자 제외)-
--list저장된 설정 목록 출력false
--output-dir출력 디렉토리 덮어쓰기설정 파일 값
--auto-start자동 시작 덮어쓰기설정 파일 값

예시#

# 설정 저장 (create 명령어에서)
cob create --type monorepo --save-config

# 저장된 설정 목록
cob create-from-config --list

# 설정으로 생성
cob create-from-config --config blueprint

# 출력 디렉토리 덮어쓰기
cob create-from-config --config blueprint --output-dir ../new-location

apply#

cob apply --feature <name> [options]

옵션#

옵션설명기본값
--feature단일 feature-
--features복수 feature (쉼표 구분)-
--backendbackend 포함true
--primary-entity주요 entity명 (PascalCase)brick 기본값
--secondary-entity보조 entity명 (PascalCase)brick 기본값
--bricks-dir커스텀 bricks 경로bricks/
--dry-run미리보기false
--force덮어쓰기false

예시#

# 단일 feature 적용
cob apply --feature community

# 복수 feature 동시 적용
cob apply --features community,chat,notification

# entity 커스터마이징
cob apply --feature community \
  --primary-entity Article \
  --secondary-entity Reply

# console feature 적용
cob apply --feature console_dashboard --backend

# 미리보기
cob apply --feature community --dry-run

# 커스텀 bricks 경로
cob apply --feature community --bricks-dir /path/to/bricks

sync#

cob sync --type <type> --project-dir template/my_project [options]

옵션#

옵션설명기본값
--type동기화 타입 (monorepo, app, feature, all-console-features)-
--project-dir템플릿 프로젝트 경로-
--bricks-dir커스텀 bricks 출력 경로bricks/

동기화 타입#

타입설명
monorepo모노레포 전체 동기화
app앱 브릭만 동기화
feature개별 feature 브릭 동기화
all-console-features29개 console feature 브릭 일괄 동기화

예시#

# 모노레포 동기화
cob sync --type monorepo --project-dir template/good_teacher

# 개별 feature 브릭 동기화
cob sync --type feature --name home --project-dir template/good_teacher

# console feature 전체 동기화
cob sync --type all-console-features --project-dir template/kobic

# 커스텀 bricks 경로로 동기화
cob sync --type monorepo --project-dir template/good_teacher \
  --bricks-dir /path/to/output/bricks

diff#

cob diff --project-a <path> --feature <name> [options]

옵션#

옵션설명기본값
--project-a분석 대상 프로젝트 A-
--project-b비교 프로젝트 B (생략 시 단일 분석)-
--feature분석할 feature-
--all-features모든 feature 분석false
--full-analysis품질 분석 포함false
--output리포트 출력 경로claudedocs/

분석 항목#

항목설명
구조 비교파일 구조, 공통/고유/누락 파일 식별
인터페이스 분석Repository 인터페이스 메서드 시그니처 비교
품질 분석에러 처리, 캐싱, 로깅, 코드 복잡도 (--full-analysis)

예시#

# 단일 프로젝트 분석 (template vs bricks)
cob diff --project-a template/good-teacher --feature auth

# 두 프로젝트 비교 + 품질 분석
cob diff \
  --project-a template/good-teacher \
  --project-b template/blueprint \
  --feature auth --full-analysis

# 모든 feature 분석
cob diff \
  --project-a template/good-teacher \
  --all-features --output claudedocs/diff-reports

사전 요구사항#

도구용도필수
Dart SDK 3.9+CLI 실행O
Mason CLI브릭 생성O
gh CLIGitHub 레포 자동 생성 (--create-repo)X
Flutter SDK생성된 프로젝트 빌드X