KRi

@kri/create-next-app (0.1.4)

Published 2026-08-10 14:16:41 +09:00 by gitadmin in KRi/front-create-next-app

Installation

@kri:registry=
npm install @kri/create-next-app@0.1.4
"@kri/create-next-app": "0.1.4"

About this package

@kri/create-next-app

KRI 표준 Next.js 프로젝트 생성 CLI입니다.

사전 준비

사용자 npm 설정에서 @kri scope와 Gitea 토큰이 설정되어 있어야 합니다.

@kri:registry=https://gitea.kric.com/api/packages/KRi/npm/
//gitea.kric.com/api/packages/KRi/npm/:_authToken=${GITEA_NPM_TOKEN}

개발

npm install
npm run typecheck
npm run build
node .\dist\cli.js test-front --yes --skip-install

사용

npx @kri/create-next-app survey-front

질문 없이 기본값으로 생성:

npx @kri/create-next-app survey-front --yes

주요 옵션은 --help로 확인합니다.

Agent Harness 관련 기본값과 옵션:

--project-type <type>   requested-project|internal-service|shared-service
--agent-project-id <id> 하네스 프로젝트 ID (기본: 프로젝트명 slug)
--harness-root <path>   중앙 Agent Harness 저장소 경로
--agent-registration <shared|local>
                        중앙 등록 범위 (기본 shared)
--skip-agent-compose    하네스 자동 등록·합성·검증 생략

--yes 사용 시 프로젝트 유형은 requested-project입니다.

생성 과정

  1. 표준 템플릿 복사
  2. Next.js 및 shadcn 호환 npm 의존성 설치
  3. @kri/common@latest 설치 후 exact 버전 기록
  4. KRI UI Registry 9개 항목 설치
  5. TypeScript 검사
  6. Next.js production build
  7. Agent Harness 공유 등록, AGENTS.md/CLAUDE.md 합성 및 검증

UI Registry: https://ui-registry.kric.com/r

Agent Harness

생성 프로젝트에는 .agent/profile.yml, .agent/project.md, .gitattributes가 항상 포함됩니다.

중앙 하네스는 다음 순서로 탐색합니다.

  1. --harness-root
  2. KRI_AGENT_HARNESS_ROOT 환경변수
  3. 생성 경로의 상위 디렉터리

하네스를 발견하면 기본적으로 프로젝트를 공유 workspace.yml에 등록하고 compose, verify를 실행합니다. 일회성 로컬 등록은 --agent-registration local로 선택할 수 있습니다. 하네스를 찾지 못해도 프로젝트 생성은 완료되며, 이 경우 .agent 원본을 중앙 하네스에서 나중에 등록·합성해야 합니다. 중앙 저장소와 생성 프로젝트의 Git 커밋은 자동으로 수행하지 않습니다.

생성되는 환경 파일

.env, .env.local, .env.development, .env.production, .env.example을 생성합니다. .env.local과 .env는 기본적으로 Git에서 제외되며, .env.development와 .env.production은 Jenkins 빌드에 사용할 수 있도록 추적 가능합니다.

호환성 정책

  • @kri/common은 프로젝트 생성 시점의 최신 버전을 설치하고 exact 버전으로 기록합니다.
  • Next.js 생태계 호환성을 위해 생성 프로젝트의 TypeScript는 최신 5.x, ESLint는 최신 9.x를 사용합니다.
  • shadcn 기본 컴포넌트가 사용하는 class-variance-authority, clsx, tailwind-merge, lucide-react를 기본 의존성에 포함합니다.

Dependencies

Development Dependencies

ID Version
@types/node latest
rimraf latest
typescript latest
Details
npm
2026-08-10 14:16:41 +09:00
1
UNLICENSED
43 KiB
Assets (1)
Versions (13) View all
0.3.1 2026-11-17
0.3.0 2026-11-17
0.2.2 2026-10-06
0.2.1 2026-09-09
0.2.0 2026-09-04